dead-code-cleanup-edho-ferdian

Detects, classifies, and removes dead code in staged, test-verified commits.

2|Updated Sep 6, 2026
One-click install
npx skills add https://github.com/edhoferdian/EEF --skill dead-code-cleanup-edho-ferdian-edhoferdian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dead-code-cleanup-edho-ferdian
Source: https://github.com/edhoferdian/EEF/tree/main/.agents/skills/dead-code-cleanup-edho-ferdian
Command: npx skills add https://github.com/edhoferdian/EEF --skill dead-code-cleanup-edho-ferdian-edhoferdian

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Static analysis tools like knip or vulture flag unused code, but they miss dynamic references (string-based imports, DI containers, route tables) and over-report symbols with hidden inbound edges — so deleting based on their output alone breaks production code. This Skill turns "unused" findings into a safe, staged removal workflow where every deletion is risk-classified, cross-checked against a dependency graph, and verified by the test suite before committing. ## Core Features & Use Cases - Stack-aware detection: Automatically picks the right tooling from the repo manifest — knip/depcheck/ts-prune for JS/TS, vulture/deptry for Python, deadcode/staticcheck for Go, cargo-udeps/cargo-machete for Rust. - Risk classification: Every hit is labeled SAFE, CAREFUL, or RISKY before anything is touched; RISKY items (dynamic references) are reported, never removed by default. - Salak cross-check: When the Salak repo graph is installed, every candidate is validated against reverse-dependency data to catch false positives static tools miss. - Staged removal: Deletes in a fixed order (dependencies → exports → files → duplicates), running the full test suite and committing separately after each category so every batch is revertable. - Use Case: After a code review flags unused exports in a TypeScript monorepo, run this Skill to remove 12 unused dependencies, 8 dead exports, and 3 orphan files across four isolated commits — with tests passing after each one. ## Quick Start Ask the assistant to clean up dead code and unused dependencies in this repository, removing them safely in staged commits with tests run between each step.

Frequently Asked Questions about dead-code-cleanup-edho-ferdian

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove dead code from a repository?

Detect unused code with stack-appropriate tools (knip, vulture, deadcode), classify each hit as SAFE, CAREFUL, or RISKY, then delete in staged categories — dependencies, exports, files, duplicates — running the full test suite and committing separately after each one.

What tools find unused dependencies and exports in JavaScript?

Use depcheck for unused dependencies, knip for unused exports and files, and ts-prune for TypeScript-specific export analysis. The Skill selects these automatically when it detects a package.json manifest.

Why does knip report code as unused when it is actually called?

Static tools walk the AST and miss dynamic usage like string-based imports, DI container lookups, or route tables built from config strings. Cross-checking against a dependency graph with inbound-edge data catches these false positives before deletion.

Can I delete unused code without a test suite?

It is materially riskier. Without runnable tests, only the lowest-risk category (unused dependencies) should proceed, and only after explicit confirmation — the Skill refuses to remove anything beyond that without test coverage.

When should I not run a dead code cleanup pass?

Avoid cleanup during active feature development on the same files, immediately before a production deploy, on repos with no test coverage, or on code you do not understand well enough to judge CAREFUL and RISKY classifications.