/code-audit-tools:code-bloat-stingerfrom code-audit-tools
Audits a codebase for bloat by measuring code duplication (jscpd), unused code (knip, vulture, staticcheck), file/function size, and closure structure. Produces a banded verdict and split plans for large files.
Ships in code-audit-tools. 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.
Designed and built by Legion Code Inc.
Every path below (guides/, references/, scripts/) is relative to the folder that contains this SKILL.md. In Claude Code that folder is ${CLAUDE_SKILL_DIR}. If that text was not replaced with a real path, find the folder yourself (Glob for **/code-bloat-stinger/SKILL.md) and use it as SKILL_DIR in every command.
Node 20.19 or newer, Python 3.9 or newer, and Perl for cloc or a downloaded scc binary (Go or Cargo only for those repos). The commands in references/tool-commands.md are bash (env -i, bash arrays, [ ] tests): on Windows, run them in Git Bash or WSL, not PowerShell or cmd. The throwaway copy (audit-my-code-stinger/scripts/make_scratch_copy.py) and this skill's scripts/*.py are plain Python and run anywhere.
Answer "how bloated is this codebase, and why?" with numbers a founder can trust. The skill measures three kinds of bloat separately, because they have different causes and fixes: copy-pasted code (jscpd at two clone sizes, with both the standard and the both-copies figure), unused code (knip for JS and TS, vulture, deadcode, staticcheck or cargo tools elsewhere, always checked by hand before it is called dead), and shape (share of code in files over 1,000 lines, the largest functions, factory closures, and a split plan). It writes the bloat dimension of an Audit My Code run (01-bloat/) under the shared contract, and never changes the audited repository: every tool runs in a throwaway copy that is removed afterwards. The method reproduces a hand-run reference audit (WHIPT, 2026-09-30) on any repository.
bloat dimension of /audit-my-code at the vibe, basic, full, or mario tiersecurity-stinger and the framework security Drones (02-security/)quality-stinger (03-quality/)00-foundation/)mario tier and the owning engineering Dronedependency-audit-stingerguides/00-scoping-and-throwaway-copy.md. Read intake.json, make the copy with git archive, install pinned tools outside the copy, write the scope and file list, capture git status of the audited repo, pick the language route.guides/01-duplication-with-jscpd.md: 50 and 100 tokens, size and line caps lifted, scan coverage checked against the file list, then scripts/jscpd_recount.py for both copies, per area, big versus small files, and top pairs.guides/02-unused-code-with-knip.md: workspace-aware knip from outside the repo, a failing plugin disabled through an external config, a production-mode second view, then scripts/knip_summarize.py. For non-JS code use the tools in references/non-js-dead-code.md.guides/03-size-and-line-counts.md with cloc (--skip-uniqueness) or scc, then scripts/size_profile.py.guides/04-structure-and-split-planning.md with lizard and scripts/function_profile.py; read the largest files and write the split plan, including the context-object step for closures.guides/05-spot-check-and-false-positives.md: at least 12 flagged items classified Dead, False alarm, or Partial with a reason, then the truly-dead estimate as a share of core code lines.metrics.json, findings.jsonl, and notes.md per guides/06-bands-verdict-and-contract-output.md. List raw artifacts under ## Evidence in notes.md (the orchestrator builds evidence-index.md). Run scripts/validate_outputs.py and fix every error..scratch/, and report to the orchestrator: verdict, headline measures, caps lifted, and anything not run.| Path | Load when |
|---|---|
guides/00-scoping-and-throwaway-copy.md | Always first |
guides/01-duplication-with-jscpd.md | Running or reading jscpd |
guides/02-unused-code-with-knip.md | Running knip or a language dead-code tool |
guides/03-size-and-line-counts.md | Counting lines, big-file share |
guides/04-structure-and-split-planning.md | Largest functions, closures, split plans |
guides/05-spot-check-and-false-positives.md | Before calling anything dead |
guides/06-bands-verdict-and-contract-output.md | Banding, verdict paragraph, writing outputs |
references/tool-commands.md | Any command line; pinned versions |
references/bands.md | Banding a measure, choosing severity, setting the verdict |
references/false-positive-classes.md | Classifying a flagged item |
references/non-js-dead-code.md | Python, Go, Rust, or another language in scope |
references/output-templates.md | Writing metrics.json, findings.jsonl, notes.md |
references/REFERENCE.md | Script inputs and outputs; raw folder layout |
references/research/distilled-code-bloat.md | Verifying a tool behavior or a band, settling a dispute |
| Source research archive (not shipped with the plugin) | Source-repository only; the shipped distillation summarizes it, do not require it |
scripts/*.py | As each guide directs; every script has --help |
bloat dimension./audit-my-code.security-stinger - Security dimension; overlaps only where dead code hides a vulnerable path.quality-stinger - Quality dimension, run after security in the full and mario tiers.dependency-audit-stinger - Vulnerable or outdated dependencies, as opposed to unused ones.Designed and built by Legion Code Inc. Licensed under AGPL-3.0-or-later.
README.md (opens in a new tab)guides/00-scoping-and-throwaway-copy.md (opens in a new tab)guides/01-duplication-with-jscpd.md (opens in a new tab)guides/02-unused-code-with-knip.md (opens in a new tab)guides/03-size-and-line-counts.md (opens in a new tab)guides/04-structure-and-split-planning.md (opens in a new tab)guides/05-spot-check-and-false-positives.md (opens in a new tab)guides/06-bands-verdict-and-contract-output.md (opens in a new tab)references/REFERENCE.md (opens in a new tab)references/bands.md (opens in a new tab)references/false-positive-classes.md (opens in a new tab)references/non-js-dead-code.md (opens in a new tab)references/output-templates.md (opens in a new tab)references/research/distilled-code-bloat.md (opens in a new tab)references/tool-commands.md (opens in a new tab)scripts/function_profile.py (opens in a new tab)scripts/jscpd_recount.py (opens in a new tab)scripts/knip_summarize.py (opens in a new tab)scripts/size_profile.py (opens in a new tab)scripts/test_symlinks.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
JavaScript, TypeScript, Python, Go, Rust
code-bloat, duplication, dead-code, code-audit, repo-analysis
npx claudepluginhub legioncodeinc/vibe-coding-tools --plugin code-audit-tools13 skills in this plugin
/audit-my-code-stingerOrchestrates /audit-my-code. Five tiers (foundation, vibe, basic, full, mario) of codebase audits, dispatched to paired Drones and delivered as a Legion Code Inc. brief./code-audit-brief-stingerRender the Audit My Code brief, one self-contained Field Guide styled HTML file per run, from the workspace only. Escapes repo text, merges duplicates, prints cleanly to PDF./code-forensics-stingerReview software vendor engagements using contracts, invoices, messages and delivery records. Produce cited evidence drafts for human or counsel review. Read README.md for the guide map.Other plugins' skills for the same job