
from dotfiles-claude10
Practical guide to quantitative code-quality metrics (cyclomatic, cognitive, Halstead, maintainability index) with thresholds, formulas and measurement commands
This skill explains quantitative code-quality metrics and how to measure them across languages. It covers cyclomatic complexity, cognitive complexity, Halstead measures, maintainability index, coupling and cohesion metrics, and practical thresholds for action. The guide includes formulas, example calculations, and commands for tools like ESLint, Radon and SonarQube.
Use when assessing whether a codebase or specific functions meet maintainability and complexity thresholds, during code reviews, automated quality gates, or when planning refactors. It’s useful for developers, reviewers and agents asked to evaluate technical debt or to produce reports on complexity and maintainability.
references/ directory with measurement-tools and threshold guidance (has_references=true)Agents that can run static analysis tooling or suggest refactors (CI automation, code-review bots, Claude Code, Copilot) will benefit most. Agents that can call ESLint, radon or sonar-scanner will be able to produce measured reports.
This skill has not been reviewed by our automated audit pipeline yet.