refactor

Automate incremental refactorings with verification and stepwise commits across packages.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/lasswellt/claudeHQ --skill refactor-lasswellt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor
Source: https://github.com/lasswellt/claudeHQ/tree/main/.claude/skills/refactor
Command: npx skills add https://github.com/lasswellt/claudeHQ --skill refactor-lasswellt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe, incremental refactoring of the claudeHQ project is orchestrated by capturing baseline state, analyzing dependencies, applying changes, and verifying outcomes before proceeding.

Core Features & Use Cases

  • Snapshot & verification: Capture baseline results and run type checks, tests, and builds to prevent regressions.
  • Dependency-aware changes: Map cross-package dependencies (agent, hub, dashboard, shared) and plan minimal blast radius edits.
  • Stepwise commits with rollback: Commit each change as a discrete step with an automatic rollback if validation fails.
  • Audit-ready traceability: Generate documentation and commit history for full traceability of refactors.

Quick Start

Apply small, verifiable changes following the step plan and verify results after each step.

Frequently Asked Questions about refactor

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

FAQPage Schema
How do I perform safe incremental refactoring across multiple packages without introducing regressions?

Safe incremental refactoring automates regression prevention by capturing baseline state, analyzing cross-package dependencies, applying minimal edits, and running type checks and tests after each step.

What is the best way to map cross-package dependencies before modifying shared code?

Mapping cross-package dependencies identifies the minimal blast radius for edits across packages like agent, hub, dashboard, and shared, ensuring changes are planned safely before modifying code.

Can I rollback code changes automatically if type checks or builds fail during refactoring?

You can rollback changes automatically because incremental refactoring commits each change as a discrete step with an automatic rollback if validation fails, maintaining codebase stability.

How do I generate auditable commit history for step-by-step code refactoring?

Auditable commit history is generated by committing each refactoring change as a discrete step with verification, creating documentation and full traceability for the refactoring process.

Does incremental refactoring work with monorepos containing agent, hub, and dashboard packages?

Incremental refactoring works with monorepos containing agent, hub, dashboard, and shared packages by reading project state files, identifying package scopes, and verifying outcomes across packages.