Agent skill

Dead Code Remover

by code-yeongyu in code-yeongyu/oh-my-openagent

Finds unused code in a TypeScript project, confirms each candidate has no references through the language server, then hands removals to parallel agents.

Custom licenceAuto-check passedDevelopment

Install Dead Code Remover

skills CLI
$ npx skills add code-yeongyu/oh-my-openagent --skill remove-deadcode -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install code-yeongyu/oh-my-openagent remove-deadcode --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/code-yeongyu/oh-my-openagent.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/remove-deadcode .claude/skills/remove-deadcode && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
remove-deadcode
GitHub stars
70k
Token cost
~1.8k tokens
SKILL.md length
428 words
Files
1
Skills in repo
44
Repo updated
First seen
Licence
Custom licence

At a glance

Finds unused code in a TypeScript project, confirms each candidate has no references through the language server, then hands removals to parallel agents.

  • Works in 5 steps: SCAN — Find Dead Code Candidates → VERIFY — LSP Confirmation (Zero False… → BATCH — Group by File for Conflict-Free… → …
  • Cleaning unused exports, imports and files out of a TypeScript codebase
  • SKILL.md covers PHASE 1: SCAN — Find Dead Code…, PHASE 2: VERIFY — LSP…, PHASE 3: BATCH — Group by File… and PHASE 4: EXECUTE — Fire…, plus 3 more sections
  • Calls bun, bunx and git

What it does

The agent acts as an orchestrator that scans, verifies and batches, and never deletes code itself. Scanning runs the TypeScript compiler with unused-locals and unused-parameters checks through bunx, alongside several explore agents that look for things like orphaned files. Every candidate is then checked with an LSP find-references lookup, and only symbols with zero references stay on the confirmed list.

The skill carries explicit false-positive guards: entry points, barrel re-exports, symbols used by tests, anything tagged @public or @api, hook and tool factories, command templates, MCP configs and package.json exports are never marked dead. The confirmed list is a table of file, symbol, type and action, where the action is either remove, or rename an unused required parameter with an underscore prefix. Removals are then delegated to parallel agents and committed atomically, and if nothing is confirmed it reports that no dead code was found and stops.

When your agent uses it

  • Cleaning unused exports, imports and files out of a TypeScript codebase
  • Verifying that a symbol is truly unreferenced before deleting it
  • Running a cleanup pass that must not touch entry points or tests

Example prompts

  • “Remove dead code from this project, and check each symbol with the language server first.”
  • “Clean up unused imports and orphaned files under src, but leave the entry points alone.”
  • “List the confirmed unused functions and parameters in this repo before removing anything.”

Requirements

  • Bun, for running bunx tsc
  • A TypeScript project
  • An LSP find-references tool available to the agent

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. SCAN — Find Dead Code Candidates
  2. VERIFY — LSP Confirmation (Zero False Positives)
  3. BATCH — Group by File for Conflict-Free Parallelism
  4. EXECUTE — Fire Parallel Deep Agents
  5. FINAL VERIFICATION

What it can do on your machine

Read from SKILL.md and the folder at commit cbd7dd2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bun
    • bunx
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use bunx and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dead Code Remover loads about 1.8k tokens when it runs. Until then it costs about 43 tokens; SKILL.md has 428 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~43
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Its licence (Custom licence) doesn't allow us to republish the file, so here is its outline and opening line. It has 428 words (~1,804 tokens).

“Dead code removal via massively parallel deep agents. You are the ORCHESTRATOR — you scan, verify, batch, then delegate ALL removals to parallel agents.”

— opening of SKILL.md by code-yeongyu, Custom licence
name
remove-deadcode

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/remove-deadcode of code-yeongyu/oh-my-openagent.

Open the folder on GitHubat commit cbd7dd2

Compare with similar skills

Dead Code Remover next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dead Code Remover compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dead Code Remover this skillcode-yeongyu/oh-my-openagent70k—~1.8kAutomated safety check: PassCustom licence
DRY Refactoring With jscpdkucherenko/jscpd6.3k—~2.1kAutomated safety check: PassMIT
Dead Code Removal with Knipshift-editor/shift343—~1.8kAutomated safety check: PassApache-2.0
Code RefinerMathews-Tom/armory327—~3.1kAutomated safety check: PassMIT
OpenTUI Terminal Interfacescline/cline70k—~1.9kAutomated safety check: PassApache-2.0
Code Simplification for ego-litecitrolabs/ego-lite17k—~1.2kAutomated safety check: PassMIT

Similar skills

  • Removes copy-paste duplication found by jscpd, starting with exact clones and hotspots, then renamed and near-miss copies, using proven refactoring strategies.

    6.3k GitHub stars~2.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Dead Code Removal with Knip

    shift-editor/shift

    Finds unused files, exports and class members with Knip, then verifies each candidate through reference tracing before removing anything, never using knip --fix.

    343 GitHub stars~1.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Refiner

    Mathews-Tom/armory

    Deep code simplification and refactoring preserving behavior across Python, Go, TypeScript, Rust.

    327 GitHub stars~3.1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Helps build terminal user interfaces with OpenTUI using its core imperative API or its React and Solid reconcilers, with references for layout, keyboard, animation and testing.

    70k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.

    17k GitHub stars~1.2k tokensUpdated 14 days ago
    DevelopmentAuto-check passed
  • Jevgrep

    dzhng/jevgrep

    A skill your agent uses for questions about how, why, or where behavior works in a repository, including questions that name a function or setting.

    2.4k GitHub stars~741 tokensUpdated 4 days ago
    DevelopmentAuto-check passed

More from code-yeongyu/oh-my-openagent

All 44 skills in this repo
  • ast-grep Structural Search

    code-yeongyu/oh-my-openagent

    Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.

    70k GitHub stars~3.3k tokensUpdated today
    Auto-check passed
  • Browser Control with Omowright

    code-yeongyu/oh-my-openagent

    Drives a real browser through the omowright library, either the user's own signed-in browser or a separate browser the code launches, for forms, QA, screenshots and scraping.

    70k GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Codex Plugin QA

    code-yeongyu/oh-my-openagent

    Tests the omo Codex plugin in an isolated CODEX_HOME with a local mock model, proving hooks fired through app-server notifications without touching ~/.codex.

    70k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Coding Agent Session Finder

    code-yeongyu/oh-my-openagent

    Finds, reads and reconstructs past coding-agent sessions across Codex, Claude, OpenCode, Senpi and many other local agent logs.

    70k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • LSP Setup

    code-yeongyu/oh-my-openagent

    Detects which languages a project uses, installs the matching language server, writes its config and checks it with a real call so diagnostics and go-to-definition work.

    70k GitHub stars~1.4k tokensUpdated today
    Auto-check: notes
  • OpenCode QA Toolkit

    code-yeongyu/oh-my-openagent

    Tests the opencode coding agent itself: its CLI, server, plugin hooks and events, the terminal UI under tmux, and its SQLite session database, using tested helper scripts.

    70k GitHub stars~2.9k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Dead Code Remover

What does Dead Code Remover do?

Finds unused code in a TypeScript project, confirms each candidate has no references through the language server, then hands removals to parallel agents. The agent acts as an orchestrator that scans, verifies and batches, and never deletes code itself. Scanning runs the TypeScript compiler with unused-locals and unused-parameters checks through bunx, alongside several explore agents that look for things like orphaned files.

When should I use Dead Code Remover?

Dead Code Remover fits situations like: cleaning unused exports, imports and files out of a TypeScript codebase; verifying that a symbol is truly unreferenced before deleting it; running a cleanup pass that must not touch entry points or tests.

How do I install Dead Code Remover in Claude Code?

Run `npx skills add code-yeongyu/oh-my-openagent --skill remove-deadcode -a claude-code`. Or copy the skill folder (.agents/skills/remove-deadcode in code-yeongyu/oh-my-openagent) into .claude/skills/remove-deadcode in your project. Claude Code loads it when a task matches its description.

How do I install Dead Code Remover in Codex?

Run `npx skills add code-yeongyu/oh-my-openagent --skill remove-deadcode -a codex`. Or copy the skill folder (.agents/skills/remove-deadcode in code-yeongyu/oh-my-openagent) into .agents/skills/remove-deadcode in your project. Codex loads it when a task matches its description.

Can I use Dead Code Remover in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add code-yeongyu/oh-my-openagent --skill remove-deadcode -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/remove-deadcode, .gemini/skills/remove-deadcode, .github/skills/remove-deadcode and .opencode/skills/remove-deadcode in your project.

What does Dead Code Remover need to run?

Going by SKILL.md and its folder, Dead Code Remover needs the command-line tools its instructions call (bun, bunx and git). Our summary lists: Bun, for running bunx tsc; A TypeScript project; An LSP find-references tool available to the agent.

Does Dead Code Remover access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Dead Code Remover safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dead Code Remover use?

Dead Code Remover has a licence file (the repository's licence) that doesn't match a standard licence. Read it on GitHub before reusing the skill.

How many tokens does Dead Code Remover use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dead Code Remover?

Skills that share tags, products or a category with Dead Code Remover: DRY Refactoring With jscpd (kucherenko/jscpd, 6.3k stars), Dead Code Removal with Knip (shift-editor/shift, 343 stars), Code Refiner (Mathews-Tom/armory, 327 stars) and OpenTUI Terminal Interfaces (cline/cline, 70k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dead Code Remover?

code-yeongyu (a GitHub user) maintains it in code-yeongyu/oh-my-openagent, which has 69,850 GitHub stars. The repository holds 44 skills in this directory. The repository was last updated on October 7, 2026.

Source: code-yeongyu/oh-my-openagent on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.