Skip to content
Skillpedia
General coding8.1k Β· #12568

dead-code-cleanup

What it does

This skill helps your AI locate dead code and suggest what can be removed. It is for developers who want to reduce clutter, bundle size or technical debt.

When to use it

  • βœ“When you ask to remove unused code or reduce the size of a project.
  • βœ“When you want to find unreachable files, unused exports or leftover packages.
  • βœ“When you are planning a cleanup and need a list ranked by confidence.

Skill link

https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/repowise-dev/repowise/blob/main/plugins/claude-code/skills/dead-code-cleanup/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œFind the dead code in this project that is safe to delete, and show me why each item looks unused.”

5 new skills a week. 1 minute to read.

How it works

The skill asks Repowise for dead code findings, sorted by confidence. It suggests deletion only for items marked safe, presents lower-confidence items as things to investigate, and asks you to confirm before deleting anything.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Dead Code Cleanup with Repowise

Repowise detects dead code through graph analysis β€” no LLM needed, works even with a template-rendered wiki.

When the user asks about dead/unused code

Call get_dead_code() to get findings sorted by confidence tier. Useful parameters:

  • safe_only=true β€” only findings confirmed safe to delete (confidence >= 0.7)
  • kind="unreachable_file" β€” files with no importers
  • kind="unused_export" β€” public symbols nobody uses
  • kind="zombie_package" β€” monorepo packages with no consumers
  • directory="src/old/" β€” limit to a specific directory
  • tier="high" β€” only high-confidence findings (>= 0.8)
  • min_confidence=0.7 β€” raise the floor (default is 0.5) for a release-ready cleanup
  • group_by="directory" or group_by="owner" β€” roll up to see where the dead code concentrates and who owns the most of it

How to present findings

  • Only suggest deletion for findings with safe_to_delete: true
  • For lower-confidence findings, present them as "candidates to investigate" not "things to delete"
  • Dynamically-loaded code (plugins, handlers, adapters) may appear as dead code but isn't β€” Repowise filters common patterns but edge cases exist

Before deleting anything

  1. Confirm with the user. Present the file/symbol name, confidence score, and why Repowise thinks it's dead.
  2. Call get_risk(targets=["path/to/file"]) to double-check dependents.
  3. Recently-modified "dead" code is more likely a false positive β€” flag this if the finding has recent git activity.

Safe deletion order

  1. Unreachable files first (whole file removal, cleanest)
  2. Unused internal symbols next
  3. Unused exports last (highest false-positive risk due to potential dynamic imports)
FAQ

Will it delete code on its own?

No. The skill asks you to confirm each deletion first.

Can it be wrong about plugins or dynamic code?

Yes, dynamically loaded code can look unused, so the skill warns that some edge cases exist.

What does it check before deleting?

It checks dependencies on the file first, using the risk check, before recommending removal.

Details

Original description by the author

Use when the user asks about cleanup, removing unused code, refactoring, reducing bundle size, or identifying dead code in a Repowise-indexed codebase (.repowise/ directory exists). Also activates when discussing technical debt, code hygiene, or repository maintenance.

repo: repowise-dev/repowise

Popularity

GitHub stars
8.1k
Ranking position
#12568
License
AGPL-3.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills