code-refactoring

Generate behavior-preserving refactoring plans and task files for Java, Node.js, TypeScript, and Python projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ukrsite/kiro-workflows --skill code-refactoring-ukrsite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactoring
Source: https://github.com/ukrsite/kiro-workflows/tree/main/skills/developer-skills/code-refactoring
Command: npx skills add https://github.com/ukrsite/kiro-workflows --skill code-refactoring-ukrsite

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Planning-only refactoring guidance that yields a formal behavior-preservation contract and an OpenSpec-style task decomposition, without executing any code changes.

Core Features & Use Cases

  • Generates a behavior-preservation contract, dependency maps, risk assessments, rollback and migration strategies.
  • Produces two outputs for execution: refactoring-plan.md and tasks.md, ready for orchestration.
  • Applicable across Java, Node.js, TypeScript, and Python projects with monoliths or large classes requiring restructuring.

Quick Start

Provide a scope for refactoring (e.g., 'refactor this module') and receive two deliverables: refactoring-plan.md and tasks.md.

Frequently Asked Questions about code-refactoring

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

FAQPage Schema
How do I plan a behavior-preserving refactor for a large monolith codebase?

Yes, refactoring planning applies to Java, Node.js, TypeScript, and Python projects, especially monoliths and large classes requiring restructuring. It enforces external-interface stability while detailing risk assessments and safe migration steps for each environment.

What deliverables do I get from a refactoring plan?

To generate refactoring tasks, you provide a refactoring scope, such as a target module or class. The Skill then decomposes the work into an OpenSpec-style task list, detailing safe migration steps, risk assessments, and rollback strategies without executing any code changes.

Can I use this refactoring approach with Java and Python projects?

A behavior-preservation contract is a formal agreement ensuring external-interface stability during refactoring. It maps dependencies, details rollback strategies, and outlines safe migration steps to guarantee the codebase behavior remains unchanged throughout the restructuring.

How do I generate tasks for restructuring a large class?

This planning approach outputs documentation and task lists only, deliberately avoiding executing any code changes. It provides a rigorous, behavior-preserving plan with dependency maps and rollback strategies that developers must implement manually or through separate orchestration.

Why do I need a behavior-preservation contract for code restructuring?

To plan a behavior-preserving refactor, you define a formal contract ensuring external-interface stability, generate dependency maps, and produce actionable migration tasks. This Skill outputs a refactoring-plan.md and tasks.md detailing safe rollback strategies.

What are the limitations of planning-only refactoring guidance?

A refactoring plan yields two deliverables: refactoring-plan.md and tasks.md. These files contain the formal behavior-preservation contract, dependency maps, risk assessments, rollback strategies, and an OpenSpec-style task decomposition ready for orchestration.