refactor-workflow

Refactor code incrementally while verifying tests pass before and after each transformation.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/mscipio/bilt-transactions-export --skill refactor-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-workflow
Source: https://github.com/mscipio/bilt-transactions-export/tree/main/.opencode/skills/refactor-workflow
Command: npx skills add https://github.com/mscipio/bilt-transactions-export --skill refactor-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured and safe methodology for refactoring code, ensuring that functionality is preserved while improving code quality and maintainability.

Core Features & Use Cases

  • Disciplined Refactoring: Follows an analysis-first approach with incremental changes.
  • Behavior Preservation: Guarantees that code tests pass before and after each refactoring step.
  • Use Case: When a complex function is identified as a "code smell," this Skill guides the process of breaking it down into smaller, more manageable methods, ensuring all existing tests continue to pass throughout the transformation.

Quick Start

Use the refactor-workflow skill to refactor the 'AuthService' by extracting 'TokenService' and splitting the 'handleOAuth' method.

Frequently Asked Questions about refactor-workflow

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

FAQPage Schema
How do I refactor code safely without breaking existing functionality?

Safe code refactoring requires an analysis-first methodology with incremental changes, verifying that all tests pass before and after each transformation to guarantee functional equivalence and behavior preservation throughout the process.

What are common code smells and how do I identify them for refactoring?

Common code smells include God Classes, Feature Envy, and Long Parameter Lists. Identifying these structural issues during the analysis phase guides targeted remediation through techniques like Extract Method and Move Method.

How do I break down a complex function into smaller methods?

Breaking down complex functions uses the Extract Method technique to split logic into smaller, manageable methods. This incremental refactoring approach ensures tests continue passing throughout the transformation process.

Can I refactor code incrementally if I have a large class with too many responsibilities?

Yes, large classes with too many responsibilities, known as God Classes, can be refactored incrementally. The process uses disciplined transformations like Move Method to split responsibilities while maintaining functional equivalence.

What is the best way to fix Long Parameter Lists in software development?

Fixing Long Parameter Lists involves applying targeted refactoring techniques to consolidate or group parameters. This disciplined approach improves code quality and maintainability while ensuring tests pass before and after changes.