A comprehensive linter and analyzer for Claude Code configurations. Keep your agent instructions clean, consistent, and effective by catching issues before they impact your workflow.
As your Claude Code configurations grow—spanning CLAUDE.md files, .claude/ directories, nested commands, skills, and subagents—it becomes increasingly difficult to:
- Track which files are actually being loaded into context
- Spot broken references, circular dependencies, or duplicate instructions
- Ensure instructions are clear, actionable, and conflict-free
- Estimate token usage and optimize context size
- Understand the full scope of what each agent sees
cclint solves this by analyzing your entire configuration graph, providing automated checks, interactive visualization, and intelligent insights.
Automated linting rules detect common problems across structural, content quality, and AI-powered categories:
Structural Issues
- Broken file references and URLs
- Circular dependencies
- Missing entrypoints for commands and skills
- Overly broad file permissions
- Missing tool or skill declarations
Content Quality
- Vague or unclear instructions
- Contradictory guidance
- Missing critical context
- Excessive verbosity
AI-Powered Analysis (via --deep flag)
- Duplicate instructions across scopes
- Subtle contradictions in guidance
- Clarity and actionability scoring
The interactive graph browser provides a complete view of your configuration structure:
- Navigate through main agent, subagents, commands, and skills
- See which files are loaded in each scope
- Track references between files
- Understand inheritance and nesting
- Preview file contents inline
Generate detailed reports showing:
- Reference maps across all configuration files
- Token usage estimates per scope
- File category breakdown
- Reference types (files, URLs, tools, MCP servers, skills)
Automatically resolve fixable problems with:
- Standard auto-fixes for structural issues
- AI-assisted fixes (via
--aiflag) for content improvements - Dry-run mode to preview changes
brew install pthm/tap/cclintgo install github.com/pthm/cclint/cmd/cclint@latest# Lint your configuration
cclint lint .
# View the interactive configuration graph
cclint graph .
# Generate a detailed report
cclint report .Check your configurations for issues:
# Basic linting (structural + content quality rules)
cclint lint
# Deep analysis with AI-powered rules (requires Claude API)
cclint lint --deep
# Lint specific directory
cclint lint /path/to/project
# Output as JSON
cclint lint --format json
# Specify agent type (default: claude-code)
cclint lint --agent claude-codeExplore your configuration hierarchy interactively:
# Launch interactive graph browser
cclint graph
# Print tree to stdout (non-interactive)
cclint graph --print
# Specify directory
cclint graph /path/to/projectInteractive Controls:
↑/k,↓/j- Navigate up/down←/h,→/l- Collapse/expand nodesEnter/Space- Toggle expand/collapser- Toggle reference displays- Toggle scope groupingq- Quit
Generate comprehensive configuration reports:
# Generate report with metrics and references
cclint report
# Output as JSON for programmatic use
cclint report --format json > report.jsonAutomatically fix issues:
# Auto-fix standard issues
cclint fix
# Preview fixes without applying (dry-run)
cclint fix --dry-run
# Enable AI-assisted fixes for content issues
cclint fix --ai
# Combine dry-run with AI fixes
cclint fix --ai --dry-runcclint versioncclint understands the full context hierarchy of Claude Code configurations:
- Agent-Aware Parsing - Loads agent profiles (like
claude-code.yaml) that define entrypoints, reference patterns, and priority markers - Scope Discovery - Identifies distinct scopes: main agent, subagents, commands, and skills—each with their own context boundaries
- Reference Tracking - Follows file references, URLs, tool declarations, MCP server connections, and skill invocations up to 5 levels deep
- Intelligent Analysis - Runs both heuristic and LLM-based rules that understand the semantic meaning of your instructions
- Context-Aware Reporting - Provides insights specific to each scope, helping you understand what each agent actually sees
- Pre-commit checks - Catch issues before they're committed
- Debugging context - Understand why an agent isn't seeing certain instructions
- Token optimization - Identify and reduce bloated configurations
- Team collaboration - Ensure consistent, high-quality agent configurations
- Configuration refactoring - Safely reorganize complex setups with confidence
See CLAUDE.md for:
- Build and development commands
- Architecture overview
- How to add custom linting rules
- Testing and contribution guidelines
This is an active project. Planned features include:
- Additional linting rules
- Performance optimizations for large codebases
- CI/CD integration examples
- Configuration migration tools
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT License - see LICENSE for details.