agentleFS
josephneumannjosephneumann/claude-corps/skills/claudemd-audit/SKILL.md

claudemd-audit

Skill4 starsChanged 8 months agoMITView on GitHub

Use when the user wants to audit CLAUDE.md files for bloat, staleness, misplacement, or information architecture issues. Invoked with /claudemd-audit. Supports --project, --global, --all scopes and --fix for auto-remediation. Use periodically or before shipping to ensure CLAUDE.md stays lean.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

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

    Every line in always-loaded context must pass: "Would removing this cause Claude to make mistakes?"

    line 9
  2. Very specific:

    No args / --project: Project CLAUDE.md + architecture

    line 13
  3. Distinctive:

    Use Grep/Read for evidence.

    line 30

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

CLAUDE.md Audit

Every line in always-loaded context must pass: "Would removing this cause Claude to make mistakes?"

Arguments

  • No args / --project: Project CLAUDE.md + architecture
  • --global: ~/.claude/CLAUDE.md + global skills/hooks
  • --all: Global + project + child dirs
  • --fix: Apply fixes interactively after report

Phase 1: Discovery

Map the architecture before auditing files. Use Glob/Read to find:

  • Always-loaded: ./CLAUDE.md + @imports, ~/.claude/CLAUDE.md + @imports, AGENTS.md
  • On-demand: .claude/skills/*/SKILL.md, child CLAUDE.md files
  • Enforcement: .claude/settings.json hooks, .pre-commit-config.yaml, .githooks/
  • Reference: docs/*.md, Makefile
  • Tooling: Linter configs, build systems (package.json, Cargo.toml, pyproject.toml)

Phase 2: Per-File Audit (28 checks)

Use Grep/Read for evidence. Do not guess.

A. Bloat — 1. Line count (flag >200, warn >150, target <100/<50 global) 2. Linter-territory rules (cross-ref linter configs) 3. Self-evident instructions ("write clean code") 4. Conventions Claude already knows 5. AI verbosity (reuse /humanizer patterns; 3+ triggers = flag) 6. Tutorials (>3 sentences, no actionable rule) 7. File-by-file descriptions (>10 lines)

B. Staleness — 8. Dead file refs (verify with ls) 9. Dead commands (check which/command -v) 10. Dead @import refs 11. Stale branch/PR refs (check git branch -a)

C. Misplacement — 12. Should be a hook (deterministic rules; redundant if enforced, suggest hook if not) 13. Should be a skill (domain knowledge >20 lines) 14. Should be in docs/ (>30 lines; use @import)

D. Duplication — 15. Global↔project overlap 16. CLAUDE.md↔skill overlap 17. CLAUDE.md↔hook overlap

E. Missing Essentials — 18. No build/test commands (Makefile/package.json exists but undocumented) 19. No branch conventions 20. Missing @imports for docs/ markdown

F. Structure — 21. Mixed concerns (commands + style + architecture blended) 22. Missing project CLAUDE.md (--all) 23. Unnecessary child CLAUDE.md

G. Architecture — 24. Always-loaded budget (CLAUDE.md + @imports + AGENTS.md total; flag >500 lines) 25. Tier separation (operational essentials only in CLAUDE.md; domain → skills; reference → docs) 26. Cross-ref hygiene (pointers not inlined content; no circular refs) 27. Makefile help target (reference make help instead of listing targets) 28. Hook coverage gap (advisory text vs deterministic enforcement)

Scoring (0-100)

Line count (15): 15/10/5/0 at <100/<150/<200/>200. Bloat (15): -3/finding. Staleness (10): -5/dead ref. Misplacement (15): -3/block. Duplication (10): -3/dup. Essentials (10): +5 build/test, +5 branch conventions. Structure (10): -3/issue. Architecture (15): +5 tiers, +5 budget, +5 cross-refs.

90+ Lean & well-architected / 70-89 Good / 50-69 Needs attention / <50 Overhaul

Output

Architecture table → per-file results table → category findings with line numbers → suggested improvements.

Fix Mode (--fix)

Report → ask which fixes to apply → Edit → re-audit for new score.

Gold Standard

Intactus (75 lines): three-tier progressive discovery. CLAUDE.md has branch workflow + Makefile commands + env vars + architecture pointers. Domain knowledge in .claude/skills/shadcn/ (hub-and-spoke). Deep reference in docs/. Every line passes the litmus test.

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.