agentleFS
dgilforddgilford/ai-science-toolkit/skills/evolve-claude-md/SKILL.md

evolve-claude-md

Skill82 starsChanged 42 days agoMITView on GitHub

Update CLAUDE.md — or the canonical AGENTS.md it redirects to — with durable knowledge from the current session. Use at the end of a working session to promote new findings, renamed variables, refined definitions, or corrected assumptions into the permanent project record.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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
  1. Distinctive:

    Do not add: session-specific state, task progress, anything already in CLAUDE.md, speculative findings, or things that belong in HANDOFF.md.

    line 41
  2. Very specific:

    If the target file is already large (roughly 150+ lines of substance), say so in the summary and suggest /retro for the cuts — this skill …

    line 51
  3. Distinctive:

    If nothing meaningful warrants an update, say so explicitly and stop.

    line 58
  4. Distinctive:

    Run each candidate down the routing ladder.

    line 59

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Review the current session and update the project's canonical agent-guidance file with anything durable that it doesn't yet know.

Target file

CLAUDE.md by default — but some repos keep a thin CLAUDE.md stub that redirects to a canonical AGENTS.md (the cross-tool convention scaffolded by /repo-init). Resolve the target before editing:

A redirect stub is a CLAUDE.md whose only content is the redirect to AGENTS.md plus pointer lines (the shape /repo-init scaffolds) — nothing project-specific. A stray substantive line in an otherwise-stub file is residue: migrate it into AGENTS.md as part of this run and leave the stub clean.

Repo stateEdit
CLAUDE.md substantive, no AGENTS.md (the most common state)CLAUDE.md
CLAUDE.md is a redirect stubAGENTS.md — leave the stub untouched (create AGENTS.md if the stub points at a missing file)
No CLAUDE.md, but AGENTS.md existsAGENTS.md
Both exist with substantive contentCLAUDE.md, and flag the split-brain to the user so they can consolidate
Neither existsCreate CLAUDE.md

What belongs in the canonical file

Promote only knowledge that is:

  • Permanent — true beyond this session (not current task state)
  • Project-level — relevant to anyone working in this repo
  • Non-obvious — not derivable from reading the code directly

Good candidates: renamed or new variables, corrected definitions, newly understood warn patterns, confirmed pipeline behavior, resolved ambiguities about data schema, architectural decisions with non-obvious rationale.

Good: Pipeline requires --baseline to be passed explicitly; there is no default. — permanent code behavior that would surprise any future developer.

Bad: Dataset coverage is 1981-09-01 through 2026-05-16 (16,329 zarrs). — describes the current data artifact being processed, not the codebase. Belongs in HANDOFF.md.

The test: if removing this fact would cause a future developer to misunderstand how the pipeline works, it belongs here. If it describes the data being processed this session, it belongs in the handoff.

Do not add: session-specific state, task progress, anything already in CLAUDE.md, speculative findings, or things that belong in HANDOFF.md.

Routing ladder — before adding anything

The canonical file is loaded into every session, so each line costs every future run. Prose is the last resort, not the first. For each candidate, ask in order:

  1. Could a deterministic check enforce it? A mechanical rule — a banned call, a value that must match another, a file-location constraint — belongs in a lint, a test, or CI, not in prose. Don't build the check unasked: note it as a proposed check in your summary and add at most a one-line pointer once it exists.
  2. Is it reference material? A procedure, a design history, a gotcha list — move it to docs/<topic>.md (or the existing doc it belongs in) and leave a one-line pointer.
  3. Only then, is it a judgement call that earns prose? Cross-file consistency, "why we chose X," a claim that fails loudly if wrong.

If the target file is already large (roughly 150+ lines of substance), say so in the summary and suggest /retro for the cuts — this skill only adds.

Steps

  1. Resolve the target file (table above) and read it in full.
  2. Scan the session for new knowledge: check git diff, recently modified files, and conversation context.
  3. Identify specific additions or corrections — be precise about what changed and why.
  4. If nothing meaningful warrants an update, say so explicitly and stop.
  5. Run each candidate down the routing ladder; only rung 3 lands in the target file.
  6. Otherwise, make targeted edits to the target file. Do not rewrite sections that don't need changing.
  7. Briefly summarize what was added or corrected, where, and why — and list any candidates routed to a check or a doc instead.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.