/paymex3:refactor-cleanfrom paymex3
Safely identifies and removes dead code with test verification after each deletion. Supports multiple language-specific analysis tools and categorizes findings by safety tier.
Ships in paymex3. Installing the plugin adds it to Claude Code.
Safely identify and remove dead code with test verification at every step.
Run analysis tools based on project type:
| Tool | What It Finds | Command |
|---|---|---|
| knip | Unused exports, files, dependencies | npx knip |
| depcheck | Unused npm dependencies | npx depcheck |
| ts-prune | Unused TypeScript exports | npx ts-prune |
| vulture | Unused Python code | vulture src/ |
| deadcode | Unused Go code | deadcode ./... |
| cargo-udeps | Unused Rust dependencies | cargo +nightly udeps |
If no tool is available, use Grep to find exports with zero imports:
# Find exports, then check if they're imported anywhere
Sort findings into safety tiers:
| Tier | Examples | Action |
|---|---|---|
| SAFE | Unused utilities, test helpers, internal functions | Delete with confidence |
| CAUTION | Components, API routes, middleware | Verify no dynamic imports or external consumers |
| DANGER | Config files, entry points, type definitions | Investigate before touching |
For each SAFE item:
git checkout -- <file> and skip this itemBefore deleting CAUTION items:
import(), require(), __import__After removing dead code, look for:
Report results:
Dead Code Cleanup
──────────────────────────────
Deleted: 12 unused functions
3 unused files
5 unused dependencies
Skipped: 2 items (tests failed)
Saved: ~450 lines removed
──────────────────────────────
All tests passing PASS:
What the command file sets; muted values are Claude Code's defaults
Knip, TypeScript, Python, Go, Rust
dead-code, code-cleanup, refactoring, unused-code, code-quality
7-day visitors to each command page
99 commands in this plugin
/asideAside CommandAnswer a quick side question without interrupting or losing context from the current task. Resume work automatically after answering./astra-reviewAstra ReviewSend Claude-written code to GPT-6-Astra (ChatGPT, via Codex CLI) for an independent cross-provider review, then fix what it finds./auto-updateAuto UpdatePull the latest ECC repo changes and reinstall the current managed targets.npx claudepluginhub luis-dokkaebi/paymex3 --plugin paymex379 plugins ship this exact command · first indexed Mar 30, 2026
Other plugins' commands for the same job