find-dead-code

find-dead-code is a skill for Claude Code, Codex from tobihagemann/turbo. It costs 78 tokens per session (3,147 once invoked), scanned A, original, MIT.

An analysis workflow for finding production code that is not referenced anywhere useful, including unused exports and functions.

In plain words
What is it for?
Use it to inspect source directories, separate test references from production references, and recommend whether unused code should be removed or investigated.
Why use it?
It helps identify code that can confuse maintainers or add unnecessary complexity, while treating code used only by tests as unused in production.

Skill for Claude CodeCodex

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

Good fit Use it to inspect source directories, separate test references from production references, and recommend whether unused code should be removed or investigated.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tobihagemann/turbo/find-dead-code
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 tobihagemann/turbo --skill find-dead-code
Clone the repo
git clone --depth 1 https://github.com/tobihagemann/turbo

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/tobihagemann/turbo/find-dead-code.svg)](https://agentmods.dev/skills/tobihagemann/turbo/find-dead-code)
Your own site
<a href="https://agentmods.dev/skills/tobihagemann/turbo/find-dead-code"><img src="https://agentmods.dev/badge/skills/tobihagemann/turbo/find-dead-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,147 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 45
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Excessive Agency · line 53
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
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.00078 $0.03147
Opus 5 $0.00039 $0.01573
Sonnet 5 $0.00016 $0.00629
Haiku 4.5 $0.00008 $0.00315

Measured 8d ago against content hash e39e1beb0da0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

find-dead-code 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 8d 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.

claude/skills/find-dead-code/SKILL.md · 180 lines

How it starts

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

Find Dead Code

Identify dead code in a codebase. Core rule: code only used in tests is still dead code. Only production usage counts.

In an incomplete or abandoned implementation, a declared-but-unused symbol may be intended-but-not-yet-used. When git history shows it was added as a deliberate part of an unfinished stack, recommend investigate rather than delete.

Step 1: Detect Languages, Scope & Test Boundaries

Determine the project structure:

  1. Check for config files: package.json, tsconfig.json, pyproject.toml, setup.py, Package.swift, .xcodeproj, Cargo.toml, go.mod, pom.xml, build.gradle
  2. Glob for source files: **/*.ts, **/*.py, **/*.swift, **/*.go, **/*.rs, **/*.java
  3. Identify source roots — where production code lives (e.g., src/, lib/, Sources/)
  4. Partition the codebase into analysis units by top-level source directories (e.g., src/auth/, src/api/, src/utils/, lib/models/). Each directory becomes one subagent's scope in Step 3.

If the user specified a scope, restrict analysis to that scope.

Test File Patterns

Establish which files are test files. Code referenced ONLY from these locations is dead.

Language Test file patterns
TS/JS *.test.{ts,tsx,js,jsx}, *.spec.{ts,tsx,js,jsx}, __tests__/**, __mocks__/**, *.stories.{ts,tsx,js,jsx}
Python test_*.py, *_test.py, tests/**, test/**, conftest.py
Swift *Tests.swift, *Test.swift, Tests/**, *UITests.swift, XCTestCase subclasses
Go *_test.go, testdata/**
Rust tests/**, benches/**, #[cfg(test)] modules (inline test modules within source files)
Java/Kotlin src/test/**, *Test.java, *Tests.java, *Spec.java, *Test.kt
General fixtures/**, __fixtures__/**, mocks/**, testutils/**, testhelpers/**, spec/**

Also exclude: test runner configs (jest.config.*, vitest.config.*, pytest.ini), storybook files, benchmark files.

Read the full file on GitHub · 180 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. 8d ago First seen · 180 lines · 78 tokens per session scan A e39e1beb0da0

Subscribe to this mod's changes

find-dead-code is a skill published in the GitHub repository tobihagemann/turbo (402 stars, last pushed yesterday), licensed MIT. It adds 78 tokens to every session and 3,147 once invoked, about $0.0004 per session on Opus 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-30.

Related

Other skills, from other repositories

error-translator

A Chinese-language assistant that translates English programming errors and explains what they mean. It covers common errors from languages and frameworks including Python, JavaScript, TypeScript, Java, and others.

laolaoshiren/claude-code-skills-zh · 28 tokens

eslint-fix

A project-aware assistant for finding and fixing ESLint errors, warnings, and configuration compatibility problems. ESLint is a tool that checks JavaScript and TypeScript code for style and common mistakes.

laolaoshiren/claude-code-skills-zh · 79 tokens

perf-profiler

A performance investigation guide that uses repeatable measurements and profiling evidence to find where software spends time or resources. Profiling records runtime activity such as CPU use, memory use, database work, or network delays.

laolaoshiren/claude-code-skills-zh · 78 tokens

log-analyzer

A log-analysis helper that reads application and system logs to find unusual patterns and likely causes. Logs are records of events such as errors, requests, warnings, and service activity.

laolaoshiren/claude-code-skills-zh · 24 tokens

serena

Semantic code understanding with IDE-like symbol operations. Use when: (1) Large codebase analysis (>50 files), (2) Symbol-level operations (find, rename, refactor), (3) Cross-file reference tracking, (4) Project memory and session persistence, (5) Multi-language semantic navigation. Triggers: "find symbol", "rename…

Dianel555/DSkills · 105 tokens

offensive-bug-identification

Systematic bug identification methodology: source code review patterns, black-box testing strategies, taint analysis, dangerous function hunting, data flow tracing, and automated scanning setup. Use for code audits, bug bounty triage, or building vulnerability identification pipelines.

SnailSploit/Claude-Red · 0 tokens