reversa-prune

Removes dead code only after proving no static references or dynamic entry points exist.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/lacsousa/mediclaw-system --skill reversa-prune-lacsousa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-prune
Source: https://github.com/lacsousa/mediclaw-system/tree/main/.agents/skills/reversa-prune
Command: npx skills add https://github.com/lacsousa/mediclaw-system --skill reversa-prune-lacsousa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing unused code is risky: code that looks dead may be reached through dynamic entry points like routes, events, reflection, or feature flags, and deleting it can silently break the system. This Skill enforces a proof-based dead code removal workflow that only deletes what is verifiably dead and flags everything else as a suspicious orphan. ## Core Features & Use Cases - Death-proof classification: Scans the full codebase for static references and checks dynamic entry points (routes, events, reflection, string loading, cron, feature flags) before classifying any candidate as dead. - Business-rule safeguard: Cross-checks candidates against the project's soul.md and confirmed specs so code implementing a confirmed business rule is never removed, even if it appears unused. - Gated, reversible removal: Generates a self-contained plan.html report, requires explicit approval of the removal diff, and records every change as a revertible CHG-NNN.diff file. - Use Case: During a refactoring cycle, you suspect several functions and modules are unused. Run this Skill to get a per-snippet proof of death, an approval gate showing the exact removal diff, and a report listing suspicious orphans that were deliberately kept. ## Quick Start Ask the agent to run /reversa-prune on a specific opportunity or target, then review the death-proof report and approve the removal diff.

Frequently Asked Questions about reversa-prune

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely remove dead code from a codebase?▼

Dead code removal is safe only when each candidate has no static references and no dynamic entry points such as routes, events, reflection, or feature flags. This Skill performs a full usage scan, attaches a per-snippet proof of death, and requires an approved diff before deleting anything.

What is the difference between dead code and a suspicious orphan?▼

Dead code has zero static references and no known dynamic entry point, making it eligible for removal. A suspicious orphan has no static references but might be reached dynamically or implements a confirmed business rule, so it is reported and never removed automatically.

Can dead code detection handle reflection and dynamic loading?▼

Yes, the workflow explicitly checks dynamic entry points including reflection, meta-programming, string-based loading, configuration, cron, and feature flags. For languages with heavy dynamic behavior, the rigor is raised and doubtful cases are classified as suspicious orphans.

Does this Skill delete code without confirmation?▼

No, removal has a mandatory approval gate in every control mode, including autonomous mode. The agent shows the removal diff with the death proof attached and only applies changes after explicit approval, and every change is revertible via its CHG-NNN.diff file.

What happens if unused code implements a business rule?▼

Code implementing a confirmed business rule is never treated as dead, even when it appears unused. It is classified as a suspicious orphan, and the report identifies which confirmed rule it serves so the team can decide whether to reconnect it.