skills/validate-cc-md/SKILL.md
Validates CLAUDE.md files for size, imports, and structure. Use when user asks to "check my CLAUDE.md", "why is my CLAUDE.md too long", "validate imports", or "fix CLAUDE.md errors". Checks file size limits (30KB warning, 50KB error), @import directives, frontmatter in .claude/rules/, and section organization.
npx skillsauth add pdugan20/claudelint validate-cc-mdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Runs claudelint validate-claude-md to validate CLAUDE.md files including:
claudelint validate-claude-md $ARGUMENTS
--path <path> - Validate specific CLAUDE.md file--verbose - Show detailed output--warnings-as-errors - Treat warnings as errors--explain - Show detailed explanations and fix suggestionsUser says: "Claude keeps saying my instructions are too long and won't load them" What happens:
claudelint validate-claude-md@import .claude/rules/api.mdResult: User splits sections, CLAUDE.md now 28KB, Claude loads it successfully
User says: "I added @import .claude/rules/testing.md but Claude says the file doesn't exist" What happens:
.claude/rules/tests.md not testing.md (typo)Result: User fixes filename typo, import loads correctly
User says: "My .claude/rules/backend.md isn't applying when I edit backend files" What happens:
paths: "backend/*" (string) should be paths: ["backend/**/*"] (array with glob)Result: Rules now apply to backend directory correctly
Validate all CLAUDE.md files:
claudelint validate-claude-md
Validate specific file:
claudelint validate-claude-md --path /path/to/CLAUDE.md
Verbose output with explanations:
claudelint validate-claude-md --verbose --explain
paths field is string or arrayRules can be configured in .claudelintrc.json:
{
"rules": {
"claude-md-size": "warn",
"claude-md-import-missing": "error",
"claude-md-import-circular": "error"
}
}
Disable specific rules inline:
<!-- claudelint-disable size-warning -->
Large file content here...
<!-- claudelint-enable size-warning -->
Or disable for a single line:
<!-- claudelint-disable-next-line import-missing -->
@import non-existent-file.md
0 - No errors or warnings1 - Warnings found (or warnings treated as errors)2 - Errors foundCause: CLAUDE.md file is too large for Claude's context window
Solution: Split content into .claude/rules/ files using @import directives
Example: Move testing guidelines to .claude/rules/testing.md and add @import .claude/rules/testing.md to CLAUDE.md
Cause: @import directive points to a file that doesn't exist Solution: Check the path is correct relative to CLAUDE.md Common mistakes:
@import ../rules/testing.md (wrong - don't use ..)@import rules/testing.md (wrong - missing .claude/)@import .claude/rules/testing.mdCause: File A imports B which imports A (infinite loop) Solution: Reorganize imports to be one-directional Example: CLAUDE.md should import .claude/rules/ files, but those files should not import CLAUDE.md back
Cause: File is approaching the safe limit for Claude's context Solution: Not urgent, but consider splitting large sections into @imports Why 30KB? Claude can handle up to ~50KB, but staying under 30KB leaves room for growth and keeps context manageable
testing
A valid test skill for testing purposes. Use this when you want to test skill validation.
testing
This skill is missing the version field for testing purposes.
testing
This skill contains dangerous commands for testing security validation.
tools
Validates Claude Code skills for schema, naming, documentation, and security. Use when user asks to "check my skill", "validate skill syntax", "why isn't my skill loading", "skill errors", or "dangerous command detected". Validates SKILL.md frontmatter, allowed-tools, file references, directory organization, and shell script security.