Borrowing it
Nothing to install: this file belongs to AlexisBalayre/claude-code-power-config. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AlexisBalayre/claude-code-power-config/main/.claude/skills/find-dead-code/SKILL.mdgit clone --depth 1 https://github.com/AlexisBalayre/claude-code-power-configWrote 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.
[](https://agentmods.dev/skills/alexisbalayre/claude-code-power-config/find-dead-code)<a href="https://agentmods.dev/skills/alexisbalayre/claude-code-power-config/find-dead-code"><img src="https://agentmods.dev/badge/skills/alexisbalayre/claude-code-power-config/find-dead-code.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.01247 |
| Opus 5 | $0.00014 | $0.00624 |
| Sonnet 5 | $0.00005 | $0.00249 |
| Haiku 4.5 | $0.00003 | $0.00125 |
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 7d 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.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Find Dead Code
Surface candidates. Never delete. The user verifies and removes.
Rules
- Detect and report only. Do not run
rm,git rm, or edit imports as part of this skill. - A candidate is a hypothesis, not a verdict. Every candidate ships with the verification recipe below; the user runs the final eye.
- Scope before running. Ask the user which area: a single package, a service, or the whole repo. Repo-wide scans are slow and noisy; one subsystem at a time produces actionable lists.
- No em-dash in output. Project convention.
Categories
Pick the category the user asked about, or run all four if they said "find dead code" with no scope.
A. Unreferenced files
Files (typically role-suffixed: *.service.ts, *.manager.ts, *.adapter.ts, *.component.tsx) that no other file imports.
Detection: for each candidate file path/to/foo.service.ts, grep the repo for from ".*foo.service", from ".*foo\.service", and the bare basename foo.service as a string. If zero non-self matches across apps/, services/, packages/, flag it.
B. Unused exports
Named exports that nothing imports. If knip is configured (knip.json at the repo root), run pnpm knip, adding --include-entry-exports to also surface unused exports of entry files; otherwise grep per export. Cross-check survivors by grep: for export const fooBar, search import.*\bfooBar\b across the repo.
C. Dead feature flags
Flags in the feature_flags table whose key is never checked in code.
- Dump current flag keys via
pnpm --filter @acme/acme-db exec tsx src/seed/dump-feature-flags.script.ts(or readpackages/acme-db/src/seed/feature-flags.script.tsdirectly). - For each key, grep for
useFeatureFlag("<key>"),hasFeatureFlag("<key>"), and the bare quoted key string acrossapps/andservices/. - Zero hits = candidate. Also flag flags where the only hit is the seed file itself.
D. Orphan kebab-role modules across workspaces
A packages/* export that no apps/* or services/* workspace consumes. This is the Explore-agent blind spot: package-scoped searches miss the consumer side. Always grep from the repo root, not from inside the package.
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.
- 7d ago First seen · 78 lines · 27 tokens per session scan A 54bb75757003
find-dead-code is a skill published in the GitHub repository AlexisBalayre/claude-code-power-config (2 stars, last pushed 27d ago), licensed MIT. It adds 27 tokens to every session and 1,247 once invoked, about $0.0001 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-31.
Other skills, from other repositories
manage-skills
A maintenance workflow for checking whether project verification skills still cover the code and rules that changed during a session.
systematic-debugging
Structured debugging methodology — use before proposing fixes for any error or failure. Covers: code bugs, build errors, deploy failures, config conflicts, dependency issues, infra problems. Also use when previous fix attempts failed or root cause is unclear.
review-loop
Run the adversarial verification loop — implement, then hand the change to a fresh checker that did not write it, fix what it finds, and re-dispatch until APPROVE. Use before claiming any behavioural change is done, and on requests like "review loop", "adversarial review", "independent review", "get this verified"…
issue-triage
3-phase issue backlog management with audit, deep analysis, and validated triage actions. Use when triaging GitHub issues, sorting bug reports, cleaning up stale tickets, or detecting duplicate issues. Args: 'all' to analyze all, issue numbers to focus (e.g. '42 57'), 'en'/'fr' for language, no arg = audit only.
check-cache-bugs
Audit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.
eval-rules
Audit .claude/rules/ files for structural correctness, glob validity, and real-world usefulness. Resolves each paths: pattern against actual project files, then asks the user whether each rule is still relevant and useful. Can update rules in-place based on answers. Use when setting up rules for the first time…