Loading...
Loading...
Creates or audits a CLAUDE.md file — the ambient project-context document Claude Code loads at session start. Use when user says 'create a CLAUDE.md', 'audit our CLAUDE.md', 'is our CLAUDE.md any good', 'our CLAUDE.md is out of date', 'make CLAUDE.md load-bearing', or 'write scope-level CLAUDE.md'. Do NOT use for skills (use create-or-audit-skill), agents (use create-or-audit-agent), or user-facing documentation (use write-doc).
npx skill4agent add thommann/skills create-or-audit-claude-mdCLAUDE.mdprinciples/02-dense-not-brief.mdCLAUDE.mdskills/meta/create-or-audit-claude-md/templates/CLAUDE.mdskills/meta/create-or-audit-claude-md/templates/CLAUDE.subdir.mdskills/meta/create-or-audit-claude-md/lib/validate.sh# Top-level shape
ls -la
find . -maxdepth 2 -type d -not -path '*/node_modules*' -not -path '*/.git*'
# Build/test/lint commands (look in all the usual places)
cat package.json 2>/dev/null | jq '.scripts // {}'
cat pyproject.toml 2>/dev/null | grep -A 20 '\[tool\.' | head -40
cat Makefile 2>/dev/null | grep -E '^[a-zA-Z_-]+:'
cat justfile .justfile 2>/dev/null
ls .github/workflows/ 2>/dev/null
# Entry points
git log --pretty=format: --name-only -200 | sort | uniq -c | sort -rn | head -30src/apps/packages/services/lib/CLAUDE.md# Recent bug fixes reveal invariants
git log --oneline --all | grep -iE 'fix|bug' | head -30
# ADRs if they exist
ls docs/adr docs/decisions docs/arc42/decisions 2>/dev/null
# "Do not edit this" and "DANGER" comments in the code
grep -rniE 'DO NOT|DANGER|CAREFUL|WARNING|HACK|FIXME|TODO' --include='*.py' --include='*.ts' --include='*.js' --include='*.go' --include='*.rs' | head -30root.md.templateskills/meta/create-or-audit-claude-md/templates/CLAUDE.mdpnpm testCLAUDE.mdskills/meta/create-or-audit-claude-md/SKILL.mdbash skills/meta/create-or-audit-claude-md/lib/validate.sh CLAUDE.mdgrep -oE '`[a-zA-Z_./-]+/[a-zA-Z_.-]+`' CLAUDE.md | sort -u | while read p; do
path=$(echo "$p" | tr -d '`')
[ ! -e "$path" ] && echo "STALE: $p"
doneneverdon'tdo notinsteaduse X insteadpreferCLAUDE.md## CLAUDE.md Audit: {path}
### Verdict: APPROVE | REVISE | REJECT
### Gate results
...
### Stale references (must fix)
{List of paths that no longer exist}
### Duplicated tooling rules (remove these — point at the tool)
...
### Missing sections
...
### Proposed additions to "Things to Know"
{From your discovery in step 2}# Validator passes
bash skills/meta/create-or-audit-claude-md/lib/validate.sh CLAUDE.md
# Expected: VERDICT: PASS
# No stale file references
grep -oE '`[a-zA-Z_./-]+/[a-zA-Z_.-]+`' CLAUDE.md | tr -d '`' | while read p; do
[ ! -e "$p" ] && echo "STALE: $p"
done
# Expected: empty output| Mistake | Correction |
|---|---|
| Padding to reach a line count | Dense, not bulky. A 150-line file with every line load-bearing beats a 400-line mix. |
| Embedding a 30-line code snippet | Reference the file (principle 04): |
| Restating every linter rule | Point at the tool ( |
"Don't use | Pair with "Use |