refactor

Coordinates planning, optional test-writing, task execution, and review for refactors.

31|6|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/nickmaglowsch/claude-setup --skill refactor-nickmaglowsch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/nickmaglowsch/claude-setup/tree/main/.claude/skills/refactor
Command: npx skills add https://github.com/nickmaglowsch/claude-setup --skill refactor-nickmaglowsch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The refactor workflow currently suffers from fragmented tooling and manual risk management when making code improvements. This skill provides a repeatable orchestration that coordinates planning, optional test-writing, task execution, and review to ensure safe, incremental changes.

Core Features & Use Cases

  • Discovery-driven planning with a dedicated refactor planner that surfaces questions and constraints.
  • Optional pre-refactor safety: automatic test-writer to create a safety net before changing code.
  • End-to-end orchestration with a parallel task orchestrator or Agent Teams, plus code-reviewer to validate changes.

Quick Start

Provide a target file or directory and let the refactor pipeline orchestrate planning, tests, and execution.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I safely orchestrate a large-scale code refactor without breaking existing behavior?

A safe code refactor uses discovery-driven planning, an optional pre-refactor test-writer, parallel task orchestration, and automated code review to preserve behavior. It outputs task plans and implementation notes to coordinate incremental changes across multiple waves or teams.

What is the safest way to plan a codebase refactor across multiple development teams?

Planning a codebase refactor across teams requires a dedicated planner that surfaces constraints, paired with a parallel task orchestrator. This coordinates execution while enforcing guardrails, preserving behavior, and outputting task plans with implementation metrics.

Do I need to write tests before starting an automated code refactor workflow?

Writing tests before an automated code refactor is optional but recommended. The workflow includes an optional pre-refactor test-writer component that automatically creates a safety net, ensuring behavior remains unchanged during task execution and code review.

Can I automate code review and task orchestration for incremental refactoring?

You can automate code review and task orchestration for incremental refactoring by using a parallel task orchestrator and an integrated code-reviewer. This validates changes, enforces guardrails, and ensures the end-to-end refactor preserves behavior.

What are the limitations of using an automated refactor orchestrator for complex codebases?

Limitations of an automated refactor orchestrator include its reliance on discovery-driven planning to surface constraints. Complex codebases with hidden dependencies may require manual intervention to ensure behavior is fully preserved during task execution.