specter-health

Measure cyclomatic complexity and detect dead code in codebases.

1|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/forbiddenlink/specter --skill specter-health
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specter-health
Source: https://github.com/forbiddenlink/specter/tree/main/plugin/skills/specter-health
Command: npx skills add https://github.com/forbiddenlink/specter --skill specter-health

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codebases often hide complexity and dead code, making maintenance risky and slow. specter-health surfaces health issues automatically to guide refactoring and risk assessment.

Core Features & Use Cases

  • Health Score (0-100) computed from multiple metrics
  • Complexity Distribution of functions by level
  • Complexity Hotspots listing with file path, line number, function name, and score
  • Dead code detection to surface unreachable or unused code
  • Recommendations for refactoring and maintenance
  • Use Case: Onboarding new team members, planning refactors, and architecture reviews to prioritize work based on risk and effort

Quick Start

Run npx specter-mcp health to generate a live health report for your repository.

Frequently Asked Questions about specter-health

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure codebase health and identify complexity hotspots?

Codebase health metrics identify complexity hotspots and dead code to calculate a 0-100 health score. This analysis surfaces maintenance risks by evaluating cyclomatic complexity and function distribution, providing actionable refactoring recommendations.

What is cyclomatic complexity and how does it indicate dead code?

Cyclomatic complexity measures the number of independent execution paths in source code functions to indicate structural risk. High complexity scores pinpoint maintenance hotspots, while dead code detection identifies unreachable or unused functions across the codebase.

How do I generate a codebase health report for architecture reviews?

To generate a codebase health report for architecture reviews, run the repository analysis command to evaluate complexity metrics. This produces a structured 0-100 health score, complexity distribution mapping, and targeted refactoring recommendations.

Can I detect dead code and calculate a health score for onboarding new developers?

Yes, you can detect dead code and calculate a 0-100 health score to streamline onboarding new developers. The generated report highlights complexity hotspots and maintenance risks, enabling new team members to understand structural health and prioritize refactoring efforts.

What metrics are used to calculate a codebase health score?

A codebase health score is calculated using metrics including cyclomatic complexity, complexity distribution of functions, and dead code detection. These measurements are combined to produce a 0-100 score and identify specific hotspots with file paths and line numbers.