surgeon

Refactor a single code module incrementally using Strangler Fig patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the risk and complexity of refactoring code by breaking down large changes into small, manageable, and safe steps, ensuring the codebase remains stable throughout the process.

Core Features & Use Cases

  • Incremental Refactoring: Applies proven patterns like Strangler Fig, Branch by Abstraction, and Expand-Migrate-Contract to refactor a single module per session.
  • Safety First: Enforces strict rules like a 5-file blast radius, running tests after every single edit, and verifying safeguards before changes.
  • Use Case: You need to refactor a large, complex module that is critical to your application. The surgeon skill allows you to do this piece by piece, with each step being tested and committed, minimizing the risk of introducing regressions.

Quick Start

Use the surgeon skill to refactor the 'user-authentication' module using the Strangler Fig pattern.

Frequently Asked Questions about surgeon

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

FAQPage Schema
How do I safely refactor a large, complex module without breaking existing behavior?

Safely refactor a complex module by applying incremental patterns like Strangler Fig and Branch by Abstraction. This breaks large structural changes into small, manageable steps, running tests after every edit to preserve external behavior and prevent regressions.

What is the Strangler Fig pattern and when should I use it for code refactoring?

The Strangler Fig pattern is an incremental refactoring technique used to gradually replace legacy code. You should use it when improving complex, critical modules, allowing safe structural migration piece by piece without altering external behavior.

How does incremental refactoring enforce safety limits during structural improvements?

Incremental refactoring enforces safety by applying strict blast radius limits, such as a 5-file maximum per session. It verifies safeguards before changes and runs post-edit testing after every single modification to maintain codebase stability.

Can I use the Expand-Migrate-Contract pattern to refactor a single module per session?

Yes, you can refactor a single module per session using the Expand-Migrate-Contract pattern. This approach ensures structural improvements are targeted, manageable, and fully tested before moving on to other modules.

What are the limitations of using a strict blast radius for module refactoring?

A strict blast radius limits refactoring scope to a maximum of 5 files, ensuring changes remain isolated and testable. This constraint prevents widespread regressions but means large cross-module refactoring must be broken into multiple separate sessions.