Agent skill · software engineering · code-yeongyu

remove-deadcode

Remove unused code from this project with ultrawork mode, LSP-verified safety, atomic commits. Triggers: remove dead code, dead code, cleanup, remove unused.

Why this skill is useful

Adds a comprehensive automation script for dead code removal with LSP verification and parallel processing that significantly enhances the AI's capabilities.

What it needs

Requires bun, typescript installed locally. About 4k tokens when loaded. Last updated 2026-08-07. 67,387 stars on the source repository.

What this skill does

Dead code removal via massively parallel deep agents. You are the ORCHESTRATOR — you scan, verify, batch, then delegate ALL removals to parallel agents. <rules> LSP is law. Verify with LspFindReferences(includeDeclaration=false) before ANY removal decision. Never remove entry points. src/index.ts, src/cli/index.ts, test files, config files, packages/ — off-limits. You do NOT remove code yourself. You scan, verify, batch, then fire deep agents. They do the work. </rules> <false-positive-guards> NEVER mark as dead: Symbols in src/index.ts or barrel index.ts re-exports Symbols referenced in test files (tests are valid consumers) Symbols with @public / @api JSDoc tags Hook factories (createXXXHook), tool factories (createXXXTool), agent definitions in agentSources Command templates, skill definitions, MCP configs Symbols in package.json exports </false-positive-guards> --- PHASE 1: SCAN — Find Dead Code Candidates Run ALL of these in parallel: <parallel-scan> TypeScript strict mode (your primary scanner — run this FIRST): This gives you the definitive list of unused locals, imports, parameters, and types with exact file:line locations. Explore agents (fire ALL simultaneously as background): </parallel-scan> Collect all results into a master candidate list. --- PHASE 2: VERIFY — LSP Confirmation (Zero False Positives) For EACH candidate from Phase 1: Also apply the false-positive-guards above. Produce a confirmed list: Action types: REMOVE — delete the symbol/import/file entirely PREFIX — unused function parameter required by signature → rename to paramName If ZERO confirmed: report "No dead code found" and STOP. --- PHASE 3: BATCH — Group by File for Conflict-Free Parallelism <batching-rules> Goal: maximize parallel agents with ZERO git conflicts. 1. Group confirmed dead code items by FILE PATH 2. All items in the SAME file go to the SAME batch (prevents two agents editing the same file) 3. If a dead FILE (entire file deletion) exists, it's its own batch 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills code-yeongyu/remove-deadcode

View the source on GitHub

Browse the @skills marketplace