agent-contract
Skill4 starsChanged 10 days agoMITView on GitHub
Write, refresh, or audit a repo's CLAUDE.md onboarding contract so future sessions start from it instead of re-exploring. Use when a repo has no CLAUDE.md and will be worked in again, when asked to update or check it, when its paths or commands have gone stale, and after any change to layout, commands, or conventions. Runs scripts/verify_claude_md.py.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- TheVeller/claude-skillstheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- TheVeller/claude-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- claim-traceSkill
- docs-syncSkill
- llm-evalsSkill
- llm-pipelineSkill
- prose-guardSkill
- readme-brandSkill
- repo-scoutSkill
- session-handoffSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Start from repo-scout, whose map is most of the input:
- Distinctive: line 43
Every line costs tokens in every future session.
- Very specific: line 45
When a section grows past that, it belongs in docs/, and CLAUDE.md keeps a one-line pointer.
- Distinctive: line 51
Write what a session cannot derive by reading the code:
- Distinctive: line 58
Do not write API documentation, function-by-function descriptions, or a changelog.
- Very specific: line 62
Update the affected section, do not rewrite the file.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
agent-contract
A good CLAUDE.md pays back more tokens than anything else in a repo. It is read once per session and replaces the exploration that would otherwise happen every session. A stale one is worse than none, because it is trusted and wrong.
Auditing an existing file
python <skill>/scripts/verify_claude_md.pyIt reports dead path references, commands that no longer exist in package.json or the Makefile, how far the freshness date has drifted from the last commit, and whether the file has outgrown its ceiling. Fix what it finds before trusting anything else in the file.
Flags: --max-lines N to change the ceiling (default 200), --file PATH for a non-standard location, --json.
Writing a new one
Start from repo-scout, whose map is most of the input:
python <skill>/../repo-scout/scripts/repo_scout.pyThen follow the section order in references/format.md. Read that file when writing or restructuring, not for a small edit.
The short version of the format:
- One-line purpose and a
Last verifieddate. - What the project is, in two or three paragraphs, including the framing that is not derivable from the code.
- A vocabulary table, when the domain has terms a newcomer would guess wrong.
- An architecture map: the tree, annotated inline, only to the depth that matters.
- What is authoritative versus archived, when the repo has superseded generations.
- Conventions, meaning the rules a session would otherwise violate.
- Commands.
- Gotchas.
The ceiling is the point
Every line costs tokens in every future session. Target under 200 lines.
When a section grows past that, it belongs in docs/, and CLAUDE.md keeps a one-line pointer. Deep methodology, deploy steps, and API detail are the usual candidates. The contract's job is to route, not to contain.
A section that only restates the file tree is not earning its lines, repo-scout regenerates that on demand for free.
What actually belongs in it
Write what a session cannot derive by reading the code:
- Why the architecture is the way it is, and which parts are load-bearing.
- Decisions already made and rejected, so they do not get re-litigated.
- Rules with consequences: what must never be edited, what must stay in sync.
- Which directory is current when several look plausible.
Do not write API documentation, function-by-function descriptions, or a changelog. Those go stale fastest and the code is authoritative.
Refreshing
Update the affected section, do not rewrite the file. Bump the Last verified date only when you have actually checked the claims, not merely edited nearby text. A date that lies is the failure mode this whole file exists to prevent.
Prose follows prose-guard's rules.
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.

