claude-code-power-config: Skill for Claude Code

.claude/skills/find-dead-code/SKILL.md

find-dead-code is a skill for Claude Code from AlexisBalayre/claude-code-power-config. It costs 27 tokens per session (1,247 once invoked), scanned A, original, MIT.

A detection skill for finding possible unused code in a monorepo, a repository containing multiple related projects or packages. It reports candidates and ranks them instead of deleting anything.

In plain words
What is it for?
Use it to scan one package, service, or repository area for unreferenced files, unused exports, and other dead-code candidates.
Why use it?
It helps narrow a large codebase down to files, exports, or other code that may no longer be used. Each candidate includes checks for a developer to perform before removal.

Skill for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter.

This is AlexisBalayre/claude-code-power-config's own configuration. It tells Claude Code how to work on claude-code-power-config itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-power-config configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/AlexisBalayre/claude-code-power-config/main/.claude/skills/find-dead-code/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AlexisBalayre/claude-code-power-config

Made for: Claude Code.

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/alexisbalayre/claude-code-power-config/find-dead-code.svg)](https://agentmods.dev/skills/alexisbalayre/claude-code-power-config/find-dead-code)
Your own site
<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>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 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.00027 $0.01247
Opus 5 $0.00014 $0.00624
Sonnet 5 $0.00005 $0.00249
Haiku 4.5 $0.00003 $0.00125

Measured 7d ago against content hash 54bb75757003, 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 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.

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

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

  1. Detect and report only. Do not run rm, git rm, or edit imports as part of this skill.
  2. A candidate is a hypothesis, not a verdict. Every candidate ships with the verification recipe below; the user runs the final eye.
  3. 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.
  4. 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.

  1. Dump current flag keys via pnpm --filter @acme/acme-db exec tsx src/seed/dump-feature-flags.script.ts (or read packages/acme-db/src/seed/feature-flags.script.ts directly).
  2. For each key, grep for useFeatureFlag("<key>"), hasFeatureFlag("<key>"), and the bare quoted key string across apps/ and services/.
  3. 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.

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

Subscribe to this mod's changes

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.

Related

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.

sangrokjung/claude-forge · 54 tokens

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.

sangrokjung/claude-forge · 53 tokens

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"…

sangrokjung/claude-forge · 100 tokens

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.

FlorianBruniaux/claude-code-plugins · 81 tokens

check-cache-bugs

Audit Claude Code setup for cache bugs (CC#40524): sentinel, --resume/--continue, attribution header + ArkNill B3/B4/B5.

FlorianBruniaux/claude-code-plugins · 38 tokens

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…

FlorianBruniaux/claude-code-plugins · 84 tokens