reversa-prune

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

Updated Aug 14, 2026
One-click install
npx skills add https://github.com/Ruggery/OCR_Cartorio --skill reversa-prune-ruggery
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: reversa-prune
Source: https://github.com/Ruggery/OCR_Cartorio/tree/main/.agents/skills/reversa-prune
Command: npx skills add https://github.com/Ruggery/OCR_Cartorio --skill reversa-prune-ruggery

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Removing unused 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 code by requiring formal proof of death before any removal. ## 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 a candidate as dead or as a suspicious orphan. - Soul check: Cross-references candidates against the project's confirmed business rules so that code implementing a confirmed rule is never removed, only flagged. - Gated, reversible removal: Presents a self-contained HTML plan and a removal diff for approval, applies only approved deletions, runs the test suite, and records a reversible CHG-NNN.diff. - Use Case: During a refactoring pass on a legacy service, run this Skill to identify unused functions, get proof that three are truly dead, and keep two others flagged as suspicious orphans because they are reachable via event handlers. ## Quick Start Ask the agent to run /reversa-prune on a target module and approve the removal diff it presents.

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?▼

Run the reversa-prune Skill, which scans for static references and dynamic entry points before classifying code as dead. It presents a removal diff for approval and only deletes code after the gate is approved, keeping the change reversible via a diff file.

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

Dead code has no static references and no known dynamic entry point, making it eligible for removal. A suspicious orphan has no static references but may be reached dynamically through routes, events, reflection, or feature flags, so it is never removed automatically.

Can dead code removal be reversed after deletion?▼

Yes. Every removal is recorded as a CHG-NNN.diff file in the transformation folder, so the deletion can be reverted by reapplying that diff. The Skill also runs the test suite after removal to confirm nothing broke.

Does this Skill work without the reversa-refactor setup?▼

No. It requires the _reversa_refactor/ directory created by running /reversa-refactor first, since it reads the control mode and opportunity context from that structure. Without it, the Skill aborts with an instruction to run the refactor step.

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

Code that implements a confirmed business rule from the project soul file is never treated as dead, even if it appears unused. It may be a temporarily disconnected path, so it is flagged as a suspicious orphan with the rule it serves noted in the report.