refactoring-workflow

Guide software code refactoring through analysis, planning, implementation, and verification phases.

Updated Nov 21, 2025
One-click install
npx skills add https://github.com/donchrillo/temu --skill refactoring-workflow-donchrillo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-workflow
Source: https://github.com/donchrillo/temu/tree/main/.opencode/skills/refactoring-workflow
Command: npx skills add https://github.com/donchrillo/temu --skill refactoring-workflow-donchrillo

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill provides a systematic process to refactor code, ensuring safety, effectiveness, and minimizing risks through analysis, planning, and verification.

Core Features & Use Cases

  • Systematic Refactoring: Guides users through a 4-phase workflow (Analyze, Plan, Implement, Verify).
  • Risk Assessment: Uses a "traffic light" system (Red, Yellow, Green) to determine refactoring safety based on tests, criticality, and deployment status.
  • Code Quality Improvement: Identifies and addresses code smells like God Classes, long functions, and magic numbers.
  • Use Case: A developer needs to refactor a complex order_service.py file. They use this Skill to analyze its metrics, plan the refactoring steps (e.g., splitting a God Class), implement changes incrementally, and verify the outcome with automated checks.

Quick Start

Use the refactoring-workflow skill to analyze the file 'order_service.py' and suggest refactoring steps.

Frequently Asked Questions about refactoring-workflow

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

FAQPage Schema
How do I safely refactor complex code with code smells like God Classes?

To safely refactor complex code, this Skill guides you through a four-phase workflow: Analyze, Plan, Implement, and Verify. It identifies code smells like God Classes and magic numbers, then addresses them through incremental changes to minimize risk.

What is the step-by-step process for refactoring a large software file?

The refactoring process involves analyzing file metrics, planning refactoring steps, implementing changes incrementally, and verifying the outcome with automated checks. This structured workflow ensures software development changes are effective and safe.

How do I verify code quality after implementing refactoring steps?

You verify code quality after refactoring by integrating with development tools for syntax checking, testing, and import verification. This verification phase ensures the incremental implementation did not break existing software functionality.

Can I use this refactoring workflow on code without existing tests?

You can use this workflow on code without tests, but the risk assessment system will likely classify the refactoring as high risk. The traffic light mechanism evaluates test coverage to determine if it is safe to proceed with code quality improvements.