CLAUDE.md Validator
The CLAUDE.md validator checks your project's CLAUDE.md files for correctness, size limits, import integrity, and content structure.
What It Checks
- File size limits (40KB default)
@importdirective syntax and referenced file existence- Circular import detection
- Import depth limits (max 5 levels)
- YAML frontmatter in
.claude/rules/*.mdfiles pathsglob pattern validity
Rules
This validator includes 15 rules. See the CLAUDE.md rules category for the complete list.
claude-md-sizeCLAUDE.md exceeds the maximum allowed size (40KB default)
claude-md-import-missingImported file does not exist at the specified path
claude-md-import-circularCircular import chain detected between files
claude-md-file-not-foundCLAUDE.md file not found in expected location
CLI Usage
bash
# Validate CLAUDE.md files only
claudelint validate-claude-md
# With verbose output
claudelint validate-claude-md --verbose
# With auto-fix
claudelint validate-claude-md --fixPlugin Skill
If you have the claudelint plugin installed, you can run this validator inside Claude Code with /validate-cc-md or by asking "Is my CLAUDE.md ok?"
See Also
- Claude Code Memory - Official CLAUDE.md documentation
- Configuration - Customize rule severity
- Troubleshooting - Common issues