refactor

Coordinates Go and Rust refactor workflows with characterization testing and static analysis gates.

33|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/lvlup-sw/exarchos --skill refactor-lvlup-sw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/lvlup-sw/exarchos/tree/main/skills-src/refactor
Command: npx skills add https://github.com/lvlup-sw/exarchos --skill refactor-lvlup-sw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a safe, auditable workflow for improving existing code without introducing regressions, ensuring exploration, characterization testing, and mandatory documentation updates so agents or developers don't accidentally change behavior or skip verification steps.

Core Features & Use Cases

  • Two-track workflow: polish track for small, contained refactors and overhaul track for multi-file or architectural migrations with worktree isolation and delegation.
  • Safety & validation gates: mandatory characterization tests, static analysis, lint/type checks, and explicit phase guards before transitions.
  • Automation & integration: auto-chain phase transitions, explicit Skill() tool calls for plan/delegate/review/synthesize, and state persisted in Exarchos workflow files.
  • Use case: Convert a messy module into a tested, extracted service by running exploration to determine scope, capturing a brief, and following the polish or overhaul path to completion with documented rollback points.

Quick Start

Start a refactor by running the refactor command with a short description, for example: exarchos refactor "Polish user-service" to begin exploration and automatic brief capture.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I safely refactor an existing codebase without introducing regressions?

Safely refactor an existing codebase without introducing regressions by using a structured workflow that enforces characterization testing, static analysis gates, and mandatory documentation updates to verify behavior remains unchanged.

What is the best way to handle multi-file architectural migrations during a refactor?

The best way to handle multi-file architectural migrations during a refactor is using an overhaul track with worktree isolation and delegation. This path manages complex structural changes while maintaining explicit phase guards for safe transitions.

How do I start a structured refactor workflow for a messy module?

Start a structured refactor workflow for a messy module by running a refactor command with a short description, which begins exploration and automatic brief capture to determine the scope and extract a tested service.

Does this structured refactor workflow support small, contained code improvements?

Yes, this structured refactor workflow supports small, contained code improvements through a dedicated polish track. This track provides a safe, auditable path for minor code improvements without requiring multi-file architectural migrations.

When should I not use a two-track workflow for codebase refactoring?

You should not use a two-track workflow for codebase refactoring when working on new code rather than existing codebases, as this structured approach with validation gates and documentation updates applies exclusively to code improvement tasks on existing code.