Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

Dead Code Remover

Scans, LSP-verifies and deletes unused TypeScript code, delegating per-file batches to parallel agents that commit atomically.

Dev & CodingAdvanced67,5315,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 --noUnusedParameters for 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 barrel index.ts re-exports, test-only consumers, @public/@api JSDoc, hook/tool factories, agent and MCP definitions, and package.json exports.
  • 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 with git 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

  1. Whole-project sweep: type "remove dead code" and get a verified candidate table, parallel batch commits, and a final typecheck/build report.
  2. 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.
  3. Signature-safe fix: an unused ctx parameter required by a callback signature is renamed to _ctx instead of being deleted.
  4. 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal.
  2. Clone the repo to a temp folder: git clone https://github.com/code-yeongyu/oh-my-openagent /tmp/oh-my-openagent
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r /tmp/oh-my-openagent/.agents/skills/remove-deadcode ~/.claude/skills/
  5. Verify it landed: ls ~/.claude/skills/remove-deadcode/SKILL.md
  6. Restart Claude Code, cd into your project root, and say "remove dead code".
  7. Before running: commit or stash all work so you can roll back, and make sure bun run typecheck and bun run build exist. If you use npm/pnpm instead of bun, edit those commands inside SKILL.md to match your scripts.
View source on GitHubLicense: NOASSERTION