The problem
Most CLAUDE.md files fail in the same ways: vague directives, missing commands, rules written as suggestions instead of instructions. These aren't obvious when you write the file. They show up as Claude doing the wrong thing, repeatedly, across sessions.
This linter finds those failures before they cost you time.
Usage
# Check ./CLAUDE.md claudemd-lint # Show specific fixes for each failure claudemd-lint --fix-hints # JSON output (for scripting) claudemd-lint --json # CI gate — exit 1 if score below 80 claudemd-lint --min-score 80
Example output
CLAUDE.md — CLAUDE.md ✗ Failures ✗ No vague directives [5pt] → Replace 'be careful' with specific rules. ✗ Has build or run commands [5pt] → Add: npm run dev, npm test, etc. ✗ References specific file structure [4pt] → Add a brief directory outline. ✓ Passing ✓ Has project description ✓ Mentions specific technologies ✓ No hardcoded secrets ... (14 more) Score: 71/100 ██████████████░░░░░░ Grade C → Run with --fix-hints to reach 80+.
CI integration
# GitHub Actions
- name: Lint CLAUDE.md
run: python3 bin/claudemd-lint --min-score 80 --jsonExit code 0 = passes threshold. Exit code 1 = below threshold or file not found. Drop it into any pipeline.
The 20 rules
No hardcoded secrets — 10 points
Scans for API key patterns (sk-, ghp_, Bearer tokens). Weighted 10 points because it's a security issue, not a style issue.
| Rule | Weight |
|---|---|
| Has project description | 5 |
| Has build or run commands | 5 |
| No vague directives | 5 |
| At least 100 words | 5 |
| Has explicit prohibitions | 4 |
| Mentions specific technologies | 4 |
| Has test instructions | 4 |
| Has naming conventions | 4 |
| References specific file structure | 4 |
| No AI vocabulary | 3 |
| Uses imperative voice | 3 |
| Doesn't explain Claude's identity | 3 |
| Under 3000 words | 3 |
| Mentions error handling | 3 |
| Documents environment variables | 3 |
| Has git workflow rules | 3 |
| Uses code blocks for commands | 3 |
| API rate limiting (if relevant) | 3 |
| No duplicate headings | 2 |
| No hardcoded secrets | 10 |
Requirements
Python 3.6 or newer. No packages. Works on macOS, Linux, and WSL.
$14
One-time download. CLI tool, zero dependencies.
Get CLAUDE.md Linter — $14
No-questions refund if it's not what you expected