Dead Code Remover
Scans, LSP-verifies and deletes unused TypeScript code, delegating per-file batches to parallel agents that commit atomically.
Dev & CodingAdvanced★ 67,531⑂ 5,507AI score 8/10Last updated: Aug 9, 2026
What it does
An orchestrator skill for safely removing unused code from a TypeScript project.
- Scan: runs
tsc --noEmit --noUnusedLocals --noUnusedParametersfor an authoritative list of unused locals, imports, params and types, while parallel explore agents hunt for orphaned files and never-imported exports. - Verify: every candidate goes through
LspFindReferences(includeDeclaration=false); only zero-reference symbols are confirmed dead. Built-in false-positive guards protect barrelindex.tsre-exports, test-only consumers,@public/@apiJSDoc, hook/tool factories, agent and MCP definitions, andpackage.jsonexports. - Batch & execute: confirmed items are grouped by file path into 5–15 conflict-free batches, each handed to a background deep agent that re-verifies, edits, runs
bun run typecheck, stages only its own files and commits — reverting withgit checkout --on failure. - Final verification: re-runs typecheck, tests and build, then prints a summary table of removed symbols, commit hashes and skipped batches.
Who it's for
- Developers maintaining long-lived TypeScript/Bun repos full of accumulated cruft
- Teams that avoid cleanup because they fear breaking the build
- Anyone who wants refactor PRs as small, reviewable per-file atomic commits
- Advanced users studying parallel sub-agent orchestration patterns
Examples
- Whole-project sweep: type "remove dead code" and get a verified candidate table, parallel batch commits, and a final typecheck/build report.
- Scoped cleanup: "dead code src/features/billing" limits the scan to that directory, removing two unused constants and one dead function in a single commit.
- Signature-safe fix: an unused
ctxparameter required by a callback signature is renamed to_ctxinstead of being deleted. - Guardrail: if more than 50 candidates surface, the skill stops and asks you to narrow scope before proceeding.
· · · Install guide · · ·
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the .agents/skills/remove-deadcode folder from the GitHub repo code-yeongyu/oh-my-openagent into my ~/.claude/skills/remove-deadcode/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/code-yeongyu/oh-my-openagent /tmp/oh-my-openagent && mkdir -p ~/.claude/skills && cp -r /tmp/oh-my-openagent/.agents/skills/remove-deadcode ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo to a temp folder:
git clone https://github.com/code-yeongyu/oh-my-openagent /tmp/oh-my-openagent - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r /tmp/oh-my-openagent/.agents/skills/remove-deadcode ~/.claude/skills/ - Verify it landed:
ls ~/.claude/skills/remove-deadcode/SKILL.md - Restart Claude Code, cd into your project root, and say "remove dead code".
- Before running: commit or stash all work so you can roll back, and make sure
bun run typecheckandbun run buildexist. If you use npm/pnpm instead of bun, edit those commands inside SKILL.md to match your scripts.
View source on GitHub ↗License: NOASSERTION