3.0 KiB
3.0 KiB
| name | type | category | description |
|---|---|---|---|
| Agents Directory | documentation | agents | Sub-agent definitions organized by type and purpose with specific capabilities and tool restrictions |
Claude Code Agents Directory Structure
This directory contains sub-agent definitions organized by type and purpose. Each agent has specific capabilities, tool restrictions, and naming conventions that trigger automatic delegation.
Directory Structure
.claude/agents/
├── README.md # This file
├── _templates/ # Agent templates
│ ├── base-agent.yaml
│ └── agent-types.md
├── development/ # Development agents
│ ├── backend/
│ ├── frontend/
│ ├── fullstack/
│ └── api/
├── testing/ # Testing agents
│ ├── unit/
│ ├── integration/
│ ├── e2e/
│ └── performance/
├── architecture/ # Architecture agents
│ ├── system-design/
│ ├── database/
│ ├── cloud/
│ └── security/
├── devops/ # DevOps agents
│ ├── ci-cd/
│ ├── infrastructure/
│ ├── monitoring/
│ └── deployment/
├── documentation/ # Documentation agents
│ ├── api-docs/
│ ├── user-guides/
│ ├── technical/
│ └── readme/
├── analysis/ # Analysis agents
│ ├── code-review/
│ ├── performance/
│ ├── security/
│ └── refactoring/
├── data/ # Data agents
│ ├── etl/
│ ├── analytics/
│ ├── ml/
│ └── visualization/
└── specialized/ # Specialized agents
├── mobile/
├── embedded/
├── blockchain/
└── ai-ml/
Naming Conventions
Agent files follow this naming pattern:
[type]-[specialization]-[capability].agent.yaml
Examples:
dev-backend-api.agent.yamltest-unit-jest.agent.yamlarch-cloud-aws.agent.yamldocs-api-openapi.agent.yaml
Automatic Delegation Triggers
Claude Code automatically delegates to agents based on:
- Keywords in user request: "test", "deploy", "document", "review"
- File patterns:
*.test.js→ testing agent,*.tf→ infrastructure agent - Task complexity: Multi-step tasks spawn coordinator agents
- Domain detection: Database queries → data agent, API endpoints → backend agent
Tool Restrictions
Each agent type has specific tool access:
- Development agents: Full file system access, code execution
- Testing agents: Test runners, coverage tools, limited write access
- Architecture agents: Read-only access, diagram generation
- Documentation agents: Markdown tools, read access, limited write to docs/
- DevOps agents: Infrastructure tools, deployment scripts, environment access
- Analysis agents: Read-only access, static analysis tools