agentleFS
loonylabs-devloonylabs-dev/claude-setup/skills/update-claude-md/SKILL.md

update-claude-md

Skill0 starsChanged 3 months agoMITView on GitHub

End of session: fold lasting learnings into CLAUDE.md (add, correct, remove).

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    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. Very specific:

    This skill files things IN. It does not compress: Every compression rule — distilling, telegraphing, moving out, consolidating, stale …

    line 11
  2. Distinctive:

    Check at the end: does CLAUDE.md still point correctly at the doc and story structure, if this session changed it?

    line 88

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Update CLAUDE.md (fold in the session's learnings)

Go through the session and maintain CLAUDE.md — the lasting, cross-session truth about how this project is worked on, its tooling and its pitfalls.

This skill files things IN. It does not compress. Every compression rule — distilling, telegraphing, moving out, consolidating, stale entries, supersession — lives in /claude-md-hygiene. If there is no room, you call that one (step 3) instead of squeezing here.

Admission criterion (apply it strictly)

Only what holds in EVERY future session gets in:

  • Pitfalls we actually walked into — with the concrete symptom, so it is recognisable
  • Working patterns and diagnostic techniques that proved reliable
  • Hard rules from user decisions (prohibitions, conventions, limits)
  • Corrections: an existing entry turned out wrong or outdated → change or delete it, do not write beside it

Stays out (lives in the story or docs/HANDOVER.md):

  • Task state, open findings, baseline numbers, the names of the current work
  • One-off events with no risk of recurrence
  • Anything that would be stale in four weeks

Wording: symptom → rule, in one sentence. English throughout, no EN/DE mix (translate learnings you noted in German as you file them). Date of observation only for empirical facts, and only once per rule.

Procedure — count once, write once

The old version wrote, measured, was over budget, compressed, wrote on. Measured: 27 tool calls and a sequence of 11 → 18 → 16 → 13 lines over the limit — it did not converge, because adding and shrinking ran against each other. Hence:

  1. Precondition: what exists is committed. While that holds, no wrong call is final — it is one git checkout away.
  2. Measure before touching anything:

    node ~/.claude/scripts/claude-md-audit.mjs CLAUDE.md

    Reports size in characters (lines are a readability hint only), the budget verdict and the largest sections.

  3. Read CLAUDE.md in full and collect the learnings by the criterion above. File them into EXISTING sections; a new section only for a genuinely new subject. Check existing entries twice while you are in there: "is this still true?" (does something point at code this session deleted or renamed?) and "is this too long?" — a correct but bloated entry is a legitimate compression target. Mark the 2–3 most bloated spots as this run's candidates; the audit's section list shows where they are.
  4. Do the arithmetic on paper, BEFORE writing. Count the characters you are adding and the ones you are cutting. N = additions − deletions − headroom to the SOFT budget (from the audit). Then:

    • N ≤ 0 → it fits, on to step 4.
    • N > 0, or the audit reported OVER HARD GATE → invoke the claude-md-hygiene skill (Skill tool, name claude-md-hygiene) with the brief "free up N characters, do not commit, hand back to me". Only once it returns do you file anything. Do not interleave the two — that was the loop that never converged.
    • Hygiene cannot reach N (nothing left to compress without losing a rule that still holds): do not break the gate. File only the learnings with the highest error-prevention value, as many as the budget takes, and report the rest as a proposal with reasoning. A lost learning is cheaper than a file that is too expensive in every session — and that call belongs to the user.
  5. Apply in ONE pass, through the Edit tool (batched, not through hand-written Python or PowerShell replacements — Edit makes the same exact replacement in one call, with no re-read and no quoting risk).
  6. Measure once afterwards (run the script again). Check referenced docs: N (0 missing) while you are there — a dead reference means content that was moved out is lost while the core file claims it is filed away. Then commit separately (docs: CLAUDE.md — …).
  7. Report: what was added, what changed, what was removed — one sentence of reasoning each — plus the before→after balance in characters. Net growth is the exception: the goal is that every session leaves the file the same size or smaller. If it grew, say why, here. If you are unsure whether a candidate holds permanently, ask rather than file.

Check at the end: does CLAUDE.md still point correctly at the doc and story structure, if this session changed it?

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.