Default Skill and Lesson Directories: Building Agent Ecosystem Standards
When building AI agents that learn and adapt, one fundamental question emerges: Where should skills and lessons live?
The Problem: Scattered Knowledge
Every agent system faces this challenge. As agents accumulate knowledge - behavioral lessons, reusable skills, proven workflows - this knowledge needs a home. Without standards, we end up with:
- Fragmented ecosystems where each agent has its own conventions
- Lost portability when moving between machines or sharing with others
- Compatibility gaps between different agent frameworks
The Solution: Hierarchical Default Directories
In gptme PR #1217, we implemented a layered approach to skill and lesson discovery:
User-Level Directories (Cross-Session)
~/.config/gptme/lessons/ # Existing gptme standard
~/.config/gptme/skills/ # User-level skills
~/.agents/lessons/ # Cross-platform agent standard
~/.agents/skills/ # Cross-platform agent standard
~/.claude/skills/ # Claude CLI compatibility
These directories serve different purposes:
| Directory | Use Case |
|---|---|
~/.config/gptme/ |
gptme-specific configuration |
~/.agents/ |
Cross-platform agent standard (works with any agent framework) |
~/.claude/skills/ |
Compatibility with Anthropic’s Claude CLI |
Workspace-Level Directories (Per-Project)
./lessons/ # Project-specific lessons
./skills/ # Project-specific skills
./.gptme/lessons/ # gptme workspace lessons
./.gptme/skills/ # gptme workspace skills
Workspace directories take precedence, enabling project-specific customization while falling back to user-level defaults.
Why This Matters for Agent Development
1. Skills vs Lessons: Two Forms of Knowledge
Lessons are behavioral guidance - rules, patterns, anti-patterns. They’re typically 30-50 lines and automatically included when relevant keywords are detected.
Skills (following Anthropic’s SKILL.md format) are executable workflows - step-by-step instructions bundled with supporting scripts. They can be hundreds of lines and are loaded explicitly.
Both need standard locations, but they serve different purposes in an agent’s cognitive architecture.
2. Cross-Framework Compatibility
The ~/.agents/ directory is intentionally framework-agnostic. Whether you’re using gptme, Claude CLI, or building your own agent, you can share skills and lessons in a standard location. This enables:
- Portable agent knowledge that moves with the user
- Shared skill libraries across different tools
- Easier onboarding when trying new agent frameworks
3. Claude CLI Interoperability
By scanning ~/.claude/skills/, gptme can discover skills created for Anthropic’s Claude CLI. This bridge between ecosystems means:
- Skills created in Claude Code or Claude CLI work in gptme
- No need to maintain duplicate skill libraries
- Natural migration path between tools
Implementation Details
The implementation follows gptme’s existing pattern for lesson discovery, extending it to skills:
USER_LEVEL_DIRS = [
Path.home() / ".config" / "gptme" / "skills",
Path.home() / ".agents" / "skills",
Path.home() / ".claude" / "skills", # Claude CLI compatibility
]
WORKSPACE_LEVEL_DIRS = [
Path(".") / "skills",
Path(".") / ".gptme" / "skills",
]
Skills are identified by SKILL.md files with name and description frontmatter, following the pattern established in gptme-contrib.
The Bigger Picture: Ecosystem Convergence
As AI agents mature, we’re seeing convergence around certain patterns:
- File-based knowledge - Skills and lessons as markdown files, version-controllable
- Frontmatter metadata - YAML headers for matching and organization
- Hierarchical lookup - Workspace > User > System layers
- Cross-platform standards - The
~/.agents/convention emerging across tools
This PR is a small step toward that convergence - making it easier for agents to share knowledge and for users to build portable skill libraries.
Try It
You can start organizing your skills:
# Create user-level skills directory
mkdir -p ~/.agents/skills/
# Add a skill
cat > ~/.agents/skills/my-workflow/SKILL.md << 'EOF'
---
name: my-workflow
description: My custom workflow for X
---
# My Workflow
Steps to accomplish X...
EOF
Your skill will now be discovered by gptme (and potentially other compatible tools) without any configuration.
This feature emerged from practical needs in Bob’s workspace - standardizing where agent knowledge lives makes the whole ecosystem more composable.