/mcp-toolbox-workflows:refactor-with-confidencefrom mcp-toolbox-workflows
Safe code refactoring combining Sherpa's refactor workflow, Julie's reference checking and safe renaming, and Goldfish's before/after checkpointing. Activates for code improvement with systematic testing, refactoring, and verification. Use when cleaning up or improving existing code.
Ships in mcp-toolbox-workflows. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Perform safe, systematic code refactoring with test protection and full tracking. Combines Sherpa's refactor workflow guidance, Julie's safe refactoring tools, and Goldfish's before/after state preservation.
Sherpa: Guides refactor phases (Tests → Refactor → Verify) Julie: Safe renames, reference checking, impact analysis Goldfish: Pre/post state checkpoints, decision tracking
1. Goldfish: checkpoint({ description: "Pre-refactor baseline: [current state]" })
2. Sherpa: approach({ workflow: "refactor" })
3. Julie: get_symbols → Capture current structure
guide() → "Ensure test coverage exists"
Check existing tests:
- Run test suite
- Verify coverage for code being refactored
- Add missing tests if needed
checkpoint({ description: "Verified test coverage for [component]" })
guide({ done: "test coverage verified" })
guide() → "Refactor while staying green"
Julie safe refactoring:
- fast_refs → Check all references before rename
- rename_symbol → Workspace-wide safe rename
- fuzzy_replace → Targeted improvements
- Tests stay green throughout!
checkpoint({ description: "Refactored: [specific changes made]" })
guide({ done: "refactoring complete, tests still green" })
guide() → "Verify no regressions"
Verification:
- Run full test suite → All green
- get_symbols → Verify structure
- fast_refs → Check updated references
checkpoint({ description: "Refactor verified: all tests pass, [N] files updated" })
guide({ done: "verified refactor, all tests pass" })
User: "This UserService is too big, extract validation logic"
PRE-REFACTOR:
→ checkpoint({ description: "Pre-refactor: UserService 487 lines with inline validation" })
→ approach({ workflow: "refactor" })
PHASE 1: TESTS
→ guide()
→ Run tests → 23 tests pass ✅
→ checkpoint({ description: "Verified UserService has 23 passing tests" })
PHASE 2: REFACTOR
→ guide()
→ Julie: Create UserValidator class
→ Julie: fuzzy_replace to extract validation methods
→ Julie: rename_symbol to update references
→ Tests → 23 tests still pass ✅
→ checkpoint({ description: "Extracted UserValidator class, UserService now 312 lines" })
PHASE 3: VERIFY
→ guide()
→ fast_refs({ symbol: "UserService" }) → All references updated
→ get_symbols → Structure cleaner
→ Full test suite → 23 tests pass ✅
→ checkpoint({ description: "Refactor complete: UserService 312 lines, UserValidator 175 lines, all 23 tests pass" })
Result: Clean separation, all tests green, tracked in Goldfish!
✅ DO:
❌ DON'T:
Safe refactoring: Test → Refactor → Verify. Sherpa guides, Julie protects, Goldfish preserves!
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (anortham/mcp-toolbox-workflows) — no native marketplace selected
npx claudepluginhub p/anortham-mcp-toolbox-workflows5 skills in this plugin
/bug-detectiveSystematic bug hunting combining Sherpa's debugging workflow, Julie's execution tracing, and Goldfish's investigation tracking. Activates for bug fixes with methodical reproduction, test capture, fix, and verification. Use when debugging errors or fixing bugs./explore-and-documentSystematically explore unfamiliar codebases and document findings using Julie's code intelligence, Sherpa's exploration workflow, and Goldfish's documentation. Activates when learning new code with semantic search, architecture mapping, and persistent documentation./smart-session-startIntelligent session initialization combining Goldfish memory recall, Julie workspace re-indexing, and Sherpa workflow suggestion. MANDATORY at session start - automatically restores context, suggests next steps, and resumes work seamlessly. Activates at the beginning of every coding session.