dead-code
Skill2 starsChanged 4 months agoMITView on GitHub
Find unused code — unreferenced exports, functions, variables, imports, files, and dependencies — and propose safe removals. Use when the user says "find dead code", "what's unused", "remove unused imports", "find unreferenced functions", "what can I delete", or "clean up dead code".
7 other projects use a version of this.
Adopted by
Most recently taken up by
- parcadei/Continuous-Claudetheir own version, first seen Oct 17, 2026
- vhmarquez/argotheir own version, first seen Oct 15, 2026
- eabz/tiriththeir own version, first seen Oct 10, 2026
- kaeawc/auto-mobiletheir own version, first seen Oct 8, 2026
- parcadei/Continuous-Claude-v2their own version, first seen Oct 8, 2026
- Jinbae10/skillstheir own version, first seen Jul 7, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- kaeawc/auto-mobile★ 56same name
- eabz/tirith★ 4same name
- vhmarquez/argo★ 1same name
- Jinbae10/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository68 other files it gives its agents.
- a11ySkill
- api-docsSkill
- audit-logSkill
- benchmarkSkill
- bisectSkill
- cacheSkill
- changelogSkill
- cherry-pickSkill
- ci-setupSkill
- codeownersSkill
- commit-messageSkill
- connection-poolSkill
- contributingSkill
- coverageSkill
- db-migrateSkill
- debugSkill
- depsSkill
- diagramSkill
- dockerizeSkill
- docstringSkill
- e2eSkill
- env-exampleSkill
- error-handlingSkill
- explainSkill
- feature-flagSkill
- flaky-testSkill
- gitignoreSkill
- graceful-shutdownSkill
- graphqlSkill
- healthcheckSkill
- i18nSkill
- idempotencySkill
- licenseSkill
- lint-fixSkill
- loggingSkill
- migrateSkill
- mockSkill
- onboardSkill
- optimizeSkill
- paginationSkill
- pr-descriptionSkill
- pre-commitSkill
- profileSkill
- prune-branchesSkill
- rate-limitSkill
- readmeSkill
- rebaseSkill
- refactorSkill
- regexSkill
- releaseSkill
- resolve-conflictsSkill
- retrySkill
- review-diffSkill
- scaffoldSkill
- secrets-scanSkill
- security-headersSkill
- seedSkill
- soft-deleteSkill
- sqlSkill
- squashSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 21
Prefer a real analyzer when one exists: Use the language's dead-code tooling and report its output:
- Distinctive: line 26
If no tool is installed, fall back to careful grep: for each exported symbol, search the codebase for references and flag those with none.
- Distinctive: line 49
Don't delete in the discovery pass.
- Distinctive: line 50
Treat unused dependencies separately — a package may be used only at runtime/build time or via a config the analyzer can't see.
- Distinctive: line 51
If nothing is unused, say so plainly rather than padding the list.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stack & tooling signals
!ls package.json pyproject.toml Cargo.toml go.mod tsconfig.json 2>/dev/null
!ls node_modules/.bin/knip node_modules/.bin/ts-prune node_modules/.bin/depcheck 2>/dev/null
Instructions
Find dead (unused) code in this project, scoped to $ARGUMENTS if a path was given, and propose safe removals. Default to report-and-confirm, not silent deletion.
Method
- Prefer a real analyzer when one exists. Use the language's dead-code tooling and report its output:
- JS/TS:
knip,ts-prune,depcheck(unused deps), oreslintwithno-unused-vars. - Python:
vulture, orruff/flake8unused-import rules. - Rust: the compiler's
dead_code/unusedwarnings (cargo build). - Go:
go vet,staticcheck(U1000),deadcode. - If no tool is installed, fall back to careful grep: for each exported symbol, search the codebase for references and flag those with none.
- JS/TS:
- Verify before condemning. A symbol with zero internal references may still be a public API entry point, a framework hook (route handler, lifecycle method, CLI command), used via reflection/dynamic dispatch, or referenced in a string/config. Read the context and rule these out — don't flag what's reachable through a non-obvious path.
- Categorize findings: unused imports, unused local variables, unreferenced functions/classes, unreachable branches, orphaned files (imported by nothing), and unused dependencies.
- Rank by safety. Unused imports and locals are near-zero-risk; unreferenced exported functions and whole files need more scrutiny (could be public surface). Note the risk per item.
Output
Group findings by safety, each with a file:line and why it appears unused:
### Safe to remove — local scope
- `path:line` — unused import `foo`
### Likely dead — verify it's not public API
- `path:line` — exported `bar()` has no references in the repoThen offer to delete the safe tier and let the user confirm the riskier ones.
Rules
- Report real, evidenced findings (
file:line+ tool output or the search that found nothing). Don't guess. - Be conservative with anything exported or entry-point-like: public APIs, dynamically-referenced code, and framework-invoked functions are easy false positives — flag them as "verify", not "delete".
- Don't delete in the discovery pass. After the user confirms, removals should be done in small, behavior-preserving steps with tests run after.
- Treat unused dependencies separately — a package may be used only at runtime/build time or via a config the analyzer can't see.
- If nothing is unused, say so plainly rather than padding the list.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

