dead-code-cleanup
Use when the user asks about unused code, cleanup, deleting files or exports, refactoring old areas, reducing bundle size, code hygiene, technical debt, or maintenance in a Repowise-indexed repository.
How do I install this agent skill?
npx skills add https://github.com/repowise-dev/repowise --skill dead-code-cleanupIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides guidelines for identifying and removing unused code using the Repowise utility. It emphasizes safety through user confirmation and risk assessment tools before any deletions occur.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
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
Run repowise dead-code to get findings sorted by confidence tier. Useful flags:
--safe-only— only deletion-ready findings (high confidence, no runtime-load risk factors)--kind unreachable_file— files with no importers--kind unused_export— public symbols nobody uses--kind zombie_package— monorepo packages with no consumers--min-confidence 0.7— raise the floor for a release-ready cleanup--format json— machine output
To roll findings up by directory or owner, the get_dead_code MCP tool takes
group_by="directory" or group_by="owner". To list it, add +get_dead_code
to mcp.tools in .repowise/config.yaml and restart the MCP server.
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.
- Run
repowise risk --target path/to/fileto 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)
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/repowise-dev/repowise/dead-code-cleanup">View dead-code-cleanup on skillZs</a>