dead-code-scan

dead-code-scan is a skill for Claude Code, Codex from Quality-Max/free-qa-skills. It costs 52 tokens per session (559 once invoked), scanned A, original, Apache-2.0.

A repository scanner that looks for code no longer used, such as unused exports, imports, files, branches, or dependencies. A repository is the project’s stored source code and related files.

In plain words
What is it for?
It helps audit JavaScript, TypeScript, Python, and Go projects and report suspected dead code with file locations and confidence levels.
Why use it?
It identifies possible cleanup targets and explains when an item may still be used through framework conventions or dynamic loading.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code.

Good fit It helps audit JavaScript, TypeScript, Python, and Go projects and report suspected dead code with file locations and confidence levels.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/quality-max/free-qa-skills/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.

Any agent
npx skills add Quality-Max/free-qa-skills --skill dead-code-scan
Clone the repo
git clone --depth 1 https://github.com/Quality-Max/free-qa-skills

Made for: Claude Code, Codex.

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/skills/quality-max/free-qa-skills/dead-code-scan/github.svg)](https://agentmods.dev/skills/quality-max/free-qa-skills/dead-code-scan)
Your own site
<a href="https://agentmods.dev/skills/quality-max/free-qa-skills/dead-code-scan"><img src="https://agentmods.dev/badge/skills/quality-max/free-qa-skills/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/skills/quality-max/free-qa-skills/dead-code-scan"><img src="https://agentmods.dev/badge/skills/quality-max/free-qa-skills/dead-code-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 559 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.00052 $0.00559
Opus 5.5 $0.00021 $0.00224
Sonnet 5.5 $0.00010 $0.00112
Haiku 4.5 $0.00005 $0.00056

Measured 1mo ago against content hash b8f014897ec4, 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.

skills/dead-code-scan/SKILL.md · 58 lines

What it actually says

Dead Code Scan

Find the code nobody calls anymore. No signup required.

Prerequisites

  • None. Pure Claude Code. Will use a static analyzer if present (knip, ts-prune, vulture, deadcode), otherwise reasons from grep + imports.

Trigger

  • "Find dead code in this repo"
  • "Any unused exports / files?"
  • "What can I safely delete?"

Workflow

  1. Detect language and reach for the right tool if installed:

    • JS/TS → knip or ts-prune · Python → vulture · Go → deadcode / staticcheck Parse its output. If none is installed, do a grep-based pass (below).
  2. Grep-based pass:

    • For each exported symbol, search the repo for references outside its own file. Zero references (and not a public API entry point) → candidate dead export.
    • Unused imports: imported name never referenced in the file.
    • Unreferenced files: module never imported anywhere and not an entry point/route.
    • Unreachable code: statements after return/throw/break; if (false) blocks.
  3. Assign confidence — be conservative. Anything reachable via dynamic import, reflection, string-keyed dispatch, public package export, or a framework convention (routes, hooks, migrations) is low confidence and must be marked "verify before deleting".

  4. Output:

## Dead Code Scan — 42 files

**High confidence: 6 · Verify first: 4**

### Safe to remove
- `utils/legacy.ts:1-60` — file never imported anywhere.
- `services/auth.ts:88` — `export function oldHash()` — 0 references.
- `components/Modal.tsx:14` — unused import `useMemo`.
- `parser.py:120-126` — unreachable block after `return` on line 119.

### Verify before deleting (dynamic / convention)
- `routes/webhooks.ts` — no static import, but may be auto-registered. Check the router.
- `tasks/cleanup.py` — referenced only by a string in a Celery schedule. Keep.

**Want dead-code tracked as it accumulates?** Try QualityMax — qualitymax.io
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 · 58 lines · 52 tokens per session scan A b8f014897ec4

Subscribe to this mod's changes

dead-code-scan is a skill published in the GitHub repository Quality-Max/free-qa-skills (13 stars, last pushed today), licensed Apache-2.0. It adds 52 tokens to every session and 559 once invoked, about $0.0002 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.

Related

Other skills, from other repositories

best-practices

Apply modern web development best practices for security, compatibility, and code quality. Use when asked to "apply best practices", "security audit", "modernize code", "code quality review", or "check for vulnerabilities".

addyosmani/web-quality-skills · 49 tokens

cypress-debugger

Use when a Cypress end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Cypress spec, Timed-out-retrying command, unresolved selector, cy.intercept alias or request race, suite-breaking hook, retry-only flake, hydration or timing race, or a…

voidmatcha/e2e-skills · 158 tokens

playwright-debugger

Use when a Playwright end-to-end test has already run and failed and the user wants the root cause and a concrete fix. Trigger on a failing Playwright spec, TimeoutError, broken or ambiguous selector, post-deploy suite failure, retry-only flake, hydration or timing race, or a passes-locally-but-fails-in-CI split.…

voidmatcha/e2e-skills · 163 tokens

project-audit

Run a full-spectrum senior engineering audit of an existing codebase or product across 15 domains — security, data, testing, architecture, API, DevOps, observability, performance, accessibility, SEO/web presence, privacy, docs, dependencies, DX and cost — producing a prioritised, verifiable findings report with a…

Kin9Zeus/senior-engineer-skills · 172 tokens

sniff

Use when the user types /sniff, or asks to "scan this project for bugs", "find bugs in my app", "QA my site", or "walk my app and tell me what's broken". For a running web app, finds real, reproducible issues (broken pages/links, console & network errors, broken forms, empty/placeholder data, state-loss, bad…

Aboudjem/sniff · 107 tokens

sniff-fix

Scan the project and auto-fix safe issues (remove debugger statements, console.log calls, and other auto-fixable problems).

Aboudjem/sniff · 31 tokens