Pre-computed context
Current branch: !git branch --show-current 2>/dev/null || echo "unknown"
Variables
Arguments: $ARGUMENTS
The first word names the action; the rest passes to its script unchanged.
Actions
| Argument |
Measures |
Script |
Full process |
size |
Lines per file, every text file in every lane |
${CLAUDE_SKILL_DIR}/scripts/audit-size.sh |
actions/size.md |
complexity |
Per-function cyclomatic and cognitive complexity and Halstead difficulty |
${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh |
actions/complexity.md |
type-debt |
Typed-code percentage per file and per lane (TypeScript, Python) |
${CLAUDE_SKILL_DIR}/scripts/audit-type-debt.sh |
actions/type-debt.md |
With no action word, take the action from the request: file length or lines is size,
complexity is complexity, typing or any is type-debt. When the request names none of them,
list the three actions and ask which to run. Read the action's file before running its script; one
action per invocation.
Standing rules
- Every action reports and never gates: each number sits beside a reference with its provenance,
and nothing here is a pass, a fail, a finding or a severity.
- Run the action's bundled script; never count, estimate or grep the measure by hand.
- Scope is the change by default (the merge-base diff plus uncommitted files); explicit paths or
--all widen it, and --json prints the code-metrics/v2 document instead of markdown.
- Present the markdown report as printed. Keep the
--json document when the numbers feed a
comparison: /verification:measure metrics consumes it when the verification plugin is
installed (treat status: empty on either side as INCONCLUSIVE); otherwise keep it beside your
notes and compare by hand.
- A
null value is a number the collector did not produce, never zero.
- Nothing is installed; a missing collector is a row in the run table with its install hint.
Spoke paths
The actions/ files write this skill's directory as <skill-dir>, which is ${CLAUDE_SKILL_DIR},
and the plugin's root directory as <plugin-root>, which is ${CLAUDE_PLUGIN_ROOT}. Put those
paths in place of the placeholders before running a command: a ${…} token in a supporting file
is not one this plugin can rely on being expanded, either in the file or in the Bash tool. Where
each plugin variable resolves, and where it is exported: the plugins reference,
https://code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves, as of
2026-11-03; recheck when that table adds supporting files to where a ${…} reference resolves, or
the Bash tool starts receiving the plugin variables.
What this skill does not do
- It does not run tests, edit files, or install a collector.
- It does not judge: no reference is a bar, and no
check gate exists in this version.
- It does not measure duplication, coverage or suppressions; those are the sibling
audit-*
skills in this plugin, and /code-metrics:principles explains what each number can and cannot
tell you.
Next
- The numbers feed a before-and-after comparison:
/verification:measure metrics.
- A complex function's coverage and CRAP score are the real question:
/code-metrics:audit-coverage.
- A number is about to be quoted or read as a bar:
/code-metrics:principles.
Gotchas
- Change scope needs a merge-base with the default branch; outside a git repository, or on a
branch with no default-branch ancestor, pass paths or
--all (the usage error says which).
- The report
skill field and the dispatcher id stay audit-size, audit-complexity and
audit-type-debt: they name the producer, so reports taken before and after the move still
compare.
- Each action's own gotchas are in its file under
actions/.
1---2name: audit-173description: "Measure code for the changed files (the default), explicit paths, or the whole tree (`--all`), each number beside a configurable reference with its provenance. Reports, never gates. Actions: size (lines per file, every text file), complexity (per-function cyclomatic, cognitive and Halstead from collectors already installed), type-debt (typed-code percentage from type-coverage and mypy). Use when: 'how long are these files', 'lines per file', 'which files are too big', 'is this file over 1000 lines', 'how complex is this code', 'cyclomatic complexity', 'cognitive complexity', 'Halstead difficulty', 'how much of this is typed', 'type coverage', 'how many anys are in this', 'type debt'. Coverage and CRAP: /code-metrics:audit-coverage."4argument-hint: "<size|complexity|type-debt> [--json] [--all] [--base <ref>] [<path>...]"5user-invocable: true6disable-model-invocation: false7allowed-tools: ["Bash(${CLAUDE_SKILL_DIR}/scripts/audit-size.sh:*)", "Bash(${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh:*)", "Bash(${CLAUDE_SKILL_DIR}/scripts/audit-type-debt.sh:*)", "Bash(git branch --show-current:*)"]8shell: bash9metadata:10 source: https://skillmd.com/skills/melodic-software/audit-1711 workflow-stage: anytime12 summary: Lines, complexity and typed-code numbers beside cited references, no verdict13---1415## Pre-computed context1617Current branch: !`git branch --show-current 2>/dev/null || echo "unknown"`1819## Variables2021Arguments: `$ARGUMENTS`2223The first word names the action; the rest passes to its script unchanged.2425## Actions2627| Argument | Measures | Script | Full process |28|---|---|---|---|29| `size` | Lines per file, every text file in every lane | `${CLAUDE_SKILL_DIR}/scripts/audit-size.sh` | `actions/size.md` |30| `complexity` | Per-function cyclomatic and cognitive complexity and Halstead difficulty | `${CLAUDE_SKILL_DIR}/scripts/audit-complexity.sh` | `actions/complexity.md` |31| `type-debt` | Typed-code percentage per file and per lane (TypeScript, Python) | `${CLAUDE_SKILL_DIR}/scripts/audit-type-debt.sh` | `actions/type-debt.md` |3233With no action word, take the action from the request: file length or lines is `size`,34complexity is `complexity`, typing or `any` is `type-debt`. When the request names none of them,35list the three actions and ask which to run. Read the action's file before running its script; one36action per invocation.3738## Standing rules3940- Every action reports and never gates: each number sits beside a reference with its provenance,41 and nothing here is a pass, a fail, a finding or a severity.42- Run the action's bundled script; never count, estimate or grep the measure by hand.43- Scope is the change by default (the merge-base diff plus uncommitted files); explicit paths or44 `--all` widen it, and `--json` prints the `code-metrics/v2` document instead of markdown.45- Present the markdown report as printed. Keep the `--json` document when the numbers feed a46 comparison: `/verification:measure metrics` consumes it when the `verification` plugin is47 installed (treat `status: empty` on either side as INCONCLUSIVE); otherwise keep it beside your48 notes and compare by hand.49- A `null` value is a number the collector did not produce, never zero.50- Nothing is installed; a missing collector is a row in the run table with its install hint.5152## Spoke paths5354The `actions/` files write this skill's directory as `<skill-dir>`, which is `${CLAUDE_SKILL_DIR}`,55and the plugin's root directory as `<plugin-root>`, which is `${CLAUDE_PLUGIN_ROOT}`. Put those56paths in place of the placeholders before running a command: a `${…}` token in a supporting file57is not one this plugin can rely on being expanded, either in the file or in the Bash tool. Where58each plugin variable resolves, and where it is exported: the plugins reference,59<https://code.claude.com/docs/en/plugins/manifest-reference#where-each-variable-resolves>, as of602026-11-03; recheck when that table adds supporting files to where a `${…}` reference resolves, or61the Bash tool starts receiving the plugin variables.6263## What this skill does not do6465- It does not run tests, edit files, or install a collector.66- It does not judge: no reference is a bar, and no `check` gate exists in this version.67- It does not measure duplication, coverage or suppressions; those are the sibling `audit-*`68 skills in this plugin, and `/code-metrics:principles` explains what each number can and cannot69 tell you.7071## Next7273- The numbers feed a before-and-after comparison: `/verification:measure metrics`.74- A complex function's coverage and CRAP score are the real question:75 `/code-metrics:audit-coverage`.76- A number is about to be quoted or read as a bar: `/code-metrics:principles`.7778## Gotchas7980- Change scope needs a merge-base with the default branch; outside a git repository, or on a81 branch with no default-branch ancestor, pass paths or `--all` (the usage error says which).82- The report `skill` field and the dispatcher id stay `audit-size`, `audit-complexity` and83 `audit-type-debt`: they name the producer, so reports taken before and after the move still84 compare.85- Each action's own gotchas are in its file under `actions/`.