Introduction
claudelint is a comprehensive linter for Claude Code projects. It validates CLAUDE.md files, skills, settings, hooks, MCP servers, plugins, and more.
Installation
npm install --save-dev claude-code-lintOr install globally:
npm install -g claude-code-lintQuick Start
# Initialize configuration
claudelint init
# Validate your project (check-all is the default command)
claudelintWhat Gets Validated
claudelint checks 10 different aspects of your Claude Code project:
- CLAUDE.md - File size, imports, paths, content structure
- Skills - Names, descriptions, security, versioning
- Settings - Permissions, environment variables
- Hooks - Event types, script references
- MCP Servers - Transport types, URLs, environment variables
- Plugins - Manifest structure, component references
- Agents - Names, descriptions, tools, models
- LSP - Transport config, language IDs, extensions
- Output Styles - Name validation
- Commands - Migration checks
Configuration
Run claudelint init to set up configuration interactively. The quickest option is the Recommended preset, which enables a curated subset of rules:
{
"extends": "claudelint:recommended"
}You can also create a .claudelintrc.json manually with per-rule overrides:
{
"extends": "claudelint:recommended",
"rules": {
"skill-missing-changelog": "off",
"skill-body-too-long": "error"
}
}Extend a preset and override specific rules
See the Rules Overview for all available rules.
Use with Claude Code
claudelint is also available as a Claude Code plugin, giving you slash commands directly inside Claude Code sessions. The plugin wraps the CLI, so the npm package must be installed first.
claudelint install-pluginKey skills include:
/claudelint:validate-all— Run all validators at once/claudelint:optimize-cc-md— Interactively optimize your CLAUDE.md/claudelint:format-cc— Auto-format Claude Code files
See the Claude Code Plugin Guide for setup instructions and the full list of skills.