rescue

Orchestrates multi-session legacy refactoring with diagnostics, characterization tests, and incremental module changes.

82|23|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Rune-kit/rune --skill rescue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rescue
Source: https://github.com/Rune-kit/rune/tree/main/skills/rescue
Command: npx skills add https://github.com/Rune-kit/rune --skill rescue

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill tackles the daunting task of refactoring and modernizing old, messy, or legacy codebases without introducing regressions or breaking existing functionality.

Core Features & Use Cases

  • Multi-session Workflow: Manages complex refactoring over multiple interactions, including assessment, safety net creation, incremental changes, and progress tracking.
  • Automated Diagnostics: Uses autopsy to assess codebase health and identify modules needing refactoring.
  • Safety First: Implements characterization tests and rollback points via safeguard before any code changes.
  • Incremental Surgery: Refactors one module at a time using surgeon with predefined patterns like Strangler Fig or Branch by Abstraction.
  • Progress Tracking: Maintains state across sessions using journal and session-bridge.

Quick Start

Initiate a legacy code refactoring process by running the rescue skill on your project.

Frequently Asked Questions about rescue

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

FAQPage Schema
How do I safely refactor legacy code without introducing regressions?

To safely refactor legacy code, establish safety nets by generating characterization tests and rollback points before modifying modules. This ensures existing functionality is preserved by validating behavior against baseline tests throughout the modernization process.

What is the best way to modernize a large, messy codebase incrementally?

The best way to modernize a large codebase incrementally is using established patterns like Strangler Fig or Branch by Abstraction. This approach isolates and refactors individual modules one at a time while tracking progress across multiple sessions.

Why do I need characterization tests before refactoring old code?

Characterization tests are needed before refactoring old code to capture and lock in the system's current behavior. They act as a safety net, ensuring that incremental changes during code modernization do not alter existing functionality or introduce regressions.

Can I track refactoring progress across multiple sessions?

Yes, you can track refactoring progress across multiple sessions using a journal and session bridge. This multi-session workflow maintains state, allowing complex legacy code modernization to pause and resume without losing diagnostic context or incremental changes.

How do automated diagnostics help with code modernization?

Automated diagnostics help with code modernization by assessing overall codebase health and pinpointing specific modules that require refactoring. This targeted assessment allows developers to prioritize incremental surgery on the most problematic legacy code areas first.

When should I not use incremental refactoring on a legacy project?

You should not use incremental refactoring on a legacy project if you cannot establish characterization tests or rollback points as safety gates. Without these safeguards, modifying individual modules risks introducing severe regressions and breaking existing functionality.