CLAUDE.md Linter (Free)

Run one command and see every way your CLAUDE.md, .claude/rules and AGENTS.md break the documented loading rules, before Claude silently ignores them.

CLAUDE.md Linter (Free) cover

What it does

Checks a repo's Claude Code instruction files offline, in a second, with no tokens spent: CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, nested CLAUDE.md files, .claude/rules//*.md and AGENTS.md. Good for CI and pre-commit.

python3 claude_md_lint.py                       # current project
python3 claude_md_lint.py path/to/repo --json   # for CI; exit 1 on errors
python3 claude_md_lint.py examples/messy-repo   # see everything it catches

What you get

The screenshot is real output from the kit’s own commands. Tested from a fresh download of this exact zip: ./run_tests.sh ran 10 tests OK on Python 3.13 and 3.10.

Real terminal output from CLAUDE.md Linter: demo and passing tests

What it checks (based on the Claude Code memory docs)

CheckWhy it matters
@path imports that don't exist, folders, cycles, chains deeper than 4 hopsClaude Code follows imports at most 4 hops; missing files silently load nothing
@"quoted path"quoted imports are not imported at all; escape spaces with a backslash instead
imports outside the projectClaude Code asks once to approve external imports
lines loaded per file, including imports, HTML comments excludedtarget is under 200 lines; imports don't reduce context cost
.claude/rules files: paths: that match no file, globs: used instead of paths:, .mdc files, broken frontmattera rule with no paths loads for every file; .mdc and globs are Cursor's format
AGENTS.md next to CLAUDE.md without @AGENTS.mdby default Claude Code reads CLAUDE.md instead of AGENTS.md
CLAUDE.local.md not in .gitignorepersonal notes get committed
npm/pnpm/yarn/bun run X where package.json has no script X; package manager that doesn't match the lockfile; make X with no such targetinstructions that point Claude at commands that don't exist
backticked paths like src/api/handlers/ that don't existstale layout notes
API keys / private keysinstruction files are committed and sent to the model
vague instructions ("write clean code", "test your changes")the docs recommend specific, checkable instructions

Path globs support , *, ?, braces (*.{ts,tsx}), and /*.md for the base directory only, as documented for paths:.

How it compares with /doctor prompt-audit

Claude Code's built-in audit asks Claude to review your instruction files (uses tokens, needs a session, proposes edits). This linter is deterministic and offline, so it can run in CI on every pull request. Use both.

Honest limits

Static checks only: it can't tell whether two instructions contradict each other in meaning, and it doesn't read ~/.claude/CLAUDE.md or managed policy files. Python 3.9+, no dependencies. ./run_tests.sh runs 10 test groups.

Format and license

Zip, 13 KB, v1.0, 22 files. Free to use, modify and share for any purpose, including commercial work, as long as this notice stays in copies. Not affiliated with or endorsed by Anthropic.

FAQ

Is it free?
Yes.
Does it call Claude?
No, it's an offline Python script, so it costs nothing to run in CI.
Does it check AGENTS.md?
Yes, including when Claude Code will or won't read it.
How do I get the files?
Click Download free. The zip downloads straight away: no checkout, no account.
Do I have to sign up for the newsletter?
No. The form is optional and the download works without it.

Get CLAUDE.md Linter (Free)

Free CLAUDE.md linter: broken @imports, files over 200 lines, .claude/rules paths that match nothing, AGENTS.md conflicts, dead npm scripts, leaked keys. Offline, CI-ready.

Pairs well with

DownloadFree

MCP Config Validator (Free)

Free MCP config validator and converter: check .mcp.json, .cursor/mcp.json, .vscode/mcp.json and claude_desktop_config.json for the mistakes that make servers silently fail.

View MCP Config Validator (Free)
Download$12

Cursor Rules for Next.js

11 Cursor rules for Next.js (Server/Client Components and more), written against current docs. Installs in one command, exports AGENTS.md. $12 once.

View Cursor Rules for Next.js
DownloadFree

Next.js Cursor Rules Starter (Free)

Free Next.js Cursor rules in .mdc format, checked against current Next.js docs, plus a linter that shows why a rule isn't applying.

View Next.js Cursor Rules Starter (Free)

Related