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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
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 importerskind="unused_export"β public symbols nobody useskind="zombie_package"β monorepo packages with no consumersdirectory="src/old/"β limit to a specific directorytier="high"β only high-confidence findings (>= 0.8)min_confidence=0.7β raise the floor (default is 0.5) for a release-ready cleanupgroup_by="directory"orgroup_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
- Confirm with the user. Present the file/symbol name, confidence score, and why Repowise thinks it's dead.
- Call
get_risk(targets=["path/to/file"])to double-check dependents. - Recently-modified "dead" code is more likely a false positive β flag this if the finding has recent git activity.
Safe deletion order
- Unreachable files first (whole file removal, cleanest)
- Unused internal symbols next
- 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
Comments
- β¦
More skills from this repository
architectural-decisions
8.1kHelps your agent find out why code is built a certain way, using recorded decisions and history before it changes an architecture.
change-review
8.1kHelps your agent review a pull request or set of changes before merging, showing the risk, the files affected and what else should change.
code-health
8.1kHelps your agent score code health file by file, find the riskiest files and pick what to refactor next, using Repowise analysis.
codebase-exploration
8.1kHelps your agent understand an unfamiliar project quickly by answering how code works, who calls what and where things are built.
Similar skills
diffs
394kLets your agent produce a real, shareable diff of edits as a viewer link or image file, instead of a hand-written summary.
coding-agent
394kHelps your agent hand a larger coding job to Codex, Claude Code, or OpenCode as a background worker, then check on its progress.
gh-issues
394kHelps your agent find GitHub issues, pick the ones to work on, and open pull requests with fixes, including follow-up on review comments.