dead-code-eliminator
Dead Code Eliminator
Use this skill when the user wants a dead-code audit, not a broad refactor. The default outcome is a reachability report and a removal order, with code changes only after the audit is clear.
Main Workflow
- Find the project entry points: executables, CLI bins, routes, jobs, exports, package indexes, and framework lifecycle hooks.
- Trace the live set from those roots through imports, calls, instantiations, and other statically provable edges.
- Mark anything unresolved, conditional, or externally consumable instead of guessing reachability.
- Separate test-only reachability from production reachability.
- Report dead code candidates, confidence level, and any correctness or soundness concerns in the live code.
- If the user asks for removal, delete in dependency-safe order after the audit is complete.
Safety Rules
- Do not guess through reflection,
eval, string dispatch, or other dynamic lookup paths. - Treat feature-flagged or environment-conditional code as conditionally reachable and name the condition.
- Treat symbols that may be consumed outside the repository as
unused export (external consumers possible), not as dead code. - Do not collapse low-confidence items into the dead list without calling out the uncertainty.
More from abpai/skills
human-writer
>-
28agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
28code-simplifier
Simplify and refine code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.
25bun-expert
>
25socratic-code-owner
>
23beautiful-mermaid
Render Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.
22