workflow-checkpoint-refactor
БесплатноБез исполняемых скриптовНе проверенMulti-phase refactoring with checkpoint files that survive context limits. Use when refactoring spans 10+ files, needs phased rollout, or risks running out of…
от laurigates★ 61 звезда на GitHubОб этом скилле
/workflow:checkpoint-refactor
Multi-phase refactoring with persistent state that survives context limits and session boundaries.
When to Use This Skill
| Use this skill when... | Use direct refactoring instead when... |
|---|---|
| Refactoring spans 10+ files | Changing 1-5 files |
| Work will exceed context limits | Small, focused change |
| Need to resume across sessions | Single-session task |
| Multiple dependent phases | Independent file changes |
| Team coordination on large refactor | Solo quick fix |
Context
- Repo root: !
git rev-parse --show-toplevel - Plan file exists: !
find . -maxdepth 1 -name REFACTOR_PLAN.md - Git status: !
git status --porcelain - Recent commits: !
git log --oneline --max-count=5
Parameters
--init: Create a new refactoring plan interactively--continue: Resume from the last completed phase--status: Show current plan progress--phase=N: Execute a specific phase
Plan File Format
The plan file (REFACTOR_PLAN.md) serves as persistent state. It is the loop's
compact state packet (.claude/rules/loop-integrity.md): a fresh session,
or a sub-agent with no memory of prior phases, must be able to re-enter from this
file alone. Every phase therefore carries not just what to do but what was
verified, what changed, and what must come first — and the plan names the
phase the last run chose next. Without those, resuming across a context limit
silently redoes or undoes work, or re-derives the order from the transcript.
# Refactor Plan: {description}
Created: {date}
Last updated: {date}
Base commit: {hash}
Exit condition: {the literal criterion that ends the whole refactor — e.g. "all phases done, full suite + tsc green on base"}
Next target: {the phase the last run chose to do next, and why — set before a run ends}
## Overview
{What is being refactored and why}
## Phase 1: {phase name}
- **Status**: done | in-progress | pending | needs-review
- **Files**: file1.ts, file2.ts, file3.ts
- **Description**: {what this phase does}
- **Ordering / preconditions**: {what must hold before this phase starts — e.g. "none (first phase)"; keep it to a line or two}
- **Acceptance criteria**: {how to verify success — the phase's exit condition}
- **Verifier result**: {what the independent check returned — PASS/FAIL + the criterion it judged; filled in at the phase boundary}
- **Changed since last run**: {what this phase actually touched, so a successor doesn't redo or undo it}
- **Result**: {summary of changes made, filled in after completion}
## Phase 2: {phase name}
- **Status**: pending
- **Files**: file4.ts, file5.ts
- **Description**: {what this phase does}
- **Ordering / preconditions**: {e.g. "after Phase 1 — uses its shared types"}
- **Acceptance criteria**: {how to verify success}
- **Verifier result**: {empty until verified}
- **Changed since last run**: {empty until completed}
- **Result**: {empty until completed}
...
Execution
Execute this multi-phase refactoring workflow:
Step 1: Initialize refactoring plan (--init mode)
If --init flag provided:
- Analyze scope: Read files to be refactored, understand dependencies
- Define phases where each:
- Touches 3-7 files (bounded scope)
- Has clear acceptance criteria (tests, type check)
- Can be committed independently
- Builds on previous phases
- Write plan file: Create
REFACTOR_PLAN.mdat repo root - Record base commit:
git log --format='%H' -1
Phase ordering: Shared utilities/types first, leaf components last, tests alongside implementation.
Step 2: Resume existing refactor (--continue mode)
If --continue flag provided:
- Read
REFACTOR_PLAN.md - Take the plan's Next target; if it is empty, fall back to the first
pending phase (status
pendingorneeds-review) - Verify the phase's Ordering / preconditions hold (prior phases it names are
done); if one does not, work the unmet precondition instead - Execute phase (go to Step 4)
Step 3: Check progress (--status mode)
If --status flag provided:
- Read
REFACTOR_PLAN.md - Parse plan and display status table with phases, descriptions, statuses, file counts
- Exit
Step 4: Execute target phase (--phase=N or selected via Step 2)
For each phase:
- Read context from plan file (current phase's details)
- Read only the files listed for this phase
- Implement changes according to phase description
- Validate with appropriate tool (tsc, ty check, cargo check, or npm/pytest test)
- If validation fails:
- Fix errors if straightforward
- If complex, mark phase as
needs-reviewwith error details - Commit partial work with
WIP:prefix
- If validation passes, gate
doneon an independent verifier when the acceptance criteria are a judgement (e.g. "the class is now single-purpose"), not a purely mechanical check (a green suite / cleantscis alre
Установить workflow-checkpoint-refactor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Bash(git status *)Bash(git diff *)Bash(git log *)Bash(git add *)Bash(git commit *)Bash(npm run *)Bash(npx *)Bash(uv run *)Bash(cargo *)ReadWriteEditGrepGlobTaskTodoWriteFAQ
Что делает скилл workflow-checkpoint-refactor?
Multi-phase refactoring with checkpoint files that survive context limits. Use when refactoring spans 10+ files, needs phased rollout, or risks running out of context mid-session.
Как установить скилл workflow-checkpoint-refactor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл workflow-checkpoint-refactor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic