skills/agents-md/SKILL.md
Audits, scores, and refactors AGENTS.md and CLAUDE.md agent instruction files using execution-first standards: working commands, real-failure gotchas, signal-to-noise, and @import progressive disclosure. Runs a 12-check quick triage or a 49-check full audit with letter grades, then proposes minimal diffs. Use when asked to audit, review, score, refactor, or improve agent instruction files, fix stale commands, reduce bloat, write a new AGENTS.md, or when asking "my AGENTS.md is bad", "help me write a CLAUDE.md", or "improve my agent instructions". For SKILL.md skill files use agent-skills-creator; for general docs use docs-writing; for mining session history into instruction suggestions use the external cadence-advise skill where installed.
npx skillsauth add mblode/agent-skills agents-mdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
agent-skills-creator), project docs or READMEs (use docs-writing or readme-creator), or mining session history (use the external cadence-advise skill where installed; this skill audits the file as-is).AGENTS.md files are execution contracts, not knowledge bases. Two tests catch the two ways a line fails.
NEVER write comments becomes match the comment density of the file you are editing: shorter, no exception list to maintain, and correct in a densely commented file without being told.Absolutes still earn their place for safety, data loss, format contracts, and rules this repo's agents have actually been observed to break.
AGENTS.md is the tool-agnostic source of truth. Claude Code loads AGENTS.md, CLAUDE.md, and CLAUDE.local.md natively at any directory level, so Claude Code alone needs no symlink. A CLAUDE.md -> AGENTS.md symlink is still correct when the repo also targets tools that read only CLAUDE.md; it keeps one source of truth instead of two files to drift. If only a CLAUDE.md exists, recommend mv CLAUDE.md AGENTS.md.
| File | Read when |
|------|-----------|
| references/quick-checklist.md | Every audit; default 12-check triage |
| references/quality-criteria.md | Quick audit fails, file is high-risk, or full scoring requested |
| references/refactor-workflow.md | File is bloated (root over ~150 lines), stale, or below target |
| references/root-content-guidance.md | Root vs @import; file placement hierarchy |
| references/templates.md | Drafting or rebuilding a file from scratch |
No file exists? Skip the audit. Gather real commands from the manifest (package.json, Makefile, CI config), pick a skeleton from references/templates.md, fill it with verified commands and known gotchas, then validate against references/quick-checklist.md before delivering.
Copy this checklist to track progress:
Audit Progress:
- [ ] Step 1: Discover files
- [ ] Step 2: Select audit mode (quick or full)
- [ ] Step 3: Run audit and score
- [ ] Step 4: Report findings with score table
- [ ] Step 5: Propose minimal diffs
- [ ] Step 6: Validate changes
- [ ] Step 7: Apply and report before/after scores
find . \( -name "AGENTS.md" -o -name "CLAUDE.md" -o -name "CLAUDE.local.md" \) 2>/dev/null | sort
Also check ~/.claude/CLAUDE.md (applies to every session). For monorepos, include workspace-level files. Audit each level independently: root holds universal rules, child files hold directory-specific rules (see the placement hierarchy in references/root-content-guidance.md).
references/quick-checklist.md, target >= 10/12.references/quality-criteria.md, target >= 91% of applicable points (grade A). Use when the quick audit fails, the file gates a high-risk repo, or full scoring is requested.Score each root file independently; exclude N/A checks from the denominator.
Output a concise report before any edits:
## AGENTS.md Audit Report
| File | Mode | Score | Grade | Key Issues |
|------|------|-------|-------|------------|
| ./AGENTS.md | Quick | 6/10 | Fail | Missing test command, stale path, doc-heavy section |
Every issue in the table must map to a Step 5 diff; no vague findings.
In priority order:
@path/to/file.md imports.Show each change as a diff snippet with a one-line rationale. Apply only after the user confirms.
dev, test, build, lint/typecheck) where the environment allows; otherwise verify the script exists in the manifest and note the limitation.@imported path resolves..claude/skills/, ~/.claude/skills/), or against harness defaults. Where the overlap is deliberate, the file must say who wins, so the agent is told precedence instead of arbitrating it every task.Apply approved edits, re-score with the same checklist, report before/after scores and line counts. Per future PR, add at most one new gotcha, only if it prevented or fixed a real mistake.
@import lines don't evaluate inside code spans or fenced blocks: a real import wrapped in backticks silently never loads, while example imports inside fences are safe to show.@import chains stop resolving at 5 hops; deeper content silently disappears from context.~/.claude/CLAUDE.md; it loads every session, so one project's npm run dev becomes noise (or a wrong command) everywhere else.CLAUDE.local.md as strictly as AGENTS.md; it's gitignored personal config, so flag only broken commands and contradictions with the shared file.CLAUDE.md from the old #-hotkey habit. It loads every session, isn't repo knowledge, and drifts silently because nothing in the codebase contradicts it. Cut it to memory or CLAUDE.local.md.agent-skills-creator: authoring and improving SKILL.md files (different format and rules).cadence-advise skill where installed: proposes AGENTS.md/CLAUDE.md edits from observed session history; complements this skill's file-first audit.readme-creator / docs-writing: human-facing documentation; AGENTS.md content that belongs in docs should move there./doctor command: runs Anthropic's own rightsizing pass over skills and CLAUDE.md files. Complementary automated triage; it doesn't run the commands, so it never replaces Step 6.development
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
development
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
tools
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.