coding-agent-playbook-claude-code
CLAUDE.md0 starsChanged 4 months agoMITView on GitHub
This repository is a public playbook of Claude Code global instructions, skills with their packaged reference documents, and custom subagent definitions. It is almost entirely Markdown, plus a standard-library Python installer with two thin launchers, a few standard-library Python helper scripts inside skill packages, and a small amount of YAML frontmatter. It is for Claude Code only. Follow the host's instruction hierarchy first. Within the same authority level, the repository-specific guidance here applies where it is more specific than the…
In this repository28 other files it gives its agents.
- aws-local-preflightSkill
- feature-branch-lifecycleSkill
- handoffSkill
- legacy-path-retirementSkill
- local-ci-preflightSkill
- multi-role-repo-reviewSkill
- multi-session-coordinationSkill
- platform-documentationSkill
- production-api-integrationSkill
- production-architecture-reviewSkill
- production-code-qualitySkill
- production-database-integritySkill
- production-devops-releaseSkill
- production-documentation-onboardingSkill
- production-pass-orchestratorSkill
- production-performance-reviewSkill
- production-readiness-reportSkill
- production-reliability-observabilitySkill
- production-security-reviewSkill
- production-testing-qaSkill
- production-ux-accessibilitySkill
- reference-doc-routingSkill
- senior-code-reviewSkill
- session-cleanupSkill
- subagent-orchestrationSkill
- task-graph-orchestrationSkill
- technical-debt-auditorSkill
- worktree-lifecycleSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
18 rules. About 0 are common, 14 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Follow the host's instruction hierarchy first.
- Distinctive: line 9
Keep the playbook useful across many teams and codebases.
- Distinctive: line 10
Keep global guidance tool-agnostic and durable.
- Distinctive: line 11
Keep repository-specific, machine-specific, and workflow-specific detail out of global instructions.
- Distinctive: line 12
Prefer concise, practical guidance over theory — but do not sacrifice necessary detail for brevity.
- Distinctive: line 13
Keep the root session accountable for framing, delegation, coordination, integration, validation, and the final report.
- Very specific: line 14
Keep the subagent lineup at local-orchestrator, read-only-explorer, senior-reviewer, docs-researcher, test-triager, and isolated-worker.
- Distinctive: line 39
Background subagents: keep only a subset of built-in tools, so one definition can resolve to different tools in the foreground and the …
- Distinctive: line 46
No sensitive access material, private local paths, internal-only URLs, session transcripts, or long incident logs.
- Distinctive: line 47
No hardcoded project names, organization workflows, or local machine quirks in global guidance.
- Distinctive: line 48
No instructions tied to a specific issue tracker, review tool, package manager, shell, or hosting provider unless the file is explicitly an …
- Distinctive: line 49
Use Claude Code terminology in Claude-specific files: CLAUDE.md, the resolved Claude Code home, Markdown agent definitions with YAML …
- Distinctive: line 51
Prefer "safety", "access control", and "sensitive access material" over product-specific security terminology.
- Distinctive: line 52
Keep templates reusable and clearly marked as templates.
- Distinctive: line 70
Run the full check suite locally before finalizing meaningful changes:
- Very specific: line 80
Every SKILL.md has YAML frontmatter with name and description, and its name matches its directory.
- Very specific: line 85
Only agents/local-orchestrator.md lists Agent in tools.
- Very specific: line 86
No bundled agent sets isolation: worktree.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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
Repository Coding Agent Instructions
This repository is a public playbook of Claude Code global instructions, skills with their packaged reference documents, and custom subagent definitions. It is almost entirely Markdown, plus a standard-library Python installer with two thin launchers, a few standard-library Python helper scripts inside skill packages, and a small amount of YAML frontmatter. It is for Claude Code only.
Follow the host's instruction hierarchy first. Within the same authority level, the repository-specific guidance here applies where it is more specific than the global instructions.
What This Repository Is For
- Keep the playbook useful across many teams and codebases.
- Keep global guidance tool-agnostic and durable.
- Keep repository-specific, machine-specific, and workflow-specific detail out of global instructions.
- Prefer concise, practical guidance over theory — but do not sacrifice necessary detail for brevity. These files are read by agents that need the specifics.
- Keep the root session accountable for framing, delegation, coordination, integration, validation, and the final report.
- Keep the subagent lineup at
local-orchestrator,read-only-explorer,senior-reviewer,docs-researcher,test-triager, andisolated-worker. - Keep the branch, worktree, session, and dependency lifecycles separate.
feature-branch-lifecycleowns branch topology, promotion, and temporary-branch cleanup;worktree-lifecycleowns checkouts;multi-session-coordinationowns concurrent ownership;task-graph-orchestrationowns dependencies between work outcomes. A branch is not a worktree, a branch is not a session, and a feature integration branch is not automatically a graph node.session-cleanupowns the end-of-work integrity pass over the work delta and routes branch deletion and worktree removal to those skills rather than doing either itself;handoffprepares a fresh continuation, starts one itself only when the user asks, and changes nothing else. - Keep the operating model direct-first: the root session implements by default, including substantial multi-file work; subagents are used sparingly — only when a bounded assignment's concrete benefit outweighs its context, coordination, latency, and review cost, or independent assistance is required — bounded, flat by default, and never mandatory; skills and dependency-graph planning apply whether one agent or several do the work. Do not reintroduce a rule that requires a helper on every task, a direct-execution exception statement, one helper per graph node, or a required sequence of planner, implementer, reviewer, tester, and documentation passes.
- Keep each agent definition usable two ways: as a Role perspective the root applies directly (which changes nothing about the root's model, effort, permissions, or ownership, and is self-review, not independent verification) and as a bounded assignment for an actual subagent, whose Delegated use rules apply only when it runs as one. Keep the two separated in the file, with an Applying this perspective directly section between them.
- Keep the engineering standard: understand the whole affected flow before choosing a fix; improve the existing implementation by default and replace a substantial part only on evidence of a significant benefit that justifies migration, verification, and maintenance costs; treat unnecessary abstractions, speculative compatibility, and redundant tests as maintainability defects; and never invent a support commitment for hypothetical users, obsolete test accounts, fixtures, or earlier implementations. Do not introduce numerical quality thresholds or scores.
- Keep the testing standard end-to-end: behavioral tests retained by new work drive complete supported UI, API, or CLI flows and cover important business rules, realistic regressions, meaningful failures, and boundaries; every newly created unit test is temporary and is removed, with its exclusive support code, once passing E2E coverage carries its still-required assertions; existing required suites and repository gates are preserved, and existing non-E2E tests migrate only within authorized scope after replacement coverage passes; builds, lint, type checks, and static validation stay valid evidence for what they check. Do not reintroduce an endorsement of permanent unit tests or isolated integration suites as lasting coverage.
- Keep the runtime-resource rules: recover and reuse the established environment in dependency order before creating another, at most two recovery cycles unless a project runbook sets another finite limit, one browser-test worker when safe capacity is unverified or heavy jobs overlap, and teardown limited to task-owned resources. Local preflight produces local evidence only:
local-ci-preflightandaws-local-preflightgrant no authority to call AWS or other cloud services, start shared services, deploy, or dispatch remote CI. - Link third-party skills and plugins to their official Claude distribution instead of vendoring copies. Each one — Impeccable, Taste, Humanizer, and the separately maintained Intuitive Software Design — is a companion that users install from its own Claude Code plugin marketplace or from the Anthropic Directory. Because the playbook ships none of them, every install path says they need to be downloaded separately: the install prompts in
README.mdandINSTALL.md, INSTALL.md's agent steps, and the installer's closing message. Install instructions always take a companion's latest version — the current release on a first install, and an update on every playbook install or update — so never pin or record a companion version number.INSTALL.mddocuments each companion andTHIRD_PARTY.mdcredits it. State availability only as far as it was verified, with the date it was checked. - Keep every skill self-contained: a skill's
SKILL.mdand every reference or template it depends on live under that skill's directory and install together, and a path written inside a skill resolves against the skill's package root. There is no top-levelreferences/directory. A cross-skill need is met by naming the owning skill, never by reaching into its files or keeping a second copy.
Facts About Claude Code That This Playbook Depends On
These are load-bearing. If you change guidance that touches them, verify against the current Claude Code documentation first — an earlier version of this playbook had the nesting rule backwards, and it propagated to eleven files.
- Subagent frontmatter supports
name,description,tools,disallowedTools,model,permissionMode,effort,isolation, and others. All of the fields used here are documented. - Model precedence (Claude Code v2.1.251 and later): per-invocation
model> frontmattermodel(includinginherit) >CLAUDE_CODE_SUBAGENT_MODEL> the main conversation's model.CLAUDE_CODE_SUBAGENT_MODEL_FORCE=1reverses this — it ignores every definition'smodeland blocks the per-call parameter — and an organizationavailableModelsallowlist can substitute. Before v2.1.251 the environment variable came first; do not reintroduce that ordering. - A helper's model is chosen for its work, within approved routes, independent of the main session's model, nesting depth, retries, and replacements:
haikufor narrow lookup, extraction, file mapping, and log summaries;opusat the definition'seffort: mediumfor implementation, diagnosis, planning, and review; the root itself, on the user's model, for the hardest architecture and cross-system reasoning. Each definition declares the default for its typical work —read-only-exploreranddocs-researcheronhaikuwith noeffortfield (Haiku does not supporteffort), andsenior-reviewer,test-triager,isolated-worker, andlocal-orchestratoronopusateffort: medium— and the per-callmodelselects the actual route. Judgment work never goes to Haiku.sonnetandfableare not helper routes;high,xhigh, andmaxon a helper are deliberately not used because they remove the per-turn thinking ceiling and consume usage quickly on work the root verifies anyway; fast mode is a main-session setting the user controls. The main session's model, effort, and speed are never changed from inside a task. Do not reintroduce a "child at or below the main session's tier" rule, a fixed route that ignores the work, or effort-specific copies of the roles. - There is no per-invocation
effortparameter on theAgentcall. A definition'seffortis the only way to set a subagent's effort; a definition that omits it inherits the session level. This is why effort belongs to the role while the model is chosen per dispatch, and why there is one definition per role rather than copies per effort level. TheeffortLevelsettings key acceptslowthroughxhighbut notmax.mediumis the documented default effort for Opus 5.5, which Anthropic reports matches or exceeds Opus 5 athighthere. - Nesting is enabled by default, up to three layers below the main conversation.
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=2tightens that to two;1turns nesting off. It is not a switch that enables nesting, and it must never be documented as a precondition for delegation. - What actually prevents a spawn is omitting
Agentfromtoolsand listing it indisallowedTools. Prompt text does not. - Subagents invoke skills only through the
Skilltool. Atoolsallowlist that omitsSkill— as every bundled role's does — means the subagent cannot invoke a skill; the caller names each applicable skill and its entrypoint path in the assignment and the helper reads it. Theskillsfrontmatter field preloads skill content at startup and is not used here because the applicable set is chosen per task. effortoverrides the session effort level. It is a property of the role, not a ceiling inherited from the caller. Do not reintroduce a rule that a child's effort must be at or below the caller's session effort — it would make a role's pinned effort unreachable from a session running below it, and it misreads the field.- Plan mode gates shell commands. Commands outside the built-in read-only set are classifier-reviewed or prompt for approval, so a
plan-mode subagent cannot reliably run tests, linters, type checkers, or builds. Suite execution belongs totest-triager(defaultmode), notsenior-reviewer(planmode). isolation: worktreebranches from the repository default branch, not the parent session'sHEAD, unlessworktree.baseRefis"head". This is why isolation is root-authorized with the base ref recorded.- Agent teams are experimental and off by default (
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1enables them). While on, a named subagent spawn in an interactive session becomes a teammate that runs in the main session's working directory and inherits the lead's effort rather than the definition's; frontmatterisolationdoes not prevent it. - Background subagents keep only a subset of built-in tools, so one definition can resolve to different tools in the foreground and the background.
- Session actions, which the
handoffskill depends on.claude "<prompt>"starts an interactive session with that first prompt,-nnames it, and/clearstarts a new conversation with an empty context while the previous one stays resumable.--continue,--resume, and/resumereopen a conversation with its history;/branch,--fork-session, and/forkcopy that history.claude -pruns headless and exits.claude --bgstarts a background session (agent view, a research preview) that moves into its own worktree under.claude/worktrees/before it edits — branched from the default branch unlessworktree.baseRefis"head"— and commits and pushes its changes unless the task,CLAUDE.md, or memory says the user handles git. It takes the prompt as the positional argument and--namefor its title, and prints the session ID thatclaude logs <id>(recent output) andclaude attach <id>(open it in a terminal) take;claude agents --jsonlists active sessions. Claude Code documents no tool for the model to open a new interactive session. Checked against the Claude Code 2.1.263 documentation andclaude --help. - Skill loading. When a skill is invoked, Claude Code loads its
SKILL.mdand states the skill's base directory, so a skill's instructions can address its bundledreferences/,scripts/, andassets/files relative to that directory. Packages that ship helper scripts or templates depend on this. Observed on 2.1.281. - Plugin marketplaces, which the companion-plugin guidance depends on.
claude plugin marketplace add <source>adds a marketplace from a URL, a path, or a GitHub repository;claude plugin install <plugin>@<marketplace>installs from it;claude plugin listshows what is installed;claude plugin marketplace update [name]refreshes a configured marketplace from its source, every marketplace when no name is given; andclaude plugin update <plugin>@<marketplace>updates an installed plugin to its latest version, which applies after a restart. Checked againstclaude plugin --helpon 2.1.281. Anthropic'sclaude-plugins-officialmarketplace and the Anthropic Directory, the plugin catalog in Claude, are separate listings: a plugin can appear in one but not the other, as Intuitive Software Design did when checked on 2026-11-03.
Content Rules
- No sensitive access material, private local paths, internal-only URLs, session transcripts, or long incident logs.
- No hardcoded project names, organization workflows, or local machine quirks in global guidance.
- No instructions tied to a specific issue tracker, review tool, package manager, shell, or hosting provider unless the file is explicitly an example or template.
- Use Claude Code terminology in Claude-specific files:
CLAUDE.md, the resolved Claude Code home, Markdown agent definitions with YAML frontmatter, model aliases, effort levels, permission modes, real tool names, and real session commands. - This repository is Claude Code only. Never add another coding-agent environment's configuration paths, file names, agent formats, model identifiers, command vocabulary, metadata files, or links to editions for other environments.
scripts/validate.shrejects the known ones, so its own deny-list is the one place those names appear. The one exception is the README banner image,assets/coding-agent-playbook-claude-code-hero.png, which is kept by maintainer decision: its panel that points to the playbook's other edition is intentional, and a replacement banner keeps that panel. Do not remove or edit the banner unless the maintainer asks. - Prefer "safety", "access control", and "sensitive access material" over product-specific security terminology.
- Keep templates reusable and clearly marked as templates.
Writing Style for Agent-Facing Files
The agents/, skills/ (including each skill's packaged references and templates), and custom-instructions/ files are read by models, and how they are written changes how well they are followed.
- Put a rule where its actor can act on it. Routing rules belong in the caller's documentation, not duplicated into every leaf agent's system prompt — a leaf cannot choose its own model.
- Lead with the decision, then the rule, then the exception.
- Prefer concrete examples over abstract constraint lists. One worked assignment teaches more than twenty required fields.
- Explain the mechanism when it changes behavior. "Plan mode cannot run your test suite" is followed; "respect permission boundaries" is not.
- Use tables for lookups and numbered steps for procedures.
- State positive defaults, then a bounded list of what not to do.
- Avoid invented vocabulary. Say what Claude Code says: subagent,
Agenttool,subagent_type,model,effort,permissionMode,tools,disallowedTools, nesting depth, plan mode. - Do not compress away necessary detail. These files are reference material; length is fine when every paragraph earns its place.
- Write with STE-inspired clarity: one main instruction per sentence, active voice, explicit actors, consistent terms, and conditions placed before the actions they control. Keep every consequential qualifier — "only", "before", "unless", approval and verification requirements — and keep exact commands, paths, schemas, and values. This is an authoring approach, not a claim of ASD-STE100 compliance, and it imposes no restricted dictionary or sentence-length limit on technical content.
Validation
Run the full check suite locally before finalizing meaningful changes:
bash scripts/validate.shCI runs exactly this script (.github/workflows/validate.yml), plus a PowerShell job that parses install.ps1 and runs the launcher end to end, including a dry run.
Automated checks (CI enforces all of these):
- Every
SKILL.mdhas YAML frontmatter withnameanddescription, and itsnamematches its directory. Every directory underskills/has aSKILL.md, and no file sits loose directly underskills/. - Skill packages are discovered from the tree by both the installer and the validator, so adding one requires no change to either. Do not reintroduce a hardcoded skill list.
- Every
agents/*.mdhasname,description,model,permissionMode,tools, anddisallowedTools, declares an approved default route (haikuwith noeffortonread-only-exploreranddocs-researcher;opuswitheffort: mediumon the other four), and carries the## Role perspective,## Applying this perspective directly, and## Delegated useheadings. Both validators check only the six playbook-managed definitions by name, so a user's own agents are never judged against this policy. read-only-explorer,docs-researcher, andsenior-reviewerusepermissionMode: planand list neitherEditnorWrite.test-triager,isolated-worker, andlocal-orchestratorusepermissionMode: default.- Only
agents/local-orchestrator.mdlistsAgentintools; the other five listAgentindisallowedTools. - No bundled agent sets
isolation: worktree. - Fenced code blocks are balanced; every repository path referenced in Markdown exists; every
references/,scripts/, orassets/path written inside a skill — bare or as<skill-base-dir>/...(or<skill-dir>/...) — resolves inside that skill's package, which is the same ruleinstall.pyenforces before it writes anything; a project's own path inside a skill is written with a leading./so neither check treats it as a package resource; no Markdown outsideskills/refers to a top-levelreferences/path; no repository text file of any type carries the names, configuration paths, model names, or commands of another coding-agent environment; no skill package ships another environment's per-skill metadata file; and no skill package ships aLICENSEorNOTICEfile at any depth, because third-party skills are linked as companions rather than vendored. - The installer's post-install check reads only the Markdown the release ships, so a user's own files in an adopted skill directory never fail an install.
- The validator reads tracked files plus new files that are not ignored, so on a clean CI checkout it sees exactly the committed tree, and locally it checks a new package before its first commit.
install/install.pypasses a real full-mode install into a temporary home (including a body containing backslashes) in which every packaged skill file is installed byte-identically, a repeat install that changes nothing and writes no backups, a dry run that creates nothing and uses "Would ..." wording, a support-only install that preserves and backs up existingCLAUDE.mdcontent, a legacy-reference migration that retires an unchanged file and preserves a customized one, and exits non-zero when a managed file is missing.install.shandinstall.ps1are thin launchers forinstall.pyand, withpwshavailable, produce a byte-identical Claude Code home in both modes. The former duplicated Bash and PowerShell implementations drifted more than once — a trailing-newline difference and a case-insensitive manifest sort made each rewrite the other's files — so do not reintroduce a second implementation.install.shpassesbash -n,install.pycompiles, and the pointer block inclaude-prompts/setup-global-claude-support-system.mdis identical toinstall/support-only-pointer.md.
Manual review:
- Guidance touching any item in Facts About Claude Code matches current documentation.
README.md's repository-structure block matches the actual tree.- Design-principle wording in
custom-instructions/,agents/, andskills/stays consistent withskills/reference-doc-routing/references/engineering-design.md: whole affected flow understood first, smallest complete solution, improve before replace (a substantial replacement needs evidence of a significant benefit, never a numerical score), earned abstractions rather than a blanket ban on single-use ones, root-cause fixes within scope, and material technical debt recorded with scope, rationale, and follow-up condition. - Testing wording retains only E2E behavioral tests for new work, through complete supported UI, API, or CLI flows; treats every newly created unit test as temporary, removed with its exclusive support code only after passing E2E coverage carries its still-required assertions; preserves existing required suites, repository gates, and required assertions; keeps existing non-E2E migration within authorized scope; keeps builds, lint, type checks, and static validation as valid evidence; and never treats a mocked, partial, or relabeled check as E2E proof. Check the global instructions, the testing and repository templates, the six agents,
senior-code-review,session-cleanup,feature-branch-lifecycle,multi-session-coordination,legacy-path-retirement, and the support-only pointer together. - Runtime guidance recovers the established environment in dependency order before creating another, bounds recovery at two cycles unless a runbook sets another finite limit, starts browser tests with one worker when safe capacity is unverified or heavy jobs overlap, and tears down only task-owned resources. The local-preflight skills keep local evidence separate from remote acceptance, report unconfigured or skipped required checks as gaps rather than passes, and grant no authority to call AWS, start shared services, deploy, or dispatch remote CI.
- No third-party skill is vendored. Each companion links to its official Claude distribution, has a
THIRD_PARTY.mdrow with source and license, states availability and install commands only as far as they were verified, with the date, and pins no version. Every install path tells users to download the companions and to install or update them to their latest versions. - Install docs and scripts reference the current file set.
- No file reintroduces mandatory delegation, a direct-execution exception statement, one helper per graph node, graph use that requires delegation, a required role sequence, a claim that applying a role's perspective yourself satisfies an independent-verification gate, or permission to skip a matching skill for direct or familiar work.
- Design guidance asks for existing components, dialogs, hooks, validators, utilities, and interaction patterns to be reused, composed, or extended before new code is written, and justifies shared code by a current need, a real boundary or invariant, an established convention, or meaningful duplication removed — never by hypothetical reuse.
- Legacy-path guidance keeps or adds a compatibility path only for a demonstrated current dependency or an explicit retention requirement, treats a search that finds nothing as an evidence gap rather than proof of non-use, treats hypothetical users, obsolete test accounts, fixtures, and earlier implementations as no support commitment, decides data retention separately from code retirement, and carries correctness safeguards into the authoritative path.
- Handoff guidance names only session actions Claude Code supports, never offers a resume, branch, fork, or cross-session message as a fresh continuation, and gates a background continuation on the user's request and on its worktree and git behavior.
- Session-cleanup guidance derives the work delta from the repository against a verified baseline, preserves unrelated work, requires evidence for compatibility code, and never deletes branches or worktrees itself.
- Branch guidance keeps the detailed procedure in
skills/feature-branch-lifecycle/references/branching-rule.mdrather than the global instructions, detects real branch names instead of assumingmainorstaging, never invents a missing long-lived branch, never lets a development branch bypass the feature integration branch, requires complete-feature validation before promotion, gates every temporary-branch deletion on verified evidence and explicit authority, preserves and reports a branch whose gates fail, and never deletes a permanent branch. - The installer defaults to full mode, maintains the managed-file manifest, retires only unchanged formerly managed files (including loose
references/files left by earlier releases), writes backups outside the managed trees, and preserves customized or unrelated files. - The final diff contains no paths, schemas, model names, commands, metadata files, or edition links belonging to another coding-agent environment.
License
MIT (see LICENSE). Do not change the license without an explicit maintainer decision.
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.

