fill-claude-md
Skill0 starsChanged 6 months agoMITView on GitHub
Fill in or trim a CLAUDE.md so only non-discoverable, project-specific, broadly-relevant lines remain — the judgement layer applying the three content-economics tests over `pm:claude-scaffold`'s stubs. Use when a CLAUDE.md stub created by `pm:claude-scaffold` still carries `[auto — verify]` or `<fill in>` markers, when `pm:claude-audit` reports `incomplete`, or when an existing CLAUDE.md needs trimming.
In this repository32 other files it gives its agents.
- _00-Project-Management/CLAUDE.mdCLAUDE.md
- autopilotSkill
- close-out-storySkill
- close-phaseSkill
- coreSkill
- critiqueSkill
- curate-toolkitSkill
- documentSkill
- draft-epicSkill
- draft-okrsSkill
- draft-prdSkill
- execute-batch-parallelSkill
- execute-batchSkill
- execute-storySkill
- execution-strategistSkill
- installSkill
- modeSkill
- monthly-retroSkill
- path-scope-exampleSkill
- peer-reviewSkill
- plan-driftSkill
- refine-backlogSkill
- reflectSkill
- run-testplanSkill
- session-startSkill
- split-into-featuresSkill
- split-into-storiesSkill
- start-phaseSkill
- triage-backlogSkill
- updateSkill
- weekly-monitorSkill
- write-outcomesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before any line stays in a CLAUDE.md, it must pass ALL of these tests:
- Very specific: line 21
Not discoverable by exploration: If grep, ls, or reading the code would reveal it, it does not belong.
- Very specific: line 26
Reference, don't duplicate: If a line is reference material that already has a canonical home — a frontmatter block or section skeleton …
- Distinctive: line 44
Keep it lean; it signposts the rest of the tree in plain words.
- Very specific: line 84
If given a path, use it. Otherwise run: npm run pm:claude-audit -- --json and take every entry with state incomplete (and any gap you …
- Very specific: line 90
Read the file and the directory it governs.
- Very specific: line 91
Verify the command actually exists and is the *right* one (e.g.
- Very specific: line 93
If correct → remove the [auto — verify] suffix, keep the line.
- Distinctive: line 96
If wrong → fix or delete it.
- Very specific: line 117
Write these outside the managed markers (under the ## Critical gotchas and ## Conventions headings, in the human area).
- Very specific: line 123
If asked to trim, run every existing line through the four tests in reverse.
- Very specific: line 130
Run npm run pm:claude-audit -- --json again.
- Very specific: line 136
Never write content inside a PM-KIT:BEGIN/END managed block except the command lines the scaffold owns — the scaffold overwrites managed …
- Distinctive: line 138
Never copy root content into a subdir file.
- Distinctive: line 139
When in doubt about a line, delete it.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Tandem: fill-claude-md (Dev hat)
You are completing the judgement layer of the kit's CLAUDE.md automation.
The scaffold script (pm:claude-scaffold) wrote the discoverable starter lines
and marked them [auto — verify]. Your job is the part automation cannot do:
decide what non-discoverable, project-specific content earns a place, and confirm
or remove the auto-detected starters.
The content-economics tests (CLAUDE-CODE-CONFIG §2.1.4)
Before any line stays in a CLAUDE.md, it must pass ALL of these tests:
- Applies broadly at this scope. Root file → relevant to almost any task in the repo. Subdir file → relevant to almost any task in that subdir. Narrower → push it down the tree or into a skill.
- Not discoverable by exploration. If
grep,ls, or reading the code would reveal it, it does not belong. Encode what the code can't say: gotchas, "looks like X but is actually Y", which command to use here, where to start. - Project-specific, not reusable expertise. Advice that applies to any repo is a skill, not CLAUDE.md.
- Reference, don't duplicate. If a line is reference material that already
has a canonical home — a frontmatter block or section skeleton living in
91-Templates/, a schema, a status enum, a command list owned by another file — point to that home, don't inline a copy. Inlined duplication drifts from its source and is paid for in context every session. Flag any inlined copy of a template/schema/owned-command-list for replacement with a one-line pointer (e.g. "Story frontmatter: see91-Templates/STORY.template.md").
Inclusion gate for every line: "If I delete this line, what specifically goes wrong, and how often?" If the answer is "nothing, most of the time" — delete it.
Tiered layout (where a rule lives)
CLAUDE.md is a tree, not one file. Place each rule by cost-of-a-miss: a serious or irreversible miss (data loss, a broken release, a security hole) earns a spot higher up; a recoverable, area-local miss lives lower down.
- Tier 1 — always-on root
CLAUDE.md. Loaded every session, so it costs context on every task. Keep only rules relevant to almost every task here. Keep it lean; it signposts the rest of the tree in plain words. - Tier 2 — folder-scoped
CLAUDE.md. One per major area, auto-loaded by Claude Code when a file in that folder is touched. Additive — it adds what's true only in that folder; it is never a copy of root. - Tier 3 — thin pointer file. In a folder that only occasionally needs a rule
whose real home is elsewhere, a tiny
CLAUDE.mdthat names the rule's single home and is followed on demand — not a second copy of the rule.
Never use @import. An @import (or @path/to/file) pulls the target into
the always-loaded context eagerly, re-bloating Tier 1 with everything it points
at — the opposite of the tiered model. Use a plain-text signpost ("when
editing X, read x/CLAUDE.md") instead; Claude Code loads the folder file on
demand when it's actually relevant.
Workflow
digraph fill {
"Find target stubs" [shape=box];
"For each stub: read it + its directory" [shape=box];
"Confirm [auto — verify] starters" [shape=box];
"Draft gotchas/conventions" [shape=box];
"Run each candidate through 3 tests" [shape=diamond];
"Write outside managed markers" [shape=box];
"Strip confirmed [auto — verify] markers" [shape=box];
"Re-audit" [shape=doublecircle];
"Find target stubs" -> "For each stub: read it + its directory";
"For each stub: read it + its directory" -> "Confirm [auto — verify] starters";
"Confirm [auto — verify] starters" -> "Draft gotchas/conventions";
"Draft gotchas/conventions" -> "Run each candidate through 3 tests";
"Run each candidate through 3 tests" -> "Write outside managed markers" [label="passes"];
"Run each candidate through 3 tests" -> "Draft gotchas/conventions" [label="fails: drop or move to skill"];
"Write outside managed markers" -> "Strip confirmed [auto — verify] markers";
"Strip confirmed [auto — verify] markers" -> "Re-audit";
}Step 1 — Find the targets
If given a path, use it. Otherwise run:
npm run pm:claude-audit -- --json and take every entry with state incomplete
(and any gap you intend to fill). Each maps to a CLAUDE.md file.
Step 2 — For each stub, confirm the [auto — verify] starters
Read the file and the directory it governs. For each [auto — verify] line:
- Verify the command actually exists and is the right one (e.g. check the
manifest's scripts; confirm
npm run testisn't actuallypnpm test:unit). - If correct → remove the
[auto — verify]suffix, keep the line. Add a disambiguating note only if the obvious command is wrong (e.g. "NOTnpm test— that runs e2e, ~20min"). - If wrong → fix or delete it.
These lines live inside the <!-- PM-KIT:BEGIN managed:commands --> block.
Editing them in place is fine — but do NOT add new human prose inside that block;
the scaffold rewrites its inner content on the next run.
Step 3 — Draft and filter gotchas + conventions
Propose candidate lines for ## Critical gotchas and ## Conventions. For each,
apply the four tests and the deletion gate. Concretely reject:
- "Components live in
/components" → discoverable byls. Drop. - "Use TypeScript strict mode" → discoverable from
tsconfig.json. Drop. - "Write good commit messages" → reusable expertise. Move to a skill, not here.
- A pasted copy of the Story frontmatter block → has a canonical home in
91-Templates/STORY.template.md. Replace with a pointer to it (test 4).
Concretely keep (when true for this repo):
- "Migrations run from repo root, not
/services/*, despite appearances." - "DB writes go through
/packages/db/writers/*— don't call the ORM from routes." - "Dates are always
Temporal, neverDate; the lint rule misses some paths."
Write these outside the managed markers (under the ## Critical gotchas and
## Conventions headings, in the human area). Keep each file lean — a subdir file
should be additive to root, never a copy of it.
Step 4 — Trimming mode (existing bloated files)
If asked to trim, run every existing line through the four tests in reverse.
Produce a short list: "Recommend deleting — reason" per failing line (including
"duplicates <canonical home> — replace with pointer" for test-4 failures). Make
the edits only after the user confirms, unless they asked you to trim directly.
Step 5 — Re-audit
Run npm run pm:claude-audit -- --json again. The files you completed should no
longer be incomplete (no [auto — verify] / <fill in> left). Report what
changed and any boundary you deliberately left excluded.
Guardrails
- Never write content inside a
PM-KIT:BEGIN/ENDmanaged block except the command lines the scaffold owns — the scaffold overwrites managed inner content. - Never copy root content into a subdir file. Subdir files are additive.
- When in doubt about a line, delete it. A lean file that's all signal beats a complete file that's half noise. The context cost is paid every session.
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.

