check-complexity

Measure code complexity and maintainability with radon CC and MI reports.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sunLeee/optimization --skill check-complexity
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-complexity
Source: https://github.com/sunLeee/optimization/tree/main/.claude/skills/quality/check/check-complexity
Command: npx skills add https://github.com/sunLeee/optimization --skill check-complexity

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill helps developers quantify code complexity and maintainability, enabling targeted refactoring and quality improvements.

Core Features & Use Cases

  • Measure Cyclomatic Complexity (CC) for functions and files using radon.
  • Compute Maintainability Index (MI) to gauge long-term maintainability.
  • Provide actionable insights to prioritize tests and refactors based on metric hotspots.

Quick Start

Run the complexity check on your codebase to obtain CC and MI scores and identify hotspots.

Frequently Asked Questions about check-complexity

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

FAQPage Schema
How do I measure code complexity and maintainability for my software project?

You can measure code complexity and maintainability by computing Cyclomatic Complexity (CC) and Maintainability Index (MI) scores to identify risk hotspots and guide refactoring. This provides actionable metrics for prioritizing tests and quality improvements.

What is the best way to identify code complexity hotspots for refactoring?

Identifying code complexity hotspots involves generating per-file and per-module CC and MI reports to pinpoint high-risk areas. These metrics enable targeted refactoring and help prioritize tests based on actionable complexity data.

Can I integrate static analysis metrics into my continuous integration pipeline?

Yes, you can integrate static analysis metrics into continuous integration by outputting actionable CC and MI scores suitable for CI pipelines. This automates code quality monitoring and provides maintainability data for quality dashboards.

Does this complexity analysis tool work with software projects of any size?

Yes, this complexity analysis applies to software projects of any size, enabling per-file and per-module CC and MI reports. It scales to identify maintainability hotspots across small and large codebases.

When do I need to compute the Maintainability Index for my codebase?

You need to compute the Maintainability Index (MI) when assessing long-term code maintainability and prioritizing technical debt reduction. MI scores provide actionable insights to guide refactoring and improve overall code quality.

Why use radon for static analysis instead of other code quality tools?

Using radon for static analysis provides specialized computation of Cyclomatic Complexity and Maintainability Index metrics to identify hotspots. It outputs actionable data tailored for CI integration and code quality dashboards.