absolute-prune
Skill216 starsChanged 5 months agoMITView on GitHub
Dead code and dependency cleanup, repo-wide: unused deps, unreferenced exports, unreachable code, orphaned files — removed only with tool evidence, in reversible waves. Runs on green main. For diff-scoped cleanup use absolute-simplify. Triggers on "absolute prune", "remove dead code", "find unused deps/exports", "what can we delete", "clean up orphaned files".
In this repository11 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- absolute-auditSkill
- absolute-debtSkill
- absolute-deflakeSkill
- absolute-docsSkill
- absolute-initSkill
- absolute-simplifySkill
- absolute-specSkill
- absolute-uiSkill
- absolute-upgradeSkill
- absolute-workSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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 71
Prefer tools already in the project.
- Distinctive: line 91
Remove in small, reversible waves.
- Distinctive: line 93
After each wave: full test + build + typecheck.
- Distinctive: line 97
Don't delete: generated files, vendored code, public-API surface, or anything load-bearing for a config/plugin you can't trace.
- Very specific: line 99
Treat preferences.health.protectedPaths from config as never-delete globs — anything matching is out of scope even if a tool flags it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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
Start your first response with the ✂️ emoji.
Absolute Prune
Cut dead growth from the repo: unused dependencies, unreferenced exports, unreachable code, orphaned files. Evidence-based — every removal is backed by a tool that proves nothing references it — applied in safe waves with tests green after each.
Runs the shared engine in references/health-engine.md — read it for the
DETECT → SCAN → TRIAGE → FIX → VERIFY → REPORT loop and the safety contract. This file
covers only what's specific to pruning.
When to use
- "Remove dead code", "clean up unused deps", "what can we delete?".
- Bundle/install bloat from packages nothing imports anymore.
- Post-refactor orphans: files and exports left behind after a feature was rerouted.
prune vs simplify: simplify polishes your working git diff. prune sweeps the
whole committed repo for things that are dead repo-wide. Use simplify mid-change;
prune as standing cleanup on green main.
What it scans
Dead dependencies — declared but never imported (and missing deps that are imported but undeclared):
| Ecosystem | Tool |
| JS/TS | depcheck or knip (knip also covers exports/files) |
| Python | deptry |
| Go | go mod tidy (diff), unused module detection |
Dead code — unreferenced exports, unreachable branches, orphaned files:
| Ecosystem | Tool |
| JS/TS | knip (exports/files), ts-prune, eslint no-unused-vars |
| Python | vulture, ruff unused rules |
| Go | deadcode ./..., staticcheck (U1000) |
Prefer tools already in the project. Treat results as candidates — verify each isn't reached via dynamic import, reflection, DI, public API, or a config string before removing.
Risk ranking (TRIAGE)
| Wave | Removal | Default |
| 1 | unused devDeps, unreferenced local exports/functions | fix now — lowest risk |
| 2 | unused runtime deps, orphaned internal files | fix this pass after confirming no dynamic ref |
| 3 | anything reachable via public API, plugin system, dynamic require, reflection, or config | gated / usually defer — high false-positive risk |
Static tools miss dynamic references. Anything in wave 3, or anything a tool flags but you can't prove is dead, gets confirmed with the user or deferred — never auto-removed.
Fix & verify
- Remove in small, reversible waves. One category per wave (e.g. "unused devDeps", then "orphaned files").
- After each wave: full test + build + typecheck. A green typecheck/build is the proof the removed symbol truly had no references. If anything goes red, the symbol wasn't dead — revert and reclassify.
- Removing a dep: drop it from the manifest, regenerate the lockfile, rebuild.
- Don't delete: generated files, vendored code, public-API surface, or anything load-bearing
for a config/plugin you can't trace. Report those as "suspected dead, needs human call".
Treat
preferences.health.protectedPathsfrom config as never-delete globs — anything matching is out of scope even if a tool flags it.
Gotchas
- Trusting the tool blindly. Dynamic imports, DI containers, reflection, and string-keyed lookups defeat static analysis. Confirm before deleting.
- Removing public API. A library's unused-internally export may be its whole point. Check
the package entry points /
exportsmap. - Deleting generated or vendored files. They look orphaned but are rebuilt/checked-in on purpose.
- Big-bang prune. Deleting everything flagged in one commit makes regressions un-bisectable. Wave it.
- Scope creep into refactor.
pruneremoves dead things; it does not restructure live code. Restructuring →simplifyorwork.
Companion commands
/absolute simplify— for restructuring/clarity of live code in your diff./absolute upgrade— pairs well: prune unused deps, then upgrade what remains./absolute debt— pruning often clears a batch of lint/unused-var warnings too.
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.

