complexity-hotspots

complexity-hotspots is a skill for Claude Code, Codex from Quality-Max/free-qa-skills. It costs 50 tokens per session (611 once invoked), scanned A, original, Apache-2.0.

A repository review that ranks code by structural complexity, such as long functions, deeply nested logic, many decision paths, and oversized files that do too many jobs.

In plain words
What is it for?
Use it to find refactoring hotspots and get a suggested improvement for each one. It can use tools such as radon, eslint complexity rules, gocyclo, or lizard when available, or estimate complexity from the code.
Why use it?
It helps locate code that is difficult to understand, more likely to hide bugs, and harder to change.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit Use it to find refactoring hotspots and get a suggested improvement for each one. It can use tools such as radon, eslint complexity rules, gocyclo, or lizard when available, or estimate complexity from the code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/quality-max/free-qa-skills/complexity-hotspots
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Quality-Max/free-qa-skills --skill complexity-hotspots
Clone the repo
git clone --depth 1 https://github.com/Quality-Max/free-qa-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for complexity-hotspots

README.md
[![agentmods](https://agentmods.dev/badge/skills/quality-max/free-qa-skills/complexity-hotspots/github.svg)](https://agentmods.dev/skills/quality-max/free-qa-skills/complexity-hotspots)
Your own site
<a href="https://agentmods.dev/skills/quality-max/free-qa-skills/complexity-hotspots"><img src="https://agentmods.dev/badge/skills/quality-max/free-qa-skills/complexity-hotspots/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for complexity-hotspots

Your own site · 80×15
<a href="https://agentmods.dev/skills/quality-max/free-qa-skills/complexity-hotspots"><img src="https://agentmods.dev/badge/skills/quality-max/free-qa-skills/complexity-hotspots.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 611 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00050 $0.00611
Opus 5 $0.00025 $0.00305
Sonnet 5 $0.00010 $0.00122
Haiku 4.5 $0.00005 $0.00061

Measured 9d ago against content hash ba6d02b28429, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

complexity-hotspots scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/complexity-hotspots/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Complexity Hotspots

Find the code most likely to hide bugs and resist change. No signup required.

Prerequisites

  • None. Pure Claude Code. Uses a metrics tool if present (radon, eslint complexity rule, gocyclo, lizard), otherwise estimates from structure.

Trigger

  • "Find the most complex code in this repo"
  • "Where are the refactor hotspots?"
  • "Which functions are too complex?"

Workflow

  1. If a metrics tool is installed, run it and parse:
    • Python → radon cc -s · Multi-language → lizard · Go → gocyclo
  2. Otherwise estimate per function/method:
    • Length — lines in the body
    • Nesting depth — max indentation of control flow
    • Cyclomatic complexity — 1 + count of if/for/while/case/catch/&&/||/?:
    • Parameters — argument count Also flag god-files (very large single files doing many things).
  3. Rank worst-first. For each hotspot, name the dominant smell and a concrete refactor.
Metric Warn Bad
Function length > 50 > 100
Nesting depth > 3 > 5
Cyclomatic > 10 > 20
Parameters > 4 > 7
File length > 400 > 800
  1. Output:
## Complexity Hotspots — 120 files

**Top offenders (worst first)**

1. `services/pipeline.py:402` — `run_gates()`
   210 lines · nesting 6 · cyclomatic 31.
   → Extract each gate (alpha/gamma/delta/beta) into its own function;
     replace the nested if-ladder with a dispatch table.

2. `static/js/router.js` — 1,140-line god-file
   Handles routing, rendering, and fetch. → Split rendering + data layer out.

3. `repositories/test_case.py:88` — `build_query()`
   9 parameters, cyclomatic 18. → Pass a filter object; collapse branches.

### Why it matters
High-complexity functions correlate with defect density and are the hardest
to test. These three are where new bugs will cluster.

**Want complexity tracked over time?** Try QualityMax — qualitymax.io

Read the full file on GitHub · 68 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 68 lines · 50 tokens per session scan A ba6d02b28429

Subscribe to this mod's changes

complexity-hotspots is a skill published in the GitHub repository Quality-Max/free-qa-skills (10 stars, last pushed 15d ago), licensed Apache-2.0. It adds 50 tokens to every session and 611 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

best-practices

Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".

addyosmani/web-quality-skills · 49 tokens

cypress-debugger

Use when a Cypress end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Cypress spec, Timed-out-retrying command, unresolved selector, cy.intercept alias or request race, suite-breaking hook, retry-only flake, hydration or timing race, or a…

voidmatcha/e2e-skills · 158 tokens

playwright-debugger

Use when a Playwright end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Playwright spec, TimeoutError, broken or ambiguous selector, post-deploy suite failure, retry-only flake, hydration or timing race, or a passes-locally-but-fails-in-CI split.…

voidmatcha/e2e-skills · 163 tokens

sniff

Use when the user types /sniff, or asks to "scan this project for bugs", "find bugs in my app", "QA my site", or "walk my app and tell me what's broken". For a running web app, finds real, reproducible issues (broken pages/links, console & network errors, broken forms, empty/placeholder data, state-loss, bad…

Aboudjem/sniff · 107 tokens

sniff-fix

Scan the project and auto-fix safe issues (remove debugger statements, console.log calls, and other auto-fixable problems).

Aboudjem/sniff · 31 tokens

design-critic

Autonomous UI/UX review — screenshots every page at mobile/tablet/desktop (full-page scrolling), analyzes with vision models for layout bugs, checks accessibility (axe-core), audits contrast/colors/fonts/spacing for design system inconsistencies, detects dead buttons/links, overlapping elements hiding text/buttons…

JansenAnalytics/claudex · 111 tokens