first-pass
AGENTS.md128 starsChanged 29 days agoMITView on GitHub
Claude Code does not load this file on its own here: a CLAUDE.md at a plugin root fails claude plugin validate --strict. The breaker and the working rules read it; read it before changing this repo. - What it is: first-pass itself: a Claude Code plugin (.claude-plugin/, hooks/hooks.json, scripts/) and a skills pack (skills/) that other tools install with npx skills. The setup skill's assets (skills/setup-first-pass/assets/) are the rules block, profile block, default words block, machine block, workspace block, project…
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,774 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 repository10 other files it gives its agents.
- fix-the-classSkill
- habit-wordsSkill
- hulkSkill
- jevSkill
- premortemSkill
- quickSkill
- reviewSkill
- setup-first-passSkill
- sharpenSkill
- ship-checkSkill
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 89
Owner rules: never name the private projects first-pass came from (CI checks).
≈ “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
first-pass
Claude Code does not load this file on its own here: a CLAUDE.md at a plugin root fails claude plugin validate --strict. The breaker and the working rules read it; read it before changing this repo.
<!-- first-pass:project:start (written once by the setup-first-pass skill; yours to edit, re-runs keep it) -->This repo (first-pass)
- What it is: first-pass itself: a Claude Code plugin (
.claude-plugin/,hooks/hooks.json,scripts/) and a skills pack (skills/) that other tools install withnpx skills. The setup skill's assets (skills/setup-first-pass/assets/) are the rules block, profile block, default words block, machine block, workspace block, project block, INVARIANTS template and the breaker agent. Thehabit-wordsskill reads the user's own session transcripts (scripts/lib/words.mjs). Thesharpenskill runs only when the user types it (disable-model-invocation) and rewrites the prompt given with it; its gate (scripts/lib/sharpen-gate.mjs) holds back edits, shell commands, subagents, MCP tools, publishing, scheduling and other skills until the rewrite is shown. Thereviewskill, also typed by hand, reviews the user's own branch (nothing typed) or someone else's PRs through the breaker, never posts to GitHub or the ticket, runs a fork's or an outside author's code only on a yes, and fixes and pushes only what the user picks after the report. Thejevskill, typed by hand, sets up the optional Jev judge (scripts/lib/jev.mjs,cli.mjs jev), the plugin's only network call:ship-checkasks TypeSafe's model about review findings, and code, not the model, holds the policy (it can add harm, never clear it; a failed or unsure answer leaves the call to the rules). Thehulkskill, typed by hand, lifts the rules' "Stay in the task's scope" for one task, so reviews andfix-the-classlook across the whole codebase again. Thequickskill, typed by hand, turns on quick mode until/first-pass:quick off: the checks a change can affect stand in for CI's full checks, and the rest of the suite is left for a full run.cli.mjs parts(scripts/lib/parts.mjs) runs a repo's CI checks on this machine from the recipe in its.first-pass/parts.json: stages in order, a stage's parts side by side, each through the main folder'spartWrapperwhen it has one;--testsgives a part whose steps take{{tests}}only chosen test files,--no-testsruns its other steps without them, and neither run counts as its full pass;ship-checkstep 4 runs it and setup step 5 drafts the recipe. - CI's checks (
.github/workflows/validate.yml, jobvalidate):claude plugin validate --strict .and on.claude-plugin/plugin.json(Claude Code pinned to 2.1.280), skill names match folders, the skills the rules name (premortem,ship-check,fix-the-class,setup-first-pass,habit-words,sharpen,review,jev,hulk,quick) and the breaker asset exist, every block has one start and one end marker, the rules, profile, words and machine block versions equalplugin.json's, the hooks point at scripts that exist,node --test test/*.test.mjs, and the private-name check. - Run one test file:
node --test test/lib.test.mjs(alsohooks.test.mjs,setup.test.mjs,machine.test.mjs,words.test.mjs,sharpen.test.mjs,jev.test.mjs,parts.test.mjs). - Real tests (the layer that catches what mocks miss):
test/hooks.test.mjsrunsscripts/hooks.mjsthe way Claude Code does, against throwaway main folders in the system temp folder;test/jev.test.mjsruns the judge andcli.mjs jevagainst a fake Jev server on 127.0.0.1 (never the real one);test/parts.test.mjsruns the parts runner on throwaway git checkouts with real processes, servers and ports (from 41000). Before a release, an end-to-end run:claude -p "/first-pass:setup-first-pass"with--plugin-dir .on a fake main folder, then fresh sessions that check the rules load, a bridged hook denies, and the done check fires once. - What they need running, and how to start and stop it: nothing; the tests create and leave temp folders only.
- Test limits (what never to run here, and how much at once): tests only ever write
under the system temp folder; never point one at a real workspace, or at the real
~/.claude(the tests setCLAUDE_CONFIG_DIRto a temp folder). The parts tests take ports from 41000 to 49010 only, with lock files beside real runs' infirst-pass-parts/ports. - Heavy runs (databases, browsers, media tools, builds): none.
- Local runs that reach real people (what a local server, worker or test run sends for real, and the empty keys or switches that stop it): none found: the plugin sends nothing; the Jev tests use a fake server on 127.0.0.1, and
jev testandjev askreach TypeSafe only once the owner has set up a key. - Monitoring (where a swallowed error must end up): a failing bridged hook becomes a
systemMessagethe user sees (scripts/lib/merge.mjs); a crash in first-pass itself is a Claude Code hook error. - Words live in:
README.md, everyskills/*/SKILL.md, and the assets, which are loaded into every user's sessions once setup writes them. - The same job in two places (a change to one needs the other): the timeouts in
hooks/hooks.jsonandEVENT_LIMITSinscripts/lib/bridge.mjs(a test enforces it); the block versions in the assets andplugin.json's version (CI enforces it); the setup skill's steps andscripts/cli.mjs's subcommands; the survey's repo finder and the drift check's (scripts/lib/repos.mjs, shared); the words marker thehabit-wordsskill writes andWORDS_MARKERinscripts/lib/drift.mjs; the default habit words and their checks inskills/setup-first-pass/assets/words-block.mdand the table inskills/sharpen/SKILL.md; the PreToolUse matchers inhooks/hooks.json(a named list andmcp__.*) andGATED_TOOLS/isGatedinscripts/lib/sharpen-gate.mjs(a test enforces it), andgateOnlyinscripts/hooks.mjs, which keeps repo hooks off the tools only the gate needs;SHELL_TOOLSinscripts/lib/shell-edits.mjsand the PreToolUse, PostToolUse and PostToolUseFailure matchers inhooks/hooks.json(a test enforces it); what the breaker rates high and its Worst case words (skills/setup-first-pass/assets/breaker.md), what is fixed right away in the rules block andskills/ship-check/SKILL.md, andFIX_NOWinscripts/lib/jev.mjs(a test enforces it); the word Sharpened inskills/sharpen/SKILL.mdstep 5 andSHOWNin the gate; the transcript row shapestypedTextinscripts/lib/words.mjsknows and what Claude Code writes (a new row kind is silently left out or wrongly kept); the recipe fieldsloadRecipeinscripts/lib/parts.mjsaccepts and the list in setup step 5,VARSthere and the placeholders setup step 5 names, andWRAPPER_VARSand setup step 4'spartWrapperplaceholders. - Extra pre-mortem cases (this repo's own ways to run twice, end, or scale): a plugin
update with an unchanged version is not picked up by
claude plugin update, so every release bumpsplugin.json; a change to a managed block reaches a user only when they re-run setup; users are on Windows, macOS and Linux (paths, shells,\r\n, and process trees: the parts runner stops one withtaskkill /Ton Windows and by process group elsewhere); the Jev judge is an outside call on every finding asked about (a deadline, bounded retries, and a fallback to the rules on any failure). - Owner rules: never name the private projects first-pass came from (CI checks); the GitHub account is the owner's personal one, and nothing is pushed before the owner creates the repo.
- Invariants:
INVARIANTS.md
<!-- first-pass:project:end -->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.

