refactor-design

Plan incremental, dependency-aware refactoring steps with verification criteria.

7|4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/nklisch/skills --skill refactor-design
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-design
Source: https://github.com/nklisch/skills/tree/main/plugins/workflow/skills/refactor-design
Command: npx skills add https://github.com/nklisch/skills --skill refactor-design

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill produces a careful, incremental refactor plan to address duplicate logic, architectural violations, and large-area structural changes while minimizing risk to the codebase and consumers.

Core Features & Use Cases

  • Incremental, testable steps: Breaks refactors into small, independently verifiable commits with explicit verification criteria.
  • Dependency-aware ordering: Orders changes by dependency so later steps safely build on earlier ones.
  • Safety guardrails: Highlights API migration paths, verification checks, and rollback-friendly boundaries.
  • Integration with task tracking: Creates and updates tasks to track progress and spawn exploration sub-agents for discovery.
  • Use Case: Consolidate duplicated validation logic into a shared utility, or restructure a subsystem to separate domain and infrastructure concerns without breaking consumers.

Quick Start

Use the refactor-design skill to analyze the target area and produce an ordered, testable refactor plan with current and target code examples and acceptance criteria.

Frequently Asked Questions about refactor-design

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

FAQPage Schema
How do I plan incremental refactoring steps for a codebase with duplication?

Plan incremental refactoring steps by breaking structural changes into small, independently verifiable commits with explicit verification criteria and dependency-aware ordering to safely consolidate duplicate logic without breaking consumers.

What is the best way to restructure a subsystem to separate domain and infrastructure concerns?

Restructuring a subsystem to separate domain and infrastructure concerns requires an ordered, testable refactor plan that highlights API migration paths, rollback-friendly boundaries, and verification checks to minimize risk to the codebase.

How do I safely consolidate duplicated validation logic into a shared utility?

Safely consolidate duplicated validation logic by generating an incremental refactor plan with current and target code examples, acceptance criteria, and commit workflow instructions to verify each step before moving forward.

Can I track refactoring progress and spawn exploration sub-agents during architectural changes?

Yes, refactoring progress can be tracked by creating and updating tasks within the plan, which also spawns exploration sub-agents for discovery during large-area structural changes and architectural drift correction.

Does API migration planning require dependency-aware ordering of refactor commits?

Yes, API migration planning requires dependency-aware ordering of refactor commits so later steps safely build on earlier ones, ensuring each change is independently verifiable and rollback-friendly before proceeding.