dead-code-sweep
Skill1 starsChanged 2 months agoMITView on GitHub
Repo-wide removal of code nothing calls — unused exports, unreachable branches, registered-but-never-invoked handlers, scaffolding for tech the stack doesn't run, commented-out blocks. Every removal proven with a grep. Use when asked to "remove dead code", "clean up the repo", after a big feature removal, or on a periodic tidy.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- MediaPlural/agent-proventheir own version, first seen Oct 15, 2026
- ceptln/quota-burnertheir own version, first seen Sep 8, 2026
- ccpowerpack/claude-code-skillstheir own version, first seen Jul 3, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ceptln/quota-burner★ 18same name
- MediaPlural/agent-proven★ 1same name
- ccpowerpack/claude-code-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 repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bigquery-analyticsSkill
- cache-invalidationSkill
- mongo-aggregationSkill
- mongo-modelingSkill
- postgres-aggregationSkill
- postgres-indexingSkill
- redis-coordinationSkill
- redis-patternsSkill
- review-querySkill
- code-migrationSkill
- cut-releaseSkill
- data-migrationSkill
- deploy-serviceSkill
- hotfixSkill
- rollbackSkill
- design-endpointSkill
- design-eventSkill
- design-schemaSkill
- evolve-contractSkill
- scaffold-nestjs-moduleSkill
- scaffold-projectSkill
- incident-responseSkill
- investigate-bugSkill
- on-callSkill
- postmortemSkill
- audit-skillsSkill
- distill-review-styleSkill
- write-skillSkill
- debug-with-tracesSkill
- define-alertsSkill
- instrument-serviceSkill
- evaluate-dependencySkill
- grillSkill
- handoffSkill
- orientSkill
- phased-deliverySkill
- spikeSkill
- to-questionnaireSkill
- write-adrSkill
- write-prdSkill
- devops-pr-reviewSkill
- go-backend-pr-reviewSkill
- nestjs-backend-pr-reviewSkill
- python-backend-pr-reviewSkill
- react-frontend-pr-reviewSkill
- bisectSkill
- break-couplingSkill
- deslopifySkill
- extract-moduleSkill
- rebase-cleanSkill
- resolve-merge-conflictsSkill
- split-commitSkill
- tddSkill
- wait-whatSkill
- wide-renameSkill
- bullmqSkill
- kafkaSkill
- sqs-consumerSkill
- audit-dependenciesSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
1
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 29
Prove it before deleting: Every removal has a grep or a tool output showing zero references.
“Common” is measured: kept by at least 6 in 10 of the 3 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
Dead-code sweep
Repo-wide and deliberate — distinct from quality/deslopify, which only
touches the current session's diff.
What counts as dead
- Unused exports — exported symbol, zero importers.
grep -rn "name" --include=…or the language tool (ts-prune,deadcodefor Go,vulturefor Python). - Unreachable branches — an
if/casethat can't be true given how the function is actually called. Trace the callers. - Registered but never invoked — an instrument, recorder, wrapper, listener,
route, or job that's wired up and never fires. Give the grep that proves it:
grep -rn "RecordServiceCall\|ServiceWrapper" pkg/ → no caller. - Scaffolding for absent tech — Kafka recorders when the stack is SQS, a dev env config when there's no dev env.
- Commented-out code — delete, git remembers.
- Dead dependencies — in the manifest, imported nowhere (
depcheck,go mod tidy). - Orphaned files — a module nothing imports, a test for deleted code.
Rules
- Prove it before deleting. Every removal has a grep or a tool output showing zero references. Paste it in the PR.
- Watch for reflection / dynamic dispatch — DI containers, decorators, string
keys, config-driven registries can "use" something
grepwon't show. Check. - Public API of a published package is not dead just because this repo doesn't call it — check downstream first.
- One PR per coherent chunk,
chore: remove dead <area>. Not one giant PR. - Latent-but-not-dead (a self-heal branch, a fallback) → leave it, it's not this skill's job.
Anti-patterns
- ❌ Deleting on "looks unused" without the grep.
- ❌ Missing a reflective/dynamic caller.
- ❌ One 2000-line deletion PR nobody can review.
- ❌ Removing a published package's exported API.
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.

