dead-code-scan

dead-code-scan is a command for Claude Code from mathisk2095/jko-claude-plugins. It costs 16 tokens per session (1,688 once invoked), scanned A, original, MIT.

A read-only scan for code that is no longer used, imports that are unnecessary, repeated code, and leftover debugging code. It works across projects and adapts its checks to the detected programming language.

In plain words
What is it for?
Use it to inspect a project for dead code, unused imports, duplicates, debug artifacts, and other code-quality issues before deciding what to remove.
Why use it?
It helps identify clutter and possible maintenance risks without changing files or removing anything automatically.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the dead-code plugin — 1 skill, 2 commands shipped together

Good fit Use it to inspect a project for dead code, unused imports, duplicates, debug artifacts, and other code-quality issues before deciding what to remove.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/mathisk2095/jko-claude-plugins/dead-code-scan
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.

Clone the repo
git clone --depth 1 https://github.com/mathisk2095/jko-claude-plugins

Made for: Claude Code.

Or install dead-code, the plugin that ships this one along with the rest of its 1 skill, 2 commands.

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 dead-code-scan

README.md
[![agentmods](https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/dead-code-scan/github.svg)](https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/dead-code-scan)
Your own site
<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/dead-code-scan"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/dead-code-scan/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 dead-code-scan

Your own site · 80×15
<a href="https://agentmods.dev/commands/mathisk2095/jko-claude-plugins/dead-code-scan"><img src="https://agentmods.dev/badge/commands/mathisk2095/jko-claude-plugins/dead-code-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,688 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.00016 $0.01688
Opus 5.5 $0.00006 $0.00675
Sonnet 5.5 $0.00003 $0.00338
Haiku 4.5 $0.00002 $0.00169

Measured 1mo ago against content hash 537487e4c919, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dead-code-scan 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 1mo 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.

plugins/dead-code/commands/dead-code-scan.md · 148 lines

How it starts

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

Dead Code Scan

Comprehensive scan for dead code across the project. Reports findings without making changes. Use /dead-code-clean to actively remove.

CRITICAL: This is a scan, not a fix. Document issues thoroughly with clear evidence and confidence levels. Use /dead-code-clean to remove issues after the scan.

First: Use the dead-code-expert skill for detection catalog, language tools, and false-positive awareness.

Preparation

  1. Detect the project language from file extensions and config files (package.json, Cargo.toml, pyproject.toml, go.mod, *.csproj, Package.swift).
  2. Identify entry points (main, index, App, etc.).
  3. Determine the target. If no target specified, scan from project root focusing on source directories.

Automated Scans

Run all applicable scans based on detected language.

Universal Scans (all languages)

# Debug artifacts
rg -c '(console\.log|print\(|dbg!\(|println!\(|debugger|breakpoint\(\)|System\.out\.print)' . --glob '!*test*' --glob '!*spec*' --glob '!node_modules*' --glob '!target*' --glob '!.git*' --glob '!__pycache__*' 2>/dev/null | awk -F: '{s+=$2} END {print "Debug artifacts:", s+0}'

# Lint suppressions hiding dead code
rg -c '(#\[allow\((dead_code|unused)|eslint-disable.*unused|# noqa: F4|@SuppressWarnings.*unused|#pragma warning disable)' . --glob '!node_modules*' --glob '!target*' 2>/dev/null | awk -F: '{s+=$2} END {print "Lint suppressions:", s+0}'

# Commented-out code (heuristic)
rg -c '^\s*(//|#)\s*(const|let|var|function|class|import|from|if|for|while|return|def |fn |pub |async |await )\b' . --glob '!node_modules*' --glob '!target*' 2>/dev/null | awk -F: '{s+=$2} END {print "Commented code:", s+0}'

# TODO/FIXME/HACK markers
rg -c '\b(TODO|FIXME|HACK|XXX|TEMP|TEMPORARY)\b' . --glob '!node_modules*' --glob '!target*' 2>/dev/null | awk -F: '{s+=$2} END {print "TODO/FIXME/HACK:", s+0}'

# Skipped tests
rg -c '(@skip|@ignore|xit\(|xdescribe\(|\.skip\(|#\[ignore\]|\[Ignore\]|@Disabled|@pytest\.mark\.skip)' . --glob '*test*' --glob '*spec*' 2>/dev/null | awk -F: '{s+=$2} END {print "Skipped tests:", s+0}'

Read the full file on GitHub · 148 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. 1mo ago First seen · 148 lines · 16 tokens per session scan A 537487e4c919

Subscribe to this mod's changes

dead-code-scan is a command published in the GitHub repository mathisk2095/jko-claude-plugins (3 stars, last pushed 4d ago), licensed MIT. It adds 16 tokens to every session and 1,688 once invoked, about $0.0001 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-08-31.