Skip to content

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)
  • @import directive syntax and referenced file existence
  • Circular import detection
  • Import depth limits (max 5 levels)
  • YAML frontmatter in .claude/rules/*.md files
  • paths glob pattern validity

Rules

This validator includes 15 rules. See the CLAUDE.md rules category for the complete list.

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 --fix

Plugin 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