agentleFS
moberghrmoberghr/mtk-agent-toolkit/.claude/skills/instructions/SKILL.md

instructions

Skill8 starsChanged 3 days agoMITView on GitHub

Audit AGENTS.md/CLAUDE.md for rot with verify-references/verify-commands, or capture a session's discovered commands and gotchas — append-only diffs, applied only with approval.

2 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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    audit: every 4–8 weeks, after a large refactor, or when sessions hit broken commands or dead paths ("AGENTS.md feels off").

    line 21
  2. Very specific:

    Shim integrity: When CLAUDE.md is a shim, confirm @AGENTS.md is present and bare (inside a code fence or backticks it is inert).

    line 46
  3. Very specific:

    Apply: only the approved subset as one Edit per change.

    line 49
  4. Very specific:

    Apply: only the approved subset with Edit, appended into the relevant section, never restructuring.

    line 58

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Instructions

Overview

Two modes over the project constitution, both append-only and approval-gated: audit re-grades what is there against the codebase and fixes rot; capture adds what this session learned that the constitution was missing.

When To Use

  • audit: every 4–8 weeks, after a large refactor, or when sessions hit broken commands or dead paths ("AGENTS.md feels off").
  • capture: at the end of a session that discovered a command, gotcha, env quirk or non-obvious pattern ("save what we learned", "remember this for next time").

When NOT To Use

  • First-time setup → /mtk-setup. Refreshing architecture-principles.md → /mtk-setup --audit.
  • An engineer correction → lessons capture (a lesson, not a constitution fact). Session state to resume → handoff.
  • Audit right after a clean audit, or capture mid-task — both manufacture churn.

Workflow

Both modes

  • Resolve the target first. The constitution is AGENTS.md when it exists, carries no Auto-generated by MTK marker in its first 10 lines, and CLAUDE.md is absent or a shim (a bare @AGENTS.md line); otherwise CLAUDE.md (legacy repo). bash scripts/resolve-constitution.sh answers the same question. No constitution → stop and point to /mtk-setup. Never migrate legacy → inverted as a side effect; that is /mtk-setup's regen-diff job.
  • Both files are protected (S1.5): Edit with explicit old/new strings, never Write, even when the engineer asks for a rewrite.

Audit mode

  1. Mechanical currency checks — run, do not eyeball.
    CONST="$(bash scripts/resolve-constitution.sh)"
    bash scripts/verify-references.sh "$CONST" .claude/rules/*.md   # exit 3 = STALE lines
    bash scripts/check-instruction-load.sh   # exit 1 = a file a harness truncates, shadows or ignores; 2/missing = report "not checked"
    Extract the constitution's build/test/lint/format commands as name<TAB>command lines and run them through bash scripts/verify-commands.sh --timeout 120. Never pass deploy, migrate, publish, push or anything that writes outside the tree — list those as unverified instead. Also run bash scripts/resolve-tech-stack.sh "$PWD": a constitution naming a different stack, or only the root's stack in a polyglot repo with per-subtree pins, is a currency finding.
  2. Shim integrity. When CLAUDE.md is a shim, confirm @AGENTS.md is present and bare (inside a code fence or backticks it is inert). A shim has no ## Critical Rules by design — not rot. Nested package files get a full pass only when they carry package-local content.
  3. Judge what scripts cannot: architecture clarity, captured gotchas, conciseness, and vague rules ("write good tests") that need a concrete replacement. A line that is true but belongs elsewhere gets Move → <named owner> (README, a rule file, a skill, the spec); the test: would a newcomer act differently because of this line here? No numeric grade — name the line and the reason.
  4. Report, then stop. List every STALE path and failed command with its line, the judgement findings, and proposed changes. A clean file is reported as clean; never invent issues. Ask: "Approve these changes? (yes / partial / no)"
  5. Apply only the approved subset as one Edit per change. Removals need per-line approval; "approve all" does not cover deletions. Then re-run step 1 on the edited file and confirm the line count moved less than 10%.

Capture mode

  1. Reflect. Which commands, gotchas, env/config quirks or patterns, had they been in the constitution at the start, would have saved time? None → say "nothing to capture" and stop.
  2. Destination. Project fact → the resolved constitution (nearest package file in a monorepo when the fact is local to one package). Harness-only quirk → that shim's own short section, rarely. First-person preference or machine path → CLAUDE.local.md (gitignored; check .gitignore before creating it). When in doubt it is a constitution fact, not a shim one.
  3. Dedupe. grep -in "<keyword>" AGENTS.md CLAUDE.md CLAUDE.local.md tasks/lessons.md. Already documented → update the line only if it is now wrong.
  4. Draft one line per concept, `<command or pattern>` — <why>, in the file's existing style. Budget: AGENTS.md 60–80 lines, hard cap 120; a CLAUDE.md shim 20. Over budget → move detail to .claude/rules/ or drop the weakest candidate. The proposal must also pass bash scripts/growth-gate.sh <target> <proposed>.
  5. Propose, then stop. Each addition as a diff with its destination and a one-line why. Ask: "Apply these? (yes / partial / no)"
  6. Apply only the approved subset with Edit, appended into the relevant section, never restructuring.

Verification

  • Target resolved (or /mtk-setup redirect); no Write on AGENTS.md/CLAUDE.md
  • Audit: verify-references.sh, verify-commands.sh and check-instruction-load.sh output cited, or "none found" stated
  • Every finding or addition names a line and a reason; no edits before approval; partial approval applied exactly
  • Capture: duplicates grep-checked; growth gate passed; AGENTS.md ≤ 120 lines and the shim ≤ 20 after edits
  • Personal items went to CLAUDE.local.md, not the committed file

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.