refactor-workflow

Coordinate phased, risk-aware code refactors using ast-grep and comby.

1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/IndianBoy42/dot-opencode --skill refactor-workflow-indianboy42
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-workflow
Source: https://github.com/IndianBoy42/dot-opencode/tree/main/skills/refactor-workflow
Command: npx skills add https://github.com/IndianBoy42/dot-opencode --skill refactor-workflow-indianboy42

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Systematize large-scale code refactoring to reduce risk and ensure consistent changes.

Core Features & Use Cases

  • Tools-based methodology using ast-grep, comby, and manual transformations to perform safe, phased refactors.
  • Phase-driven approach: assessment, strategy, execution, verification, with risk-awareness.
  • Use Case: reorganizing core modules, updating APIs, and migrating dependencies across a codebase.

Quick Start

Initiate a scope-driven refactor of the target codebase using ast-grep and comby, following the four-phase methodology.

Frequently Asked Questions about refactor-workflow

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

FAQPage Schema
How do I safely perform large-scale codebase refactoring without breaking existing functionality?

Large-scale codebase refactoring is executed safely using a phase-driven workflow that includes assessment, strategy, execution, and verification. This risk-aware methodology ensures consistent changes across multiple files without breaking existing functionality.

When do I need ast-grep or comby for codebase refactoring?

You need ast-grep or comby for codebase refactoring when applying structural code transformations across multiple files. These tools automate pattern matching to ensure consistent changes during architecture shifts, API updates, and dependency migrations.

What is the best way to update APIs and migrate dependencies across multiple files?

The best way to update APIs and migrate dependencies is a systematic, phase-driven workflow using ast-grep, comby, and manual transformations. This approach manages risk by separating the process into assessment, strategy, execution, and verification steps.

Can I use this refactoring workflow for reorganizing core modules in my codebase?

Yes, you can use this refactoring workflow for reorganizing core modules in your codebase. The methodology applies structural transformations through assessment, strategy, execution, and verification phases to ensure consistent and safe module reorganization.

Does phased refactoring reduce risk during architecture shifts?

Phased refactoring reduces risk during architecture shifts by separating work into assessment, strategy, execution, and verification steps. This systematic approach ensures consistent transformations and verifies changes before completion.

What are the limitations of using ast-grep and comby for code transformations?

Ast-grep and comby handle structural code transformations but require manual transformations for complex logic. The workflow mitigates limitations by integrating risk management and verification phases alongside these tools to ensure safe refactoring.