Skip to content

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

Or install globally:

npm install -g claude-code-lint

Quick Start

bash
# Initialize configuration
claudelint init

# Validate your project (check-all is the default command)
claudelint

What 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:

json
{
  "extends": "claudelint:recommended"
}

You can also create a .claudelintrc.json manually with per-rule overrides:

.claudelintrc.json
{
  "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.

bash
claudelint install-plugin

Key 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.