refactor

Automate deterministic code refactoring with dependency tracking and test verification.

17|Updated May 29, 2026
One-click install
npx skills add https://github.com/code-yeongyu/lazyclaudecode --skill refactor-code-yeongyu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/code-yeongyu/lazyclaudecode/tree/main/plugins/omo/skills/refactor
Command: npx skills add https://github.com/code-yeongyu/lazyclaudecode --skill refactor-code-yeongyu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Intelligent, deterministic refactoring is challenging and error-prone; this Skill provides a structured, safety-checked automation to modify codebases with confidence.

Core Features & Use Cases

  • Automated, stepwise refactoring with dependency awareness and test verification.
  • Plan-driven execution with rollback and commit checkpoints.
  • Multi-scope support: file, module, or entire project with a phase-based workflow.

Quick Start

Provide a target, scope, and desired outcome to trigger a safe, plan-driven refactor.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I automate code refactoring across a whole project without breaking dependencies?▼

You can safely automate code refactoring across a project using a plan-driven workflow that tracks dependencies. It executes changes stepwise with built-in safety checks and test verification to ensure nothing breaks.

What is deterministic code refactoring and how does it work?▼

Deterministic code refactoring is an automated process that modifies codebases safely by generating an execution plan first. It uses phase-based workflows and commit checkpoints to guarantee predictable, reversible outcomes.

How do I safely refactor a module with rollback support if tests fail?▼

To safely refactor a module, use an automated workflow that verifies tests after each step. It provides rollback capabilities and commit checkpoints, allowing you to revert changes immediately if verification fails.

Can I use LSP and ast-grep for automated project-wide code changes?▼

Yes, automated project-wide code changes leverage tools like LSP and ast-grep to intelligently modify code. The process supports file, module, and entire project scopes with full dependency awareness.

What is the best way to plan and execute a large-scale codebase refactor?▼

The best way to execute a large-scale codebase refactor is using a plan-driven automation tool. It generates a stepwise execution plan, applies safety checks, and tracks dependencies across the entire project.

When should I not use automated refactoring for my code?▼

You should avoid automated refactoring when a codebase lacks test coverage, as the workflow relies on test verification for safety. Without tests, the rollback and commit checkpoints cannot validate changes effectively.