omk-flow-refactor

Coordinate incremental JavaScript/TypeScript refactors with verification and regression review.

130|14|Updated Apr 30, 2026
One-click install
npx skills add https://github.com/dmae97/oh-my-kimi --skill omk-flow-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: omk-flow-refactor
Source: https://github.com/dmae97/oh-my-kimi/tree/main/templates/skills/kimi/omk-flow-refactor
Command: npx skills add https://github.com/dmae97/oh-my-kimi --skill omk-flow-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams refactor code while minimizing the risk of breaking existing behavior and silently introducing regressions.

Core Features & Use Cases

  • Behavior-preserving refactor planning: defines refactor goals and explicit invariants that must not change.
  • Incremental, step-by-step execution: applies one small refactor step at a time with targeted verification after each step.
  • Regression review and quality gates: runs final checks and reviews the resulting diff to confirm the change matches the intended behavior.

Quick Start

Ask an AI to run the omk-flow-refactor process by stating the refactor goal, identifying affected files and tests, applying the smallest safe steps, and iterating until all checks pass.

Frequently Asked Questions about omk-flow-refactor

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

FAQPage Schema
How do I refactor code without breaking existing behavior or causing regressions?

To refactor code without regressions, apply behavior-preserving planning by defining explicit invariants, executing incremental changes, and running targeted test verification after each step. Finally, review the diff against a quality gate to confirm the intended behavior is maintained.

What is the safest way to execute multi-file refactors across JavaScript and TypeScript codebases?

The safest way to execute multi-file refactors across JavaScript and TypeScript codebases is through stepwise execution. You apply one small refactor step at a time, perform targeted checks on affected call sites and public APIs, and roll back or repair the smallest failing step before proceeding.

How does incremental refactoring help prevent silent regressions?

Incremental refactoring prevents silent regressions by isolating changes into small, verifiable steps. By running targeted checks and test verification after each individual edit, you can immediately detect and repair behavior deviations before they compound across the codebase.

Can I use this refactoring process for changes that affect public APIs and call sites?

Yes, this refactoring process explicitly supports changes that affect public APIs and call sites. It coordinates incremental edits with targeted verification across affected files and tests to ensure that external behavior remains preserved throughout the refactor.

What should I do if a verification check fails during a stepwise code refactor?

If a verification check fails during a stepwise code refactor, you should roll back or repair the smallest failing step. This targeted correction prevents cascading failures and keeps the refactor aligned with the defined behavior invariants before moving forward.

Why do I need a regression review after completing an incremental refactor?

You need a final regression review after completing an incremental refactor to act as a quality gate. It runs final checks and evaluates the resulting diff to confirm that the overall change accurately matches the intended behavior and introduces no regressions.