/code-metrics:audit-suppressions [--json|--findings [--memory-dir <dir>]] [--all] [--base <ref>] [<path>...] [--repo <repo> ...]from code-metrics
Lists lint, type, coverage, and security suppression directives across many tools (ESLint, TypeScript, Pylint, Pyright, C#, RuboCop, etc.) with their rule IDs and reasons. Reports without verdict; useful for reviewing which suppressions are justified.
Ships in code-metrics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Current branch: !git branch --show-current 2>/dev/null || echo "unknown"
A suppression turns a linter or type checker off for one line, one block or one file. Three further
classes switch off the evidence a quality bar rests on, and the scanner lists them the same way:
coverage exclusions (istanbul, c8 and coverage.py), mutation-testing exclusions (Stryker) and
security-scanner suppressions (Bandit, Semgrep and Gitleaks). This skill lists all of them so a reader can see how many there are, which explain themselves, and which switch off
a rule the team counts as correctness rather than style.
It reports and stops: no pass or fail, and the report carries no severity (a --findings file
carries the tier its rule's row sets, below). Whether a suppression should go is the reader's call.
A suppression is justified when it carries a reason and, for a tool whose syntax can name
a rule, at least one rule id. TypeScript's @ts-ignore, @ts-expect-error and @ts-nocheck
cannot name an error, so a reason alone justifies them. Where a tool has a reason slot of its own,
the text there is the reason (ESLint and RuboCop after --, a Justification argument in C# and
PowerShell); otherwise a further comment on the same line is (a TypeScript directive's trailing
text, a second <!-- --> after a markdownlint directive, a // comment after @SuppressWarnings,
a second # comment after a Python or shell pragma). A directive with no reason on its line (a
comment directive, a #pragma warning disable, or a [SuppressMessage] or @SuppressWarnings
attribute) takes the comment lines directly above
it as its reason, as # jq filters are literal text. does for a # shellcheck disable=SC2016 on
the next line. A blank line, a code line, another directive,
a shebang or another tool's instruction (# shellcheck source=...) between them breaks that link.
So does a C# or Java documentation comment (///, or a /** ... */ block): it documents the
member, not the suppression, so it is never a reason.
Only real comments, pragmas and attributes count. A marker inside a string literal, a Markdown code span or a fenced code block in a Markdown file is not a suppression.
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" # lines the commits since the merge-base add
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" --base release/2.0 # the merge-base with another branch
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" --all # every suppression in the tree
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" src/ tools/build.sh # explicit paths, whole files
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" --json --all # the document instead of markdown
"${CLAUDE_SKILL_DIR}/scripts/audit-suppressions.sh" --findings # the report plus a findings file for /review:fanout fix
Append --user-file '${user_config.config_file}' to every script call, exactly as written:
it names the file holding your userConfig layer, and an empty or unsubstituted value means none
(${CLAUDE_PLUGIN_ROOT}/reference/config.md).
The change scope reads committed lines only: a suppression in an uncommitted edit is not in it until
it is committed, so name the file or use --all to see the working tree. scope.exclude and language
opt-outs apply as in the other audits.
A target form (--repo <repo> and the others) runs the script once per repository, as
${CLAUDE_PLUGIN_ROOT}/reference/several-repositories.md says, and never passes the form to the
script. Each repository's suppressions.correctness_rules marks its own rows, and a --findings
run writes one findings file per repository, under that repository's memory root and branch; a
--memory-dir given with a target form must be relative, and is read from each root.
Present the markdown report as printed, whole, with your notes after it: the scope, the counts, the correctness list with the layer
that set it, then one row per suppression (correctness rules first, then lines without a reason),
capped at 200 rows with the kept document named for the rest, then a Not read line naming each
text file in scope whose language the scanner has no kind for. The --json document
(code-metrics/suppressions/v1) carries scope, counts (suppressions, unjustified,
correctness), correctness_rules (rules, layer), suppressions, one object per row with
file, line, tool, rules, justified, reason and correctness, and unread, the paths of
those files.
--findings)--findings runs the same scan in the same scope, prints the same report, then writes one findings
file in the shape /review:fanout fix (if enabled) reads and prints its path. It asks nothing, so a pipeline or
another skill can run it. Bare invocation and --json write no findings file.
<memory root>/reviews/<branch-slug>/<UTC stamp>-suppressions.md, the
directory /review:fanout (if enabled) "Shared inputs" names. The memory root is .work under the repository
root; when the project's instructions name another memory root, pass it with --memory-dir. A
memory root with no .gitignore gets one holding *, and the run says so. An existing file is
never overwritten: a second run in the same second takes a -2 suffix.branch: matches the current branch.code-metrics/audit-suppressions/rule-no-reason when the line carries no
reason, and code-metrics/audit-suppressions/rule-no-rule-id when it carries a reason but no rule
id and the tool can name one. Each Finding cell leads with the rule id and what fired (the tool,
its rule ids, and the missing part); Location is the repo-relative file:line. Tier
(IMPORTANT), Confidence (high) and the fact that neither rule is auto-applicable come from
the two rules' rows in the detector-findings convention
(https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/docs/contracts/detector-findings/README.md,
"The severity crosswalk"), never from the finding. The Action names where this tool keeps its
reason, and asks for a rule id only where the tool can name one and the line names none.## Surfaces names the scope and how many suppressions were examined, and counts
each rule's declined candidates by the evidence that declined them: a reason on the line, a rule
id on the line, or a TypeScript directive, which cannot name an error. A run whose scope holds no
file writes no findings file.Whether a suppression goes or gets its reason is a human's call, so no row is auto-applicable: the fix pass surfaces the rows rather than applying them.
suppressions.correctness_rules lists the rule ids whose suppression the team wants to see first.
The plugin ships the list empty, because which rules guard correctness is the repository's call.
Set it in docs/conventions/code-metrics.yaml as a list of the repository's own rule ids (keys in
${CLAUDE_PLUGIN_ROOT}/reference/config.md).
A row is marked when one of its rule ids is listed, compared case-insensitively. A suppression that names no rule is not matched; for a tool that can name one, it is already unjustified. An invalid value (a scalar, a number in the list) is named with its file and key, and the key falls back to a valid higher layer or the empty default; the run continues.
The scanner behind this skill, scripts/suppression-scan.py, prints the count on its own:
python3 "${CLAUDE_SKILL_DIR}/scripts/suppression-scan.py" --count
# suppressions=<n>
# unjustified=<n>
/toolchain:ratchet (if enabled) can hold that count as a CI ceiling: it
vendors a copy of the scanner into the repository and ratchets the suppressions or unjustified
field. Without it, keep the --json document and compare counts by hand.
When you report the count, quote both lines as printed and the exact command that printed them, so the user can run it again as the counter.
The scanner reads no configuration: with no path it scans every tracked and untracked,
not-ignored file in the repository, and suppressions.correctness_rules marks nothing. The caller
passes the audit's resolved scope, so the frozen count and the report count the same files: name
the paths to count and give each scope.exclude glob with --exclude <glob> (repeatable), or
list the globs one per line in a file for --exclude-from <file>:
python3 "${CLAUDE_SKILL_DIR}/scripts/suppression-scan.py" --count \
--exclude 'vendor/' --exclude '**/generated/**' src/ tools/
A glob matches the repository-relative path in the same gitignore dialect scope.exclude uses. With
no --exclude the count is unchanged and includes any path scope.exclude would drop.
The marker catalog follows each tool's own directive syntax, read from these pages:
@ts-expect-error;
flake8, in-line ignoring;
Ruff, error suppression;
mypy, silencing the checker;
pylint, message control;
Pyright, comments;
ShellCheck, directives;
C# #pragma warning;
.NET, suppressing code analysis warnings;
golangci-lint, false positives;
PSScriptAnalyzer, suppressing rules;
markdownlint, configuration;
RuboCop, source code directives;
Java SuppressWarnings;
istanbul, ignoring code for coverage;
c8, ignoring lines;
coverage.py, excluding code;
Stryker, disable mutants;
Bandit, suppressing individual lines;
Semgrep, ignore code through nosemgrep;
Gitleaks, inline allow.docs/contracts/finding-suppression/, which holds
review findings a team chose to dismiss; this skill reads source comments and attributes./code-metrics:principles explains what each number
in this plugin can and cannot tell you.--findings run wrote: /review:fanout fix.--all (the usage error says which).B and digits); a test name after
nosec reads as the reason.*.txt is not read as shell. A text file with no known type is named on the Not read line, and
a --findings file counts it under Not examined; a binary file is passed over quietly.What SKILL.md sets; muted values are Claude Code's defaults
bash6 skills in this plugin
/auditMeasure code for changed file/diff, path, or tree (`--all`) vs reference (size `--check`): size (lines per file), complexity (per-function cyclomatic complexity, cognitive, Halstead), type-debt (typed ratio, mypy). Use when 'which files are too big', 'how complex is this code', 'how many anys'. Not for CRAP: /code-metrics:audit-coverage./audit-coverageAudit coverageRead coverage artifacts a build already wrote (lcov, Cobertura, coverage.py JSON, Go cover profile) to report line coverage and CRAP per file and function for a change, path, or tree; runs no tests, never gates. Use when 'coverage per function', 'CRAP score', 'read the lcov report'. Not for complexity alone: /code-metrics:audit./audit-duplicationAudit duplicationMeasure duplicated code and redundant copy-paste clone classes (DRY) across a change, path, or tree with instance spans, excluding repo-sanctioned replication. Reports, never gates. Use when 'find copy-paste code', 'clone detection', 'duplication report'. Not for file length: /code-metrics:audit size./principlesCode metrics knowledge baseMetric literacy for code-metrics: what each measure means, where reference values come from, and what none of them tell a reader; measures nothing. Use when: 'what does cyclomatic complexity mean', 'is CRAP a real metric', 'what is a good coverage number'. Not for running measurements: /code-metrics:audit./setupConfigure code-metrics: check probes Python, config layers, and collectors; apply writes docs/conventions/code-metrics.yaml (never installs tools).npx claudepluginhub melodic-software/claude-code-plugins --plugin code-metricsOther plugins' skills for the same job