code-refactor-executor

Execute multi-stage refactoring plans from audit.md and improvements.md.

2|1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/harshitsinghbhandari/domain-expansion --skill code-refactor-executor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-refactor-executor
Source: https://github.com/harshitsinghbhandari/domain-expansion/tree/main/skills/code-refactor-executor
Command: npx skills add https://github.com/harshitsinghbhandari/domain-expansion --skill code-refactor-executor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Executes a multi-stage refactoring plan based on audit.md and improvements.md. It reads recommendations, scans the target source code, and builds an implementation roadmap before applying atomic code transformations.

Core Features & Use Cases

  • Contextual analysis and synthesis of the "Why" from audit.md with the "How" from improvements.md, aligned to the current codebase state.
  • Implementation planning: generates a detailed refactor-plan.md with stages, targets, actions, and verifications.
  • Safe execution: gates changes behind reviews and validations (builds/tests) to prevent regressions.

Quick Start

Provide the workspace context and request a staged refactor plan ready for execution.

Frequently Asked Questions about code-refactor-executor

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

FAQPage Schema
How do I execute a staged code refactoring plan safely?

To execute a staged code refactoring plan safely, the workspace context is read alongside audit and improvements files to generate an implementation roadmap. Atomic code transformations are then applied behind validation gates to prevent regressions.

What is the best way to automate code improvements from an audit?

Automating code improvements from an audit involves synthesizing the audit recommendations with the current codebase state. A detailed refactor plan is generated with specific stages, targets, and verifications before applying changes.

How does gated execution work during a codebase refactor?

Gated execution during a codebase refactor works by requiring validations, such as builds or tests, to pass before applying atomic code changes. This ensures phased planning and prevents regressions during the transformation process.

Can I generate a refactoring roadmap without stopping to manually write implementation steps?

Yes, you can generate a refactoring roadmap automatically. The process scans the target source code, reads the improvement recommendations, and outputs a detailed refactor-plan.md containing stages, targets, actions, and verifications.

What do I need to provide to start an automated end-to-end refactor?

To start an automated end-to-end refactor, you need to provide the workspace context and ensure the audit.md and improvements.md files are available. A staged refactor plan ready for execution is then generated from these inputs.

Why should I use a phased planning approach for source code transformations?

A phased planning approach for source code transformations ensures that changes are applied atomically and gated behind reviews. This prevents regressions by verifying each stage through tests or builds before proceeding.