Skip to main content
skill CX Codex

absolute-prune — Claude Code skill: what it does, how to install

absolute-prune — a cleanup skill for Claude Code that sweeps repositories for dead code and unreferenced dependencies. Runs on green main branches using static analyzer evidence.

MIT 170 installs ★ 224 updated 2026-10-26

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dhruvjainin/absolute --skill absolute-prune -a claude-code
Open on GitHub

What absolute-prune does

The skill sweeps an entire project to eliminate unused packages, unreferenced exports, unreachable branches, and orphaned files. Detection relies on ecosystem linters such as knip, depcheck, or ts-prune for JavaScript and TypeScript, deptry, vulture, and ruff for Python, alongside deadcode and staticcheck for Go.

Deletions execute in safe, reversible waves grouped by risk level. Wave one purges unused development dependencies and private symbols. Wave two targets runtime packages and orphaned internal modules once dynamic imports are ruled out. Wave three covers public interfaces and plugin registries, requiring user sign-off instead of unattended deletion.

Every wave triggers a full cycle of builds, type checks, and test suites. A failed verification immediately rolls the candidate back. Files matching preferences.health.protectedPaths, generated assets, and vendored folders remain untouched, while live code restructuring is left out of scope.

What it helps with

  • prune unreferenced dependencies and refresh lockfiles
  • eliminate orphaned modules remaining after refactoring passes
  • detect dead exports across TypeScript or Python projects
  • verify candidate removals against full build and test suites

Example prompts for the agent

  • Remove dead code and unused dependencies across the repo
  • Find unused exports and orphaned files
  • Scan the project for unreferenced packages with knip

How to install absolute-prune

1Skills CLI (Vercel)

npx skills add dhruvjainin/absolute --skill absolute-prune -a claude-code

2Manually: put the files in place

~/.claude/skills/absolute-prune/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/absolute-prune/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about absolute-prune

How to install absolute-prune in Claude Code?

Run npx skills add dhruvjainin/absolute --skill absolute-prune -a claude-code or save the definition file to ~/.claude/skills/absolute-prune/SKILL.md.

What does absolute-prune do?

It identifies and deletes unused dependencies, orphaned files, and dead exports in controlled waves verified by tests.

What is required to run absolute-prune?

The project needs working test suites and ecosystem tools such as knip, depcheck, deptry, vulture, or deadcode.

Source text

SKILL.md · MIT
---
name: absolute-prune
version: 0.5.0
description: >
  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".
category: workflow
tags:
  - workflow
  - maintenance
  - dead-code
  - cleanup
  - pruning
platforms:
  - claude-code
  - gemini-cli
  - openai-codex
  - mcp
user-invocable: true
argument-hint: "[target]"
license: MIT
maintainers:
  - github: maddhruv
---

> 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.protectedPaths` from config as never-delete globs — anything
  matching is out of scope even if a tool flags it.

---

## Gotchas

1. **Trusting the tool blindly.** Dynamic imports, DI containers, reflection, and string-keyed
   lookups defeat static analysis. Confirm before deleting.
2. **Removing public API.** A library's unused-internally export may be its whole point. Check
   the package entry points / `exports` map.
3. **Deleting generated or vendored files.** They look orphaned but are rebuilt/checked-in on purpose.
4. **Big-bang prune.** Deleting everything flagged in one commit makes regressions un-bisectable.
   Wave it.
5. **Scope creep into refactor.** `prune` removes dead things; it does not restructure live code.
   Restructuring → `simplify` or `work`.

---

## 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.

© dhruvjainin · MIT · dhruvjainin/absolute

Similar skills

All skills for Code review and refactoring →

From the same set11

The whole set →
absolute-simplify absolute-simplify — a skill for Claude Code and Cursor that simplifies code, flattens nesting, and removes dead code. Runs autonomously on git changes or target paths. CX Codex +1 336installs absolute-work absolute-work — a skill for Claude Code and Codex that enforces a phased SDLC from design interview to verified code. It triggers on requests to build features end-to-end, plan tasks, or run migrations. CX Codex +1 216installs absolute-spec The absolute-spec Claude Code skill turns a feature request into a reviewed design document after scanning the codebase. It asks a short set of clarifying questions, writes the spec, then stops before implementation. CX Codex +1 176installs absolute-docs absolute-docs is a Claude Code skill that structures technical documentation with Diátaxis. It creates and reviews tutorials, how-to guides, reference pages, and architectural explanations from code. CX Codex +1 171installs absolute-deflake The absolute-deflake Claude Code skill finds tests with inconsistent results and targets the cause of each failure. It activates on requests about flaky CI or tests that fail intermittently. CX Codex +1 165installs absolute-debt absolute-debt — a skill for Claude Code resolves accumulated lint and typecheck violations across your codebase. Execution proceeds in controlled waves on a passing main branch. CX Codex +1 162installs absolute-init absolute-init — a skill for Claude Code configures absolute around a repository’s conventions and user preferences. It starts when asked to initialize or configure absolute, including during first-time setup. CX Codex +1 160installs absolute-upgrade The absolute-upgrade Claude Code skill updates outdated and vulnerable dependencies in risk-based groups. It runs on a green main branch or in response to a request to update packages. CX Codex +1 155installs

Project sponsors

Companies that keep this analytics open