refactoring-executor

Execute prioritized refactoring steps with test-first verification in TypeScript projects.

1|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/CAPHTECH/claude-marketplace --skill refactoring-executor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactoring-executor
Source: https://github.com/CAPHTECH/claude-marketplace/tree/main/caphtech-plugin/skills/refactoring-executor
Command: npx skills add https://github.com/CAPHTECH/claude-marketplace --skill refactoring-executor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ts-morph, vitest, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Guides safe, incremental refactoring with continuous validation and rollback support.

Core Features & Use Cases

  • Parse refactoring reports and plan changes
  • Stage-wise verification with tests, type checks, and lint
  • Execution logs and rollback guidelines

Quick Start

Start with a refactoring discovery report and execute changes in small, verifiable steps.

Frequently Asked Questions about refactoring-executor

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

FAQPage Schema
How do I execute TypeScript refactoring safely with test verification?

Safe refactoring execution applies test-first verification to each incremental change. This Skill automates the process by consuming a refactoring discovery report, staging changes in priority order, running unit and integration tests after each step, and maintaining rollback capability so you can revert if tests fail.

Can I use AST-based refactoring with CI pipelines?

Yes. This Skill integrates refactoring execution with CI workflows by leveraging ts-morph for AST transformations, running linting and type checks at each stage, and capturing execution logs. Your CI can validate refactoring steps automatically before merging.

What's the best way to handle refactoring rollbacks in TypeScript projects?

Rollback guidance is built into execution logs and verification reports. If a refactoring step breaks tests or type safety, the Skill produces rollback directives tied to the failing stage, allowing you to backtrack safely without manual code archaeology.

How do I prioritize refactoring targets across a large codebase?

Parse the refactoring discovery report to extract ranked targets, then stage execution by priority. This Skill selects and orders changes automatically, so high-impact or low-risk refactorings run first, reducing iteration time and focusing effort where it matters most.

Do I need both unit and integration tests for incremental refactoring?

Integration testing strengthens confidence in cross-module changes, but unit tests catch most regressions faster. This Skill validates at both levels during execution, so you capture bugs early while maintaining full contract verification across your codebase.

What happens if linting or type checks fail during a refactoring step?

Execution halts at that stage, and the Skill logs the failure with context. You review the violation, adjust the refactoring target or its configuration, and resume from the checkpoint—no need to restart the entire plan.