refactoring

Plan complex code refactoring by diagnosing structural problems and documenting migration strategies.

Updated Oct 23, 2025
One-click install
npx skills add https://github.com/felixmin/robot-learning-from-video --skill refactoring-felixmin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring
Source: https://github.com/felixmin/robot-learning-from-video/tree/main/.codex/skills/refactoring
Command: npx skills add https://github.com/felixmin/robot-learning-from-video --skill refactoring-felixmin

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of undertaking non-trivial code refactors by providing a structured, multi-agent approach to planning, ensuring behavior stability while improving code structure.

Core Features & Use Cases

  • Diagnose Structural Issues: Identifies the root cause of code complexity.
  • Preserve Behavior: Freezes critical behaviors and contracts to prevent regressions.
  • Explore Designs: Evaluates multiple target structures and migration paths.
  • Generate Canonical Plan: Creates a detailed plan in docs/plan/ for the refactor.
  • Use Case: When a large module becomes unwieldy and difficult to maintain, this Skill can be used to meticulously plan its restructuring without altering its external functionality.

Quick Start

Use the refactoring skill to plan a structural improvement for the lerobot/ submodule.

Frequently Asked Questions about refactoring

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

FAQPage Schema
How do I plan a large code refactoring without breaking existing functionality?

Plan code refactoring by diagnosing structural complexity, freezing essential behaviors to prevent regressions, exploring alternative designs, and documenting a canonical migration strategy in your docs directory.

What is the best way to restructure a large module that has become unwieldy?

Restructure unwieldy modules by using a multi-agent planning approach that diagnoses root causes of complexity, evaluates multiple target structures, and generates a detailed migration plan without altering external functionality.

When do I need a formal migration strategy for software design improvements?

You need a formal migration strategy when undertaking non-trivial code refactors that require behavior stability, ensuring structural simplification and adherence to existing configuration standards while exploring alternative designs.

How do I maintain code quality when improving the structure of a complex submodule?

Maintain code quality during structural improvements by freezing critical contracts, evaluating multiple target structures, and documenting a canonical migration plan to ensure behavioral stability and structural simplification.

Does this refactoring approach work for modules with strict configuration standards?

Yes, this refactoring approach explicitly adheres to existing configuration standards, planning structural code improvements by diagnosing issues and exploring alternative designs while ensuring compliance with your current setup.

Why should I explore alternative designs before starting a structural code refactor?

Exploring alternative designs before refactoring ensures you choose the optimal migration path for structural simplification, allowing you to freeze essential behaviors and document a canonical strategy that prevents regressions.