Need AI Training/Help?CloudYeti.io/meet
MarkdownMe
Agent instruction guide

CLAUDE.md Best Practices Checklist — Audit Your File Against 8 Rules

Run your CLAUDE.md through eight checks: size, specificity, exact commands, anti-patterns, structure, contradictions, enforcement, and staleness.

Direct answer

Audit a CLAUDE.md against eight checks. Size: under 200 lines. Specificity: every rule concrete enough to verify, so 'run npm test before committing' not 'test your changes'. Commands: build, test, and lint with exact flags and any non-default tool named. Anti-patterns: two real mistakes your team has hit, which beat generic guidance. Structure: markdown headers and bullets, not dense paragraphs. Contradictions: no rule that conflicts with another CLAUDE.md up the tree or in .claude/rules/. Enforcement: anything that must always happen moved to a hook. Staleness: no commands or paths that no longer exist.

Open CLAUDE.md Reviewer

When to use this

  • You inherited a CLAUDE.md and want a systematic pass over it.
  • You are standardizing CLAUDE.md files across several repositories.
  • The file has not been reviewed since it was generated by /init.

Steps

  1. Paste the full CLAUDE.md into the reviewer and read the numbered findings.
  2. Count the lines. Over 200, move sections into path-scoped rules or skills.
  3. Replace every rule you cannot verify with a concrete instruction naming a command or path.
  4. Confirm the build, test, and lint commands are exact, including flags and the actual test runner.
  5. Add two anti-patterns the team has really hit, then remove any rule Claude already follows without being told.
  6. Verify every command and path in the file still exists in the repository.

Example review focus

CLAUDE.md excerpt
# CLAUDE.md

## About
Our app is a modern, scalable platform built with best-in-class tooling.

## Guidelines
- Write maintainable code.
- Add tests where appropriate.
- Use TypeScript.

## Setup
Run yarn install and yarn start.
What to fix
Fails six of eight checks. The About section is marketing and changes nothing. All three guidelines are unverifiable. The commands are stale if the repo moved to npm. Rewrite: `npm run dev` for the dev server, `npm run test` (Vitest, not Jest), `npm run lint` before any commit, plus two real anti-patterns — do not edit files under src/generated/, and do not add a dependency without asking.

Common mistakes

  • Do not treat a passing checklist as enforcement; CLAUDE.md guides behavior, hooks and permissions block it.
  • Do not keep stale commands; a wrong command is worse than a missing one, because Claude will run it.
  • Do not add rules for behavior Claude already gets right; each extra rule dilutes the ones that matter.
  • Do not skip the contradiction check in a monorepo; ancestor CLAUDE.md files load too, and claudeMdExcludes can skip the irrelevant ones.

FAQ

How often should I audit my CLAUDE.md?
Audit after any workflow change — a new test runner, deploy target, or directory move — and whenever the agent repeats the same mistake. Quarterly pruning keeps stale rules from accumulating.
What is the single highest-value line in a CLAUDE.md?
The exact test command with its flags and runner named. It is used constantly, Claude cannot always infer it from package.json alone, and getting it wrong wastes a full loop every session.
Should every rule have an enforcement mechanism?
Rules that must never be violated should. Back those with a PreToolUse hook, a CI check, or a lint rule, and treat the rest of the file as advisory guidance that shapes behavior without guaranteeing it.
Does /init produce a good CLAUDE.md?
It produces a starting point from what Claude discovers in the codebase. Refine from there by adding what Claude could not discover — conventions, anti-patterns, and rationale — and cutting the parts it can simply read from the code.

Related CLAUDE.md guides

Desk gear for long writing sessions

A few things that help if you write docs, tickets, and specs on a laptop all day.

Amazon affiliate links. We earn a commission on qualifying purchases at no extra cost to you.