reversa-refactor

Inventories and prioritizes legacy code refactoring opportunities by ROI for specialist routing.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Legacy codebases accumulate technical debt, but teams struggle to decide where refactoring effort pays off. This Skill analyzes working legacy code, inventories improvement opportunities, and ranks them by real return on investment (hotpath impact, coupling, change frequency) instead of aesthetics, without ever modifying the code itself. ## Core Features & Use Cases - Opportunity Inventory: Scans target code and classifies each finding by specialist verb (restructure, modularize, decouple, optimize, simplify, standardize, prune), recording each as a structured YAML+Markdown artifact. - ROI-Based Prioritization: Ranks opportunities by impact, cost, and risk, with confidence levels (green/yellow/red) based on test coverage and behavioral proof. - Specialist Routing: Presents a prioritized menu and routes the chosen opportunity to the appropriate transformation specialist, suggesting chaining order when multiple verbs apply. - Use Case: A developer says "the freight calculation module is a monster." The Skill resolves the context, reads the code and specs, registers opportunities like long methods and concrete dependencies in _reversa_refactor/<context>/opportunities/, and routes the top pick to the right specialist. ## Quick Start Ask the agent to analyze the legacy code in a specific module and list which refactorings are worth doing first, ordered by return on investment.

Frequently Asked Questions about reversa-refactor

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

FAQPage Schema
How do I prioritize which legacy code to refactor first?▼

Prioritize by ROI: impact times cost times risk, not aesthetics. This Skill uses a hotpath heuristic, favoring code with high coupling, high execution frequency, or high change rate in git history, and marks each opportunity with a confidence level based on test coverage.

How to identify code smells in a legacy codebase automatically?▼

The Skill reads the target code and classifies findings into seven categories: long methods and duplication (restructure), mixed responsibilities (modularize), concrete dependencies and cycles (decouple), wasted resources (optimize), overly complex logic (simplify), inconsistent style (standardize), and dead code (prune).

Does this refactoring tool modify my source code?▼

No. This Skill never applies transformations; it only inventories, prioritizes, and routes opportunities to specialist skills. It writes exclusively to the `_reversa_refactor/` directory and treats all project code, specs, and soul files as read-only.

What AI agents and platforms support this refactoring skill?▼

It is compatible with Claude Code, Codex, Cursor, Gemini CLI, and other agents supporting the Agent Skills format, as declared in its frontmatter compatibility field.

When should I not refactor code without test coverage?▼

Opportunities without behavioral proof are marked red (low confidence) and require a characterization safety net before any transformation. Under the default safety_net_policy, structural changes demand green tests before and after, and unproven changes stop at the approval gate.