Borrowing it
Nothing to install: this file belongs to shift-editor/shift. 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/shift-editor/shift/main/.claude/skills/dead-code/SKILL.mdgit clone --depth 1 https://github.com/shift-editor/shiftWrote 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/shift-editor/shift/dead-code)<a href="https://agentmods.dev/skills/shift-editor/shift/dead-code"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/dead-code/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.
<a href="https://agentmods.dev/skills/shift-editor/shift/dead-code"><img src="https://agentmods.dev/badge/skills/shift-editor/shift/dead-code.svg" alt="Reviewed on agentmods" width="80" 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.00061 | $0.01753 |
| Opus 5.5 | $0.00024 | $0.00701 |
| Sonnet 5.5 | $0.00012 | $0.00351 |
| Haiku 4.5 | $0.00006 | $0.00175 |
Grade A, and why
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 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.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/dead-code — Find and Remove Dead Code
Use this skill to find unused files, exports, and class members in the codebase. It uses Knip as a candidate generator, then verifies each candidate through AST-level analysis and interface tracing before removing anything.
NEVER use knip --fix — it has previously deleted code that was actually in use, breaking the editor and tests.
Phase 1: Discovery
Run Knip to generate candidates:
pnpm deadcode 2>&1 # unused files + exports
pnpm deadcode:class 2>&1 # unused class members
Parse the output into three categories:
- Unused files — files with zero imports
- Unused exports — exported symbols with no consumers
- Unused class members — class methods/properties reported as unused
Phase 2: Verification
For each candidate, apply the appropriate checks below. Use scripts/find-refs.ts when reading code alone is insufficient.
Verifying Unused Files
- Grep for the filename (without extension) across the codebase
- Check config references:
tsconfig.json,vite.*.config.ts,forge.config.ts - Check if it's a test helper imported by test files (Knip may miss test-only imports)
- Check if it's referenced in
package.jsonscripts or CI workflows
Verifying Unused Exports
- Check if re-exported by a barrel file (
index.ts) consumed by another package - Check if used in
extends/implementsclauses - Check if used only in test files (Knip sometimes misses test imports)
- Run
npx tsx scripts/find-refs.ts <file> <symbol>for compiler-level reference count
Verifying Unused Class Members (Main Pain Point)
This is where most false positives occur. Knip cannot trace usage through interfaces, composite types, or dep interfaces.
Check these patterns in order:
- Interface contract — Is the member defined on an interface the class implements? Check the known interface contracts below.
- Composite type — Is the class consumed through a type intersection? e.g.,
ShiftEditor = EditorAPI & CanvasCoordinatorContextmeans allEditorAPImembers onEditorare used. - Dep interface — Is the member part of a dependency injection interface? Classes implement dep interfaces that are consumed by managers.
- Base class — Is the member defined on a base class (
BaseCommand,BaseTool) and used by subclasses? - Abstract member — Is it an abstract method that subclasses must implement?
- Find References — Run
npx tsx scripts/find-refs.ts <file> <memberName>for compiler confirmation.
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.
- 1mo ago First seen · 164 lines · 61 tokens per session scan A c97e44e50f6b
dead-code is a skill published in the GitHub repository shift-editor/shift (379 stars, last pushed today), licensed Apache-2.0. It adds 61 tokens to every session and 1,753 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-09-01.
Other skills, from other repositories
review
Review one pull request for real bugs, regressions, and convention violations. Enumerate candidate issues across the whole diff, verify each against the code, then return structured line-anchored findings and a verdict. Read-only on GitHub; the orchestrator posts the review.
adversarial-reviewer
Stress-test a code change for concrete correctness defects, unsafe assumptions, and failure modes. Use when the user explicitly asks for an adversarial review, a deep bug hunt, or to tear a change apart, or to check your own change before submitting it. Do not use for ordinary review, style feedback, or general…
agent-upkeep
Perform one small, scoped maintenance improvement to the Elements monorepo and open a single reviewable pull request. Use this skill for scheduled or unattended upkeep runs that improve unit test coverage for one file, fix one behavioral bug in one module, or move one off ESLint rule toward enforcement to reduce…
agent-debug-ci
Investigate failed scheduled or nightly GitHub Actions runs on the default branch, determine whether the failure is reproducible and repository-owned, implement the smallest evidence-backed fix, validate it, and open a pull request. Use when a failed nightly CI event starts an agent, or when the standard CI or…
omk-code-review
Review implementation changes against contracts and real failure modes, preserve minimal patches, and verify regressions without confusing test counts, generated code volume or CI claims with production correctness.
architecture-audit
Systematic architecture audit and refactoring methodology for Rust + TypeScript codebases. Use when performing refactoring, cleanup, unification, code review, dead code removal, module reorganization, or tech debt elimination. Ensures no naming confusion, semantic overloading, hidden defaults, duplicate logic, or…