reversa-prune

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

Updated May 22, 2026
One-click install
npx skills add https://github.com/GleisonOliveira/dockerpilot-mcp --skill reversa-prune-gleisonoliveira
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-prune
Source: https://github.com/GleisonOliveira/dockerpilot-mcp/tree/main/.agents/skills/reversa-prune
Command: npx skills add https://github.com/GleisonOliveira/dockerpilot-mcp --skill reversa-prune-gleisonoliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing dead code is risky: code that looks unused may be reached through dynamic entry points like routes, events, reflection, or feature flags, or may implement a confirmed business rule that is temporarily disconnected. This Skill prevents accidental deletion of live logic by requiring a formal proof of death before any removal. ## Core Features & Use Cases - Proof of death: Classifies each candidate as truly dead (no static references and no dynamic entry) or as a suspicious orphan that is never auto-removed. - Soul check: Cross-references candidates against the project's confirmed business rules (soul.md) so confirmed business logic is never treated as dead. - Gated, reversible removal: Generates a self-contained plan.html report, requires explicit approval of the removal diff, and records every change as a reversible CHG-NNN.diff. - Use Case: During a refactoring cycle, run it on a module to get a report of provably dead functions removed with evidence attached, while dynamically-dispatched handlers are flagged as suspicious orphans instead of deleted. ## Quick Start Ask the agent to run reversa-prune on a target module and review the generated removal plan with its death proofs before approving the 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 project?▼

Run the reversa-prune skill on a target, which scans for candidates, proves each one has no static references and no dynamic entry points, and only removes code after you approve the diff. Anything uncertain is flagged as a suspicious orphan instead of deleted.

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 via reflection, routes, events, or config, so it is reported but never removed automatically.

Can dead code removal be reversed after applying it?▼

Yes. Every removal is recorded as a CHG-NNN.diff file in the transformation folder, so any change can be reverted by reapplying the diff. The skill also runs the test suite when available to confirm the removal is safe.

Does dead code detection work with reflection or dynamic dispatch?▼

The skill explicitly checks for dynamic entry points including reflection, meta-programming, string-based loading, cron, and feature flags. For languages with heavy dynamic behavior it raises the bar, classifying doubtful candidates as suspicious orphans rather than dead.

Why does the skill refuse to remove some unused-looking code?▼

Code that implements a confirmed business rule from the project's soul.md is never treated as dead, even if it appears unused, because it may be a temporarily disconnected path. It is reported as a suspicious orphan with the rule it serves.