Dead Code Eliminator logo

Dead Code Eliminator

Organization
SkillMedev
dead-code-eliminator

Proves code is unreachable with converging evidence, then removes it and its tests, fixtures, and flags in reversible slices without breaking dynamic callers. Use when deleting suspected dead code, cleaning up after a migration or feature retirement, trimming a bloated module, or before estimating work on unfamiliar code. Do NOT use when you want to survey and rank an area's debt without committing to deletion - use find-tech-debt instead.

Overview

PublisherSkillMedev
Repositoryskills
Skill namedead-code-eliminator
Stars
25
Forks
3
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by SkillMedev on GitHub. Read the source before you install it.

Installation

Install the Dead Code Eliminator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/SkillMedev/skills/tree/main/skills/dead-code-eliminator
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/SkillMedev/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/dead-code-eliminator .claude/skills/dead-code-eliminator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Dead Code Eliminator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Dead Code Eliminator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Dead Code Eliminator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Dead Code Eliminator

Delete code only after converging evidence proves it dead, then remove it in reversible slices that include its tests, fixtures, config, and flags.

Workflow

  1. Scope one cluster. Pick a single symbol, file, or feature to prove dead. Do not batch unrelated removals - a regression must point to one change.
  2. Gather static evidence. Run the language's dead-code detector (ts-prune or knip for TS/JS, vulture for Python, deadcode for Go) and a dependency grapher (madge) or IDE "find usages". Record what each reports unreachable.
  3. Gather runtime evidence. Check production coverage or profiling data over a representative window - at least 30 days for user-facing paths, 90+ days for code tied to monthly or quarterly jobs - and telemetry: was this endpoint, job, or branch hit this quarter? A symbol is a deletion candidate only when static analysis AND runtime evidence agree. One signal alone produces false positives that take down prod.
  4. Hunt the dynamic callers static tools miss. Grep the symbol name as a string (reflection, string-keyed dispatch, serialization). Check DI containers, registries, ORM hooks, cron/queue workers, and feature-flag config. Search infra repos and other services. Public API surface and library exports are reachable by definition unless you control every consumer.
  5. Classify the kind of dead, because each is removed differently. Unreachable (no path calls it) → delete. Unused (callable, never called) → delete. Redundant (duplicates a live path) → repoint callers first. Dormant-behind-a-flag (flag off for a cycle) → retire the flag first, then delete its branch.
  6. Soft-delete risky removals first. Replace the suspect path with log-and-throw, or gate it behind a kill flag while keeping the code, for one full business cycle - 30 days minimum, 90 for anything touching monthly or quarterly processes. If nothing fires the log, proceed. For low-risk leaf code, skip to step 7.
  7. Delete in a focused PR. Remove the code AND its tests, fixtures, config, flags, and now-orphaned imports. Keep the diff under roughly 400 changed lines so it is reviewable in one sitting; a bigger cluster gets split into multiple PRs. Let CI and the type-checker catch references the search missed. No formatting or refactors in the same diff.

Deliverable

Produce a deletion PR (one per cluster) containing the removed code plus its entire footprint - tests, fixtures, config, flags, orphaned imports - and a PR description that cites the two converging evidence signals, names which of the four kinds of dead the code is, and, for soft-deleted paths, records the observation window with zero hits.

Quality bar

  • Every deletion cites at least two independent converging signals (static + runtime).
  • The PR removes the dead symbol's entire footprint, leaving no orphaned test, fixture, or flag.
  • The removal names which of the four kinds of dead it is.
  • Reverting the PR cleanly restores the prior behavior.

Do NOT

  • Treat "I can't find a caller" as proof of death - absence of a static caller is not absence of a dynamic one.
  • Delete code you only suspect is dead, public API without consumer proof, or code added in the last few weeks (it may be ahead of its caller).
  • Skip the string-grep and DI/flag/registry check for anything invoked indirectly.
  • Fold formatting or refactors into a deletion PR.
  • Batch many clusters into one PR.

When evidence is ambiguous, mark the symbol deprecated and instrument it rather than guessing.

Frequently asked questions

What does the Dead Code Eliminator AI skill do?

Proves code is unreachable with converging evidence, then removes it and its tests, fixtures, and flags in reversible slices without breaking dynamic callers. Use when deleting suspected dead code, cleaning up after a migration or feature retirement, trimming a bloated module, or before estimating work on unfamiliar code. Do NOT use when you want to survey and rank an area's debt without committing to deletion - use find-tech-debt instead.

Why use Dead Code Eliminator on TypingMind?

Because you install it once and use it with any model. Dead Code Eliminator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Dead Code Eliminator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/SkillMedev/skills/tree/main/skills/dead-code-eliminator. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Dead Code Eliminator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Dead Code Eliminator?

As many as you like. As long as a model supports skills, you can use Dead Code Eliminator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Dead Code Eliminator AI skill free?

Yes. It is published on GitHub by SkillMedev under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇