The Three Layers
Commands
Handle user interaction and parameter collection
Agents
Execute workflows with constrained tool access
Skills
Provide domain-specific knowledge and procedures
Layer Responsibilities
Commands: Entry Points
Commands are user-facing entry points that:- Accept user input via
$ARGUMENTS - Substitute dynamic context with
!\command“ - Delegate to agents or execute workflows directly
- Define tool whitelists and model overrides
/develop command
Agents: Execution Engines
Agents are specialized workers with:- Constrained tool access (whitelist or blacklist)
- Preloaded skills for domain knowledge
- Persistent memory (user/project/local scopes)
- Background execution and worktree isolation options
Agents with
PROACTIVELY in their description can be auto-invoked by Claude when appropriate.Skills: Domain Knowledge
Skills provide specialized knowledge in two modes: Preloaded (Agent Skills)- Full content injected at agent startup
- Always available, no invocation needed
- Use for knowledge the agent always needs
- Cost: uses context tokens
- Loaded only when called via
/skill-name - Use
context: forkfor isolated execution - Use for procedures run occasionally
- Keeps main context lean
System Diagram
- User interacts via commands (
/develop,/commit, etc.) - Commands delegate to specialized agents
- Agents execute with preloaded skills and constrained tools
- Skills provide domain knowledge and procedures
- Hooks observe and intervene at 18 lifecycle events
- Memory persists learnings across sessions
Component Relationships
Commands → Agents
Commands delegate to agents for execution:Agents → Skills
Agents load skills at startup for domain knowledge:Skills → Tools
Skills can constrain available tools:Configuration Hierarchy
Settings cascade down the hierarchy, with lower levels overriding higher ones.
Memory Architecture
Multiple memory systems work together:| System | Scope | Managed By | When Loaded |
|---|---|---|---|
| CLAUDE.md | Project | You | Every session (ancestors), lazy (descendants) |
| CLAUDE.local.md | Personal | You | Every session (gitignored) |
| Auto Memory | User | Claude | Session start (first 200 lines) |
| Agent Memory | Per-agent | Agent | Agent invocation |
| Pro-Workflow DB | User | Hooks | Session start (via SessionStart hook) |
Tool Access Patterns
Read-Only Agents
For planning and exploration:Full-Access Agents
For implementation:Selective Blocking
Block dangerous operations:Model Selection by Layer
Different layers can use different models:| Layer | Typical Model | Reasoning |
|---|---|---|
| Commands | Default | Simple delegation |
| Planner Agent | Opus 4.6 | Deep reasoning needed |
| Implementer Agent | Sonnet 4.6 | Balanced speed/quality |
| Scout Agent | Haiku 4.5 | Fast read-only exploration |
Best Practices
Do
Use read-only agents for planning phases
Preload frequently-needed skills into agents
Use
context: fork for heavy, isolated proceduresSet
background: true for long-running explorationUse
memory: project for agents that should learn patternsDon’t
Extension Points
The architecture provides multiple extension points:Custom Commands
Custom Commands
Create slash commands in
~/.claude/commands/ or .claude/commands/Custom Agents
Custom Agents
Define specialized agents in
~/.claude/agents/ or .claude/agents/Custom Skills
Custom Skills
Add domain knowledge in
~/.claude/skills/ or .claude/skills/Hook Scripts
Hook Scripts
React to 18 lifecycle events in
settings.jsonNext Steps
Orchestration Patterns
Learn how to wire Commands, Agents, and Skills together
Multi-Phase Development
Understand Research > Plan > Implement workflows