refactor-with-confidence

Refactor code with test-first verification and checkpointed state.

Updated Nov 2, 2025
One-click install
npx skills add https://github.com/anortham/mcp-toolbox-workflows --skill refactor-with-confidence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-with-confidence
Source: https://github.com/anortham/mcp-toolbox-workflows/tree/main/skills/refactor-with-confidence
Command: npx skills add https://github.com/anortham/mcp-toolbox-workflows --skill refactor-with-confidence

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables safe, systematic code refactoring with test protection and full traceability through Sherpa guidance, Julie's refactoring tools, and Goldfish checkpoints.

Core Features & Use Cases

  • Pre-refactor baseline: Capture state with Goldfish checkpoints.
  • Tests-first refactor: Ensure tests exist before changes.
  • Safe renaming & reference updates: Use Julie to propagate changes across workspace.
  • Verification: Re-run tests and confirm no regressions.

Quick Start

Ask me to "refactor the UserService validation logic" and I'll walk you through pre-refactor checkpoints, phased changes, and final verification.

Frequently Asked Questions about refactor-with-confidence

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

FAQPage Schema
How do I safely refactor code without breaking functionality?

Safe refactoring uses tests as a protective layer before making changes. This Skill captures your code's pre-refactor state with checkpoints, ensures tests pass first, applies systematic changes using safe rename and reference-update tools, then verifies no regressions occurred.

Can I rename symbols across my entire codebase and update all references automatically?

Yes. The Skill uses fast reference analysis and symbol-rename tools to identify all occurrences of a name across your workspace and propagate changes consistently, eliminating manual search-and-replace errors.

What's the best way to restructure code while maintaining test coverage?

Structuring refactors with test-first verification ensures coverage before you begin. This Skill orchestrates pre-refactor checkpoints to capture baseline state, validates existing tests, applies phased structural changes, and re-runs tests to confirm safety.

How do I track before-and-after state during large refactoring projects?

Checkpoints create snapshots of your code at key stages—before refactoring starts and after each major phase completes. You can compare these states to verify changes and roll back safely if needed.

Do I need multiple tools to handle renaming, test verification, and reference updates?

This Skill coordinates multiple specialized tools—Julie for refactoring operations, Sherpa for guidance, and Goldfish for state checkpoints—into a single systematic workflow, so you don't switch contexts between tasks.

What happens if my refactor introduces a test failure?

Because tests run before and after each change phase, failures surface immediately. Checkpoints let you compare the working pre-refactor state with the broken state, pinpoint what broke, and adjust your changes accordingly.