project-health-auditor
Multi-dimensional code health analysis with complexity, churn, and test coverage - identifies technical debt hot spots
Installation
Open Claude Code and run this command:
/plugin install project-health-auditor@claude-code-plugins-plus
Use --global to install for all projects, or --project for current project only.
What It Does
MCP Server Plugin for Claude Code
Analyze local repositories for code health, complexity, test coverage gaps, and git churn patterns. Get multi-dimensional insights into your codebase health combining complexity metrics, change frequency, and test coverage.
Features
4 Powerful MCP Tools
1. listrepofiles - File Discovery
- List all files in a repository with glob pattern matching
- Exclude patterns (node_modules, .git, dist, build)
- Returns file count and full file list
2. file_metrics - Code Health Analysis
- Cyclomatic complexity calculation
- Function/method counting
- Comment ratio analysis
- File size and line count
- Health score (0-100) based on multiple factors
3. git_churn - Change Frequency Analysis
- Identify files that change frequently
- Track authors per file
- Find hot spots in your codebase
- Analyze commit patterns over time
4. map_tests - Test Coverage Mapping
- Map source files to test files
- Identify files missing tests
- Calculate test coverage ratio
- Get actionable recommendations
How It Works
Quick Analysis
Analyze the health of /path/to/my-project
Claude will use the MCP tools to:
- List all source files
- Analyze complexity of key files
- Check git churn patterns
- Map test coverage
Individual Tool Usage
List Repository Files:
Use list_repo_files on /path/to/repo with globs ["src/**/*.ts", "lib/**/*.js"]
Analyze File Metrics:
What's the complexity of src/services/auth.ts?
Check Git Churn:
Show me the most frequently changed files in the last 6 months
Map Tests:
Which files are missing tests in this project?
Use Cases
1. Pre-Refactoring Analysis
Before refactoring, identify:
- High complexity files (complexity > 10)
- High churn files (commits > 10)
- Files missing tests
Strategy: Refactor high-complexity, high-churn files first.
2. Code Review Preparation
Analyze changed files:
What's the complexity of the files I changed in the last commit?
3. Test Coverage Improvement
Find critical files without tests:
Which files in src/services/ are missing tests?
4. Technical Debt Identification
Combine metrics to find problematic files:
- High complexity + High churn + Missing tests = Technical debt hot spot
5. Onboarding New Developers
Show new team members:
- Most frequently changed files
- Core files with good health scores
- Areas needing test coverage