ClaudeMap

Cyclomatic Complexity Skill

A Claude Code skill that measures cyclomatic complexity and refactors the worst hotspots — without gaming the metric.

Skills & Commandsskillcode-qualityrefactoringplugin

Built for AI-generated code that works but branches like a jungle: the skill measures complexity per function (radon, eslint, gocyclo, lizard, or manual count), respects your project's own linter thresholds, refactors the worst hotspots first — guard clauses, extracted functions, lookup tables, named predicates — and ends every pass with a before/after table. It explicitly refuses to game the metric: complexity moves into well-named functions, not into clever one-liners.

What it does

  • Measures per-function complexity with radon, eslint, gocyclo, lizard, or manual counting
  • Refactors worst hotspots first: guard clauses, extract function, lookup tables, named predicates
  • Respects your project's own linter thresholds when configured
  • Refuses to game the metric; ends every refactor with a before/after complexity table

When to use it

For teams merging lots of AI-generated code who want maintainability enforced as a loop, not a lecture.

Getting started

/plugin marketplace add saurabhkumar8112/cyclomatic-complexity-skill
/plugin install cyclomatic-complexity@cyclomatic-complexity-skill

# claude.ai: upload the .skill file from Releases (Settings → Capabilities → Skills)

Things to know

Complexity is one lens — the skill optimizes branch structure, not naming or architecture. Run it on hotspots, not the whole repo at once.

Repository

saurabhkumar8112/cyclomatic-complexity-skill

Charted

Related on the map

  • Guizang's agent skill turns your repo's recent updates into a finished promo video — real components, code-rendered animation, an original code-written soundtrack — no video editor involved.

    • agent-skill
    • video
    • promo
    • marketing
  • An agent skill that geolocates a photo with nothing readable in it — OSM geometry, elevation skylines and satellite tiles turn “where was this taken?” into a measured answer with an error radius.

    • agent-skill
    • geolocation
    • osint
    • openstreetmap
  • A skill that makes AI coding agents map the architecture and declare the blast radius before they touch a line of code — rendered as one standalone HTML page.

    • skill
    • architecture
    • code-visualization
    • change-scope