audit-complexity

audit-complexity is a skill for Claude Code from melodic-software/claude-code-plugins. It costs 101 tokens per session (2,580 once invoked), scanned A, original, MIT.

A code-measurement workflow that reports cyclomatic complexity, cognitive complexity, and Halstead difficulty for supported programming languages. These measures describe how many paths, mental steps, or operators a piece of code contains.

In plain words
What is it for?
Use it to inspect function-level or file-level complexity in TypeScript, JavaScript, Python, Bash, and Go using tools already installed on the machine.
Why use it?
It gives comparable measurements for a change, path, or codebase without turning them into automatic pass or fail judgments. It also reports when no suitable measurement tool is available.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the code-metrics plugin — 6 skills shipped together

Good fit Use it to inspect function-level or file-level complexity in TypeScript, JavaScript, Python, Bash, and Go using tools already installed on the machine.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add melodic-software/claude-code-plugins
Claude Code
/plugin install code-metrics

Made for: Claude Code.

Or install code-metrics, the plugin that ships this one along with the rest of its 6 skills.

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 audit-complexity

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-complexity/github.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-complexity)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-complexity"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-complexity/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 audit-complexity

Your own site · 80×15
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-complexity"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-complexity.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,580 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.00101 $0.02580
Opus 5.5 $0.00040 $0.01032
Sonnet 5.5 $0.00020 $0.00516
Haiku 4.5 $0.00010 $0.00258

Measured 28d ago against content hash 661bcc5ee9c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

audit-complexity 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 28d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/audit-complexity.sh, scripts/audit-complexity.test.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/code-metrics/skills/audit-complexity/SKILL.md · 156 lines

How it starts

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

Pre-computed context

Current branch: !git branch --show-current 2>/dev/null || echo "unknown"

Purpose

Complexity is the measure with the most citable reference on the operator's list and the most folklore around it. This skill reports the numbers, per function where the collector reports per function, beside references whose provenance is printed with them, and stops there: no pass or fail, no severity, no finding. Whether a complexity of 23 is worth changing is the reader's call.

Collectors are tried in order per lane and the first that resolves is used. Nothing is installed, downloaded, or fetched at run time; a lane with no resolvable collector reports that in the run table and the other lanes still run.

Lane Cyclomatic Cognitive Halstead difficulty
TypeScript/JavaScript lizard, then ESLint's core complexity rule eslint-plugin-sonarjs multimetric, per file
Python lizard, then radon cc -j no maintained collector found; the row says so radon hal -j, per function, then multimetric
Bash shellmetrics, then multimetric no collector found; the row says so multimetric, per file
Go lizard, then gocyclo gocognit multimetric, per file
C# deferred deferred deferred

lizard and radon report a start and an end line per function; gocyclo, gocognit, shellmetrics, and the two ESLint rules report a start line only, and their rows are labeled start-line-only. multimetric has no per-function granularity at all, so its rows are per file, carry function: null, and are labeled file-level. Its Bash cyclomatic figure is labeled multimetric-approximation because it under-counts against a per-function parser.

Run it

"${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh"                    # the change: merge-base diff plus uncommitted files
"${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh" src/ lib/parse.py  # explicit paths (a missing one is a usage error)
"${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh" --all              # every tracked or untracked-but-not-ignored file
"${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh" --json --all src/  # the code-metrics/v2 document instead of markdown

Read the full file on GitHub · 156 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 28d ago Changed 661bcc5ee9c7
  2. 1mo ago Changed 959a0f95820c
  3. 1mo ago Changed 867cb7843542
  4. 2mo ago Changed 05081880e603
  5. 2mo ago Changed 7fecdc12a4ad
  6. 2mo ago Changed · -151 tokens per session eea0a215ded5
  7. 2mo ago Changed b58369249cbd
  8. 2mo ago Changed · +1 lines a6b68add6e49
  9. 2mo ago Changed · +26 lines d72fc2a7d43f
  10. 2mo ago First seen · 129 lines · 252 tokens per session scan A f3299359d0e2

Subscribe to this mod's changes

audit-complexity is a skill published in the GitHub repository melodic-software/claude-code-plugins (33 stars, last pushed today), licensed MIT. It adds 101 tokens to every session and 2,580 once invoked, about $0.0004 per session on Opus 5.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-09-06.

Related

audit-complexity compared with skills from other repositories

audit-complexity next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
audit-complexitymelodic-software/claude-code-pluginsSkill33todayMITA101Claude Code
imagegenopenai/codexSkill137ktodayApache-2.0A113Codex
playwright-climicrosoft/playwrightSkill101ktodayApache-2.0A19Claude Code
browser-automationopenclaw/openclawSkill395ktodayMITA36Claude Code
systematic-debuggingobra/superpowersSkill330k2d agoMITA21Claude Code
free-llm-apismnfst/awesome-free-llm-apisSkill14kyesterdayCC0-1.0A113Claude Code, Codex
next-cache-components-adoptionvercel/next.jsSkill144ktodayMITA95Claude Code