agentleFS
vignesh-nagarajan-vnvignesh-nagarajan-vn/claude-workflow-skills/skills/agent-contract/SKILL.md

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

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    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.

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

    Start from repo-scout, whose map is most of the input:

    line 22
  2. Distinctive:

    Every line costs tokens in every future session.

    line 43
  3. Very specific:

    When a section grows past that, it belongs in docs/, and CLAUDE.md keeps a one-line pointer.

    line 45
  4. Distinctive:

    Write what a session cannot derive by reading the code:

    line 51
  5. Distinctive:

    Do not write API documentation, function-by-function descriptions, or a changelog.

    line 58
  6. Very specific:

    Update the affected section, do not rewrite the file.

    line 62

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

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

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.py

It 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.py

Then 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:

  1. One-line purpose and a Last verified date.
  2. What the project is, in two or three paragraphs, including the framing that is not derivable from the code.
  3. A vocabulary table, when the domain has terms a newcomer would guess wrong.
  4. An architecture map: the tree, annotated inline, only to the depth that matters.
  5. What is authoritative versus archived, when the repo has superseded generations.
  6. Conventions, meaning the rules a session would otherwise violate.
  7. Commands.
  8. 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.

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.