dead-code-removal
Skill6 starsChanged 4 months agoApache-2.0View on GitHub
Use when unused functions, classes, exports, or files need to be identified and safely deleted.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- Mushfiqur-Rahman-Robin/coding-rulestheir own version, first seen Oct 13, 2026
- shivangiG/CodeAtlastheir own version, first seen May 3, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- shivangiG/CodeAtlas★ 1same name
- Mushfiqur-Rahman-Robin/coding-rules★ 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 repository116 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/graphify/references/CLAUDE.mdCLAUDE.md
- agent-config-security-auditSkill
- agent-harness-designSkill
- agent-readable-docsSkill
- agent-runtime-patternsSkill
- agent-session-forensicsSkill
- ai-regression-testingSkill
- ai-slop-cleanerSkill
- api-doc-reviewSkill
- architecture-decision-recordsSkill
- architecture-simplificationSkill
- ask-claudeSkill
- ask-codexSkill
- ask-geminiSkill
- autonomous-delivery-pipelineSkill
- baseline-comparison-reviewSkill
- bigquery-cost-auditSkill
- brainstormingSkill
- browser-automation-safetySkill
- bug-huntSkill
- build-fix-minimal-diffSkill
- canonical-advisor-routingSkill
- change-impact-checkSkill
- changelog-generatorSkill
- ci-failure-readoutSkill
- codebase-migration-batchesSkill
- context-compressionSkill
- context-docsSkill
- context-minimizationSkill
- context-retrieval-loopSkill
- data-qualitySkill
- dataset-split-reviewSkill
- dbt-incremental-strategy-auditSkill
- dbt-preflightSkill
- dbt-strategySkill
- defuddleSkill
- dependency-cleanupSkill
- deploy-pipeline-runbookSkill
- dispatching-parallel-agentsSkill
- doc-consistency-checkSkill
- environment-doctorSkill
- experiment-tracking-reviewSkill
- failure-triageSkill
- filesystem-mcp-guardrailsSkill
- finishing-a-development-branchSkill
- flaky-test-investigationSkill
- gh-address-commentsSkill
- github-ci-failure-triageSkill
- graphifySkill
- handoff-disciplineSkill
- hard-won-skill-extractorSkill
- hook-safety-reviewSkill
- incident-readoutSkill
- incremental-migrationSkill
- json-canvasSkill
- local-rag-mcpSkill
- log-driven-diagnosisSkill
- managed-codebase-contextSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Verify unused — search the entire repository: Do not assume code is dead just because the current file doesn't use it:
- Distinctive: line 39
If there is any doubt, leave it alone or ask the user.
- Distinctive: line 43
Prune dependencies: If you delete the only code that was using an imported module, remove the import statement as well.
- Very specific: line 45
Run tests: Always run tests and/or type checkers (e.g., tsc --noEmit) after removal to ensure you didn't accidentally break a hidden …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Dead code increases maintenance overhead and confuses developers. Verify a symbol is truly unused across the entire repository, then delete it outright — never comment it out.
When to Use
- A symbol, file, or export looks unused
- A feature removal or migration left orphaned helpers behind
- A coverage or lint report flags unreachable code
Inputs
- The candidate symbols/files to remove
- The repo's test and type-check commands
Workflow
Verify unused — search the entire repository. Do not assume code is dead just because the current file doesn't use it:
grep -rn "symbolName" . --include="*.ts" --include="*.tsx" # all references grep -rn "from ['\"].*module-name" src/ # import sites git log -3 --oneline -- path/to/suspect-file # recent touchesEcosystem tools can shortcut the inventory when available (e.g., knip or ts-prune for TypeScript exports, vulture for Python).
Check for dynamic invocation. Be wary of dynamically invoked code — reflection, dependency injection by string name, ORM mappers, route tables, config-driven dispatch:
grep -rn "\"symbolName\"\|'symbolName'" . # string-keyed referencesIf there is any doubt, leave it alone or ask the user.
- Delete aggressively. Once confirmed unused, delete the code. Do not comment it out.
- Prune dependencies. If you delete the only code that was using an imported module, remove the import statement as well.
- Run tests. Always run tests and/or type checkers (e.g.,
tsc --noEmit) after removal to ensure you didn't accidentally break a hidden dependency.
Output
- The deletion diff plus, per removed symbol, the search evidence that it was unused
Verification
- Whole-repo search performed per symbol — including string-keyed/dynamic references
- No commented-out code left behind
- Orphaned imports pruned along with the dead code
- Tests and type checker green after removal
Failure Modes
- Current-file blindness — "this file doesn't use it" is not "the repo doesn't use it".
- Dynamic-invocation casualties — reflection/DI/ORM references don't appear as imports; search string keys too.
- Commenting instead of deleting — commented-out code is still dead code; git history already preserves it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

