Skip to content

Claude Code Plugin

This guide covers how to install and use claudelint as a Claude Code plugin.

Installation

The plugin's skills run claudelint CLI commands under the hood. You must install the npm package first:

npm install --save-dev claude-code-lint

See Getting Started for full installation options.

From GitHub

Install directly from GitHub:

bash
/plugin install github:pdugan20/claudelint

From Local Package

If you've installed the npm package, you can load the plugin from your local node_modules:

bash
/plugin install --source ./node_modules/claude-code-lint

This gives you both the CLI commands and the Claude skills.

Skills

Once installed, the plugin adds 9 skills that Claude can use automatically. Ask naturally or invoke directly with /claudelint:<name>.

Validation

validate-all

Runs every validator on your entire project — CLAUDE.md, skills, settings, hooks, MCP servers, and plugin manifests.

validate-cc-md

Checks CLAUDE.md file size, @import directives, frontmatter, and section organization.

validate-skills

Checks SKILL.md frontmatter, allowed-tools, file references, and shell script security.

validate-settings

Checks settings.json schema, permissions, and environment variables.

validate-hooks

Checks hooks.json events, matcher patterns, and command script references.

validate-mcp

Checks .mcp.json transport types, server names, and environment variables.

validate-plugin

Checks plugin.json manifest schema, versioning, and component references.

Quality and Optimization

format-cc

Auto-formats Claude Code files with markdownlint, prettier, and shellcheck.

optimize-cc-md

Interactive workflow to reduce CLAUDE.md size, remove generic content, and organize @import files.

See the CLI Reference for all available flags when using slash commands directly.

Automatic Validation

Set up a SessionStart hook to validate automatically when Claude Code starts.

Create .claude/hooks/hooks.json:

json
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "claudelint check-all --format compact"
          }
        ]
      }
    ]
  }
}

See Claude Code Hooks for more hook examples.

Configuration

The plugin respects your project's configuration files:

  • .claudelintrc.json — Rule configuration
  • .claudelintignore — Files to ignore

See the Configuration Guide for details.

Troubleshooting

Skills Don't Appear

If slash commands aren't available:

  1. Check plugin is installed: /plugin list
  2. Reinstall if needed: /plugin uninstall claudelint then reinstall
  3. Restart Claude Code session

Validation Fails

If validation returns errors:

  1. Run with --explain flag for detailed guidance
  2. Check .claudelintrc.json for rule configuration
  3. See error messages for specific line numbers and fixes
  4. Review Rules Reference for rule details

Permission Denied

If you get permission errors:

  1. Check claudelint is installed: which claudelint
  2. Install globally if needed: npm install -g claude-code-lint
  3. Check PATH includes npm global bin directory

False Positives

If you get warnings/errors that shouldn't apply:

  1. Use inline disable comments: <!-- claudelint-disable rule-name -->
  2. Configure rules in .claudelintrc.json
  3. Add file overrides for specific patterns
  4. Report issue if rule is incorrect

Uninstalling

To remove the plugin:

bash
/plugin uninstall claudelint

See Also