Agent skill
phase-transition
Transition between session phases (RESEARCH → PLAN → IMPLEMENT → REVIEW → VERIFY)
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/phase-transition
SKILL.md
Phase Transition
Manages transitions between structured session phases. Each phase writes output to a file, and /clear between phases keeps context fresh.
Phase Order
RESEARCH → PLAN → IMPLEMENT → REVIEW → VERIFY
How to Use
-
Check current phase state:
bashcat .claude/phases/output/current-phase.json 2>/dev/null || echo "No active phase" -
Write current phase output to the appropriate output file:
- RESEARCH →
.claude/phases/output/research-<topic>.md - PLAN →
docs/plans/<date>-<topic>-plan.md - IMPLEMENT →
.claude/phases/output/implement-<topic>.md - REVIEW →
.claude/phases/output/review-<topic>.md - VERIFY →
.claude/phases/output/verify-<topic>.md
- RESEARCH →
-
Run checkpoint evaluation (blocks transition if criteria fail):
bash$CLAUDE_PROJECT_DIR/.claude/hooks/checkpoint-eval.sh "<current-phase>" "<next-phase>" "<topic>"- If exit code 0: PASS — proceed to update phase state
- If exit code 1: FAIL — show findings. To override: pass
--forceflag and note the override - Eval results saved to
.claude/phases/output/eval-<topic>.json
-
Update phase state:
bashmkdir -p .claude/phases/output cat > .claude/phases/output/current-phase.json << 'PHASE_EOF' { "topic": "<topic>", "current_phase": "<next-phase>", "completed_phases": ["<completed>", ...], "started_at": "<ISO-timestamp>", "output_files": { "<phase>": "<path-to-output>" } } PHASE_EOF -
Suggest to user: "Phase complete. Output saved to
<path>. Recommend/clearbefore starting phase." -
Tell next session: "Read
.claude/phases/output/current-phase.jsonto see current phase. Load the appropriate context mode from.claude/contexts/<mode>.md."
Starting a New Topic
mkdir -p .claude/phases/output
cat > .claude/phases/output/current-phase.json << 'PHASE_EOF'
{
"topic": "<topic-name>",
"current_phase": "research",
"completed_phases": [],
"started_at": "<ISO-timestamp>",
"output_files": {}
}
PHASE_EOF
Regressing to a Previous Phase
When a phase fails (e.g., REVIEW finds critical issues requiring more implementation):
-
Log the regression reason:
bashPHASE_FILE=".claude/phases/output/current-phase.json" export PT_PHASE_FILE="$PHASE_FILE" export PT_TARGET="<target-phase>" export PT_REASON="<why regressing>" python3 << 'REGRESS_EOF' import json, os from datetime import datetime phase_file = os.environ["PT_PHASE_FILE"] target = os.environ["PT_TARGET"] reason = os.environ["PT_REASON"] with open(phase_file) as f: state = json.load(f) regressions = state.get("regressions", []) regressions.append({ "from": state["current_phase"], "to": target, "reason": reason, "date": datetime.now().isoformat() }) state["regressions"] = regressions # Remove target phase from completed if present completed = state.get("completed_phases", []) if target in completed: completed.remove(target) state["completed_phases"] = completed state["current_phase"] = target with open(phase_file, "w") as f: json.dump(state, f, indent=2) REGRESS_EOF -
No checkpoint eval needed — regressions always allowed.
-
Suggest to user: "Phase regressed from to . Reason: . Recommend
/clearbefore restarting phase."
Common Regression Scenarios
| From | To | When |
|---|---|---|
| REVIEW | IMPLEMENT | Critical/high issues found in review |
| VERIFY | IMPLEMENT | E2E tests failing, needs code fix |
| VERIFY | REVIEW | Found issues during verification that need re-review |
Completing All Phases
After VERIFY passes, clean up:
rm -f .claude/phases/output/current-phase.json
# Keep output files for reference — they're gitignored
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?