AGENTS.md
site/content/.claude/agents/AGENTS.mdAGENTS.md
Quality
58/100
Scores the file, not the repository.Length
899 words
10 headings · 2 code blocksRepository
259
— · pushed 10 days agoLast changed
3 days ago
First indexed 3 days ago.1# Agents23Agents are isolated Claude instances you create and configure for specialised tasks. They come in two forms: [subagents](^Focused workers that run inside your session, do a job, and return a summary) that operate within your session, and [agent teams](^Multiple independent Claude Code sessions coordinating through a shared task list) that coordinate across separate sessions.45## Quick Start671. Run `/agents` inside Claude Code to open the interactive agent manager82. Select **Create new agent**, then choose a scope (project or user)93. Use **Generate with Claude** and describe what the agent should do104. Select which tools the agent can access, pick a model, and save1112Your agent is available immediately. Try it: "Use the my-agent agent to review this module."1314## How Subagents Work1516Subagents are `.md` files with YAML frontmatter for configuration and a Markdown body that becomes the system prompt. Each subagent runs in its own context window, uses only the tools you allow, and returns a summary to your main conversation.17181. Claude matches your request to a subagent's `description` field192. A new context window is created with the subagent's system prompt203. The subagent works independently (reading files, running commands, etc.)214. Results are summarised back to your main conversation2223Subagents can run in the foreground (blocking) or background (concurrent). Press `Ctrl+B` to send a running task to the background.2425## Where Agents Live2627| Location | Scope | Priority |28|----------|-------|----------|29| `--agents` CLI flag | Current session only | 1 (highest) |30| `.claude/agents/` | This project (check into version control) | 2 |31| `~/.claude/agents/` | All your projects | 3 |32| Plugin `agents/` directory | Where the plugin is enabled | 4 (lowest) |3334When multiple agents share the same name, the higher-priority location wins.3536## Built-in Subagents3738Claude Code ships with subagents it uses automatically:3940- **Explore**: fast, read-only codebase search (runs on Haiku)41- **Plan**: structured planning and analysis42- **General-purpose**: flexible helper for miscellaneous delegation4344You can create custom agents that override built-ins by using the same name at a higher priority scope.4546## Frontmatter Reference4748| Field | Required | Purpose |49|-------|----------|---------|50| `name` | Yes | Unique identifier (lowercase, hyphens) |51| `description` | Yes | When Claude should delegate to this agent |52| `tools` | No | Allowlist of tools (inherits all if omitted) |53| `disallowedTools` | No | Denylist removed from inherited tools |54| `model` | No | `sonnet`, `opus`, `haiku`, or `inherit` (default) |55| `permissionMode` | No | `default`, `acceptEdits`, `dontAsk`, `bypassPermissions`, `plan` |56| `maxTurns` | No | Maximum agentic turns before the agent stops |57| `skills` | No | Skills to inject into the agent's context at startup |58| `mcpServers` | No | MCP servers available to this agent |59| `hooks` | No | Lifecycle hooks scoped to this agent |60| `memory` | No | Persistent memory scope: `user`, `project`, or `local` |61| `background` | No | Set `true` to always run as a background task |62| `isolation` | No | Set `worktree` to run in a temporary git worktree |6364## Agent Teams6566Agent teams coordinate multiple independent Claude Code sessions working in parallel. One session acts as the lead; others are teammates with their own context windows.6768Agent teams are experimental. Enable them in `settings.json`:6970```json71{72 "env": {73 "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"74 }75}76```7778Then describe the team structure in natural language:7980```81Create an agent team to review PR #142. Spawn three reviewers:82one focused on security, one checking performance, one validating tests.83```8485### Subagents vs Agent Teams8687| | Subagents | Agent Teams |88|---|-----------|-------------|89| Communication | Report results back to caller only | Teammates message each other directly |90| Context | Own window; results return to main session | Own window; fully independent |91| Coordination | Main agent manages all work | Shared task list with self-coordination |92| Best for | Focused tasks where only the result matters | Complex work requiring discussion |93| Token cost | Lower (results summarised back) | Higher (each teammate is a separate instance) |9495Use subagents for quick, focused workers. Use agent teams when teammates need to share findings and coordinate on their own.9697## Common Patterns9899- **Isolate verbose output**: delegate test runs or log analysis to a subagent so the output stays out of your main context100- **Parallel research**: spawn multiple subagents to investigate different parts of a codebase simultaneously101- **Chain subagents**: use one for analysis, pass its findings to another for implementation102- **Competing hypotheses**: spawn agent team members to investigate different theories and debate each other103104## Tips105106- Write detailed `description` fields so Claude knows when to delegate. Include "use proactively" for agents you want used automatically107- Grant only the tools an agent needs. A read-only reviewer should not have Write or Edit108- Subagents cannot spawn other subagents. For nested delegation, use skills or chain from the main conversation109- Use `memory: user` to let agents build knowledge across sessions. Ask them to "check your memory" before starting and "save what you learned" after finishing110- Agent teams work best with 3-5 teammates and 5-6 tasks each. More teammates means more coordination overhead111- Teammates load `CLAUDE.md` from the working directory, so project conventions apply to the whole team
Also in LukeRenton/explore-claude-code
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| LukeRenton/explore-claude-codeCLAUDE.md · 259 | CLAUDE.md | archagent-behaviour | 73/100 | 3 days ago | |
| LukeRenton/explore-claude-codesite/content/CLAUDE.md · 259 | CLAUDE.md | buildtestagent-behaviour | 77/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago |
