claude-agent-team
AGENTS.md4 starsChanged 56 days agoMITView on GitHub
A playbook for AI agents working on claude-agent-team itself. CLAUDE.md (when present) is shared human+agent guidance; this file is agent-specific. Every agent here is loaded by every Claude session for every repo. So: When you upgrade an agent, ask: would this rule make sense in a brand-new repo with a different stack? If no, generalize it. These agents run under whatever model the user has selected — including smaller/faster ones — and their reports are read by engineers at every…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- codex-writeSkill
- shepherd-prSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 10 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Every agent here is loaded by every Claude session for every repo.
- Very specific: line 17
Don't hardcode language-specific rules.
- Very specific: line 18
Don't hardcode tool names.
- Very specific: line 19
Don't hardcode paths. src/core/store/ makes sense in gridfinity.
- Distinctive: line 20
Do encode meta-patterns: "find the project's error-handling convention before writing", "discover where tests live before placing one", …
- Distinctive: line 22
When you upgrade an agent, ask: *would this rule make sense in a brand-new repo with a different stack?* If no, generalize it.
- Distinctive: line 71
Avoid duplicating colors across agents that the user might invoke in the same workflow.
- Very specific: line 87
Create agents/<name>.md with frontmatter from the schema above.
- Distinctive: line 90
Update README.md agent table and any workflow recipes that reference the new agent.
- Very specific: line 91
Test it: start a session with claude --plugin-dir <repo path> and confirm the agent appears as team:<name>.
- Distinctive: line 94
Read the agent in full first — don't patch what you haven't understood.
- Distinctive: line 95
Add new sections *after* existing ones where possible.
- Very specific: line 96
Run git diff agents/<name>.md and re-read — agent prompts are load-bearing.
- Very specific: line 100
Create commands/<name>.md.
- Very specific: line 101
Always honor {{RAW_PROMPT}} for arg parsing.
- Very specific: line 103
Update the README.md slash-command table, writing the command with its /team: prefix.
- Very specific: line 107
Create skills/<name>/SKILL.md.
- Very specific: line 108
Put long reference material in skills/<name>/reference/*.md.
- Distinctive: line 109
Keep it portable. A skill ships to every project the user opens, so detect the project's tooling instead of assuming it.
- Distinctive: line 110
Update the README.md Workflow Skills table.
- Distinctive: line 120
Hardcoded rule vs. discovered rule?: If the rule is in *every* well-run project, hardcode it (e.g., "read CLAUDE.md before starting").
- Very specific: line 121
Read-only vs. write-capable agent?: Read-only (omit Write/Edit from tools:) for analysis agents (reviewer, security, planner, gap-finder, …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
A playbook for AI agents working on claude-agent-team itself. CLAUDE.md (when present) is shared human+agent guidance; this file is agent-specific.
At a glance
- What this repo is: a Claude Code plugin bundling agent definitions (
agents/*.md), slash commands (commands/*.md), and workflow skills (skills/*/SKILL.md). It doubles as its own marketplace:.claude-plugin/marketplace.jsonlists one plugin,team, with"source": "./". - Distribution model: users install with
/plugin marketplace add andymai/claude-agent-teamthen/plugin install team@claude-agent-team. Claude Code auto-discoversagents/,commands/, andskills/at the plugin root, so adding a file is all it takes to ship it. Components are namespaced by the plugin name (/team:commit,team:engineer). - Everything here runs across every project the user touches. Agents, commands, and skills must be portable: stack-agnostic and free of repo-specific assumptions.
- Paths inside agent and skill bodies: reference bundled files through
${CLAUDE_PLUGIN_ROOT}(it resolves anywhere in agent and skill content), never through~/.claude/.... The install path is a versioned cache directory outside the repo, so a hardcoded path is never correct. - The hard rule: agents must not encode project-specific conventions. Read the local project's
CLAUDE.md/AGENTS.mdand follow that.
The Generalization Rule
Every agent here is loaded by every Claude session for every repo. So:
- Don't hardcode language-specific rules.
unwrap()is a Rust concept;anyis TS-specific. Say "no panics in library code if the project bans them" — let the project's docs supply the specifics. - Don't hardcode tool names.
pnpm,cargo,justdon't all exist everywhere. Say "the project's check command" and detect it. - Don't hardcode paths.
src/core/store/makes sense in gridfinity; nowhere else. - Do encode meta-patterns: "find the project's error-handling convention before writing", "discover where tests live before placing one", "prefer property-based testing where the project already uses it."
When you upgrade an agent, ask: would this rule make sense in a brand-new repo with a different stack? If no, generalize it.
Write for the Weakest Executor
These agents run under whatever model the user has selected — including smaller/faster ones — and their reports are read by engineers at every experience level. The prompt must carry the discipline that a strong executor would supply on its own. Author every rule so the least capable executor still succeeds:
- Procedures over judgment. "Use your best judgment" and "when appropriate" only work for strong executors. Convert judgment calls into observable criteria and decision rules: "if X (which you can check by running Y) → do A; otherwise → do B."
- Hard gates, not implied sequencing. Assume the executor will skip any step that isn't a named gate. Sequenced work needs explicit preconditions: "Do not proceed to step 3 until the step-2 command exited 0 and you have read its output."
- Evidence rules. Every claim in a report must be traceable to something the agent observed this session — a file it Read, a Grep hit, quoted command output. Write rules that force this: "cite only file:line you have opened", "quote the failing line verbatim", "paste the test runner's summary line."
- Anti-fabrication rules. Weaker executors hallucinate APIs, file paths, and CVEs from training-data memory. Require verification before use: grep for an existing usage in the repo, read the dependency's types/source, or fetch current docs. Memory of a library is a hypothesis, not a fact.
- Permission to not know. Weaker executors guess plausibly instead of admitting uncertainty. Every agent must explicitly prefer "I could not determine X (I tried A and B)" over a confident guess, and reports must label each claim verified (observed), inferred (from code read), or assumed (stated as such).
- Worked examples. Weak executors follow examples better than abstractions. Every non-obvious rule should carry a short good/bad pair showing exactly what compliance looks like.
- Anti-thrash circuit breakers. Strong executors notice when they're looping; weak ones don't. Encode explicit limits: "if two consecutive fix attempts don't change the symptom, revert and re-diagnose", "escalate after the third failed command."
- Final self-check. End every agent with a short checklist it runs against its own output before reporting done. "Be careful" is not a step; a checklist is.
Verbosity is acceptable here: agent bodies load only when the agent is invoked, and a rule that prevents one hallucinated API call pays for itself. Keep the frontmatter description lean (it's always in context); spend tokens freely in the body where they buy correctness.
Frontmatter Schema
Agents (agents/*.md)
---
name: <kebab-case> # required, matches filename without .md
description: <one paragraph> # required, used by Claude to decide when to invoke
tools: <comma-separated> # required, see allowed tools below
disallowedTools: <list> # optional hard-deny — see caveat below before using
model: opus | sonnet | haiku # required, see model selection below
color: <ANSI color> # required, see palette below
---Allowed tool names: Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch. (Don't list tools the agent never uses — the description should make use of every listed tool.)
Read-only agents are enforced by omission, not disallowedTools. The tools: list is an allowlist, so leaving out Write/Edit already makes an agent read-only. Don't add disallowedTools: Write, Edit on top — it's redundant. Reserve disallowedTools for blocking a tool that would otherwise be inherited when no tools: allowlist is set.
Model selection:
opus— reasoning-heavy work: planning, architecture, debugging, security, review, research, gap-finding.sonnet— pattern-following work where speed matters: testing, optimization, documentation, context audits.haiku— short, deterministic transforms only (currently unused here).
Color palette (chosen for visual distinction in the agent picker):
green/brightGreen— building (engineer, documenter)red/brightRed— finding problems (reviewer, debugger)brightYellow/yellow— testing/security (security, tester)cyan/brightCyan/brightBlue/blue— planning/research/architecture (optimizer, planner, architect, researcher)magenta— gap-finding (post-implementation verification)white— auditing (context-auditor)
Avoid duplicating colors across agents that the user might invoke in the same workflow.
Commands (commands/*.md)
---
description: <one short line> # required
---Commands receive the raw user prompt via {{RAW_PROMPT}}. Document the supported flags in the body.
Session shapes
Shape 1: Adding a new agent
- Identify the meta-pattern you're encoding (not the specific repo it came from). Confirm it generalizes.
- Create
agents/<name>.mdwith frontmatter from the schema above. - Body structure: one-line role statement → core approach → 3-7 numbered steps or checklists → constraints → output guidance.
- Match the prose style of existing agents (terse, second-person, action-oriented).
- Update
README.mdagent table and any workflow recipes that reference the new agent. - Test it: start a session with
claude --plugin-dir <repo path>and confirm the agent appears asteam:<name>. Don't test through an installed copy; installing copies the repo into the plugin cache, so your edits won't be in it.
Shape 2: Upgrading an existing agent
- Read the agent in full first — don't patch what you haven't understood.
- Add new sections after existing ones where possible; don't reorder unless the existing structure is broken.
- Run
git diff agents/<name>.mdand re-read — agent prompts are load-bearing; a typo in the rules ships to every session.
Shape 3: Adding a slash command
- Decide if it's worth a command vs. an agent. Commands are good for short, parameterized operations the user runs often (commit, branch, worktree). Agents are good for open-ended reasoning that benefits from a system prompt.
- Create
commands/<name>.md. The body should document supported flags up front. - Always honor
{{RAW_PROMPT}}for arg parsing. - Reference, don't duplicate, conventions documented elsewhere — link to the relevant AGENTS.md section.
- Update the
README.mdslash-command table, writing the command with its/team:prefix.
Shape 4: Adding a workflow skill
- Decide skill vs. command. Skills are model-triggered from their
description, so they fit multi-step procedures Claude should recognize and start on its own. Commands are for operations the user invokes deliberately. - Create
skills/<name>/SKILL.md. Thedescriptionis the only part always in context, so spend it on trigger conditions, not on explaining the procedure. - Put long reference material in
skills/<name>/reference/*.md. It loads only once the skill fires, so the body can be thorough without costing context. - Keep it portable. A skill ships to every project the user opens, so detect the project's tooling instead of assuming it.
- Update the
README.mdWorkflow Skills table.
Shape 5: Repo hygiene / docs
- README.md is the human-facing pitch; AGENTS.md is the agent playbook. Don't mix audiences.
- Claude Code auto-discovers
agents/,commands/, andskills/at the plugin root. New files ship automatically, with no manifest edit needed. - Bump
versionin.claude-plugin/plugin.jsonon every change that should reach users.plugin.jsonpins an explicit version, so/plugin updatecompares against it and reports "already at the latest version" for any commit that didn't bump it. An unbumped change ships to nobody.
Decision frameworks
- Add a new agent vs. extend an existing one? Extend when the new capability is a refinement (engineer learns a new convention, reviewer learns a new checklist). New agent when the role is fundamentally different (architect ≠ reviewer; security ≠ reviewer).
- Hardcoded rule vs. discovered rule? If the rule is in every well-run project, hardcode it (e.g., "read CLAUDE.md before starting"). If the rule depends on the project's stack or style, the agent should discover it locally.
- Read-only vs. write-capable agent? Read-only (omit
Write/Editfromtools:) for analysis agents (reviewer, security, planner, gap-finder, architect, context-auditor, researcher). Write-capable for execution agents (engineer, debugger, tester, optimizer, documenter).
Conventions
- Cross-references carry the
team:prefix. When a command or agent tells the executor to invoke another component in this bundle, name itteam:documenteror/team:check, never bare. A bare name can resolve to an unrelated user-scoped component or to nothing at all. Descriptive prose about scope boundaries ("that's the reviewer's job") stays unprefixed, and Claude Code built-ins like/pluginand/reload-pluginsare never prefixed. - Commits: conventional commits (
feat,fix,refactor,chore,docs,test,ci,build,perf,style,revert). Scope is optional and short. - Branch naming:
<type>/<kebab-description>matching the commit type. - One feature per PR. Large agent rewrites that touch unrelated agents should be split.
- Never reply to or post PR comments. Agents and commands must not post comments, reply to review threads, or resolve threads on a PR (
gh pr comment,gh api .../comments, etc.). Address review feedback through commits and report the resolution back to the user; the user owns all PR conversation.
When You're Stuck
Report blocking state explicitly: what completed, what's blocking, what was attempted, what's needed from the user. Don't loop on the same failing command.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

