Help us improve
Share bugs, ideas, or general feedback.
From Plan & Critique
Executes an iteratively refined user plan from a `.claude/` plan file system, handling session tracking, prerequisite checks, and critique context.
npx claudepluginhub serbanghita/claude-code-plan-critique --plugin planHow this skill is triggered — by the user, by Claude, or both
Slash command
/plan:executeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are executing the user's plan that has been iteratively refined.
Executes approved implementation plans with strict adherence to scope, sequence, and verification. Supports batch and interactive modes, phase tracking, and final reporting.
Executes approved implementation plans phase by phase with verification. Designed for systematic, checked implementation of planned changes across a codebase.
Executes written implementation plans in batches with review checkpoints between batches. Useful when you have a plan file to follow step-by-step.
Share bugs, ideas, or general feedback.
You are executing the user's plan that has been iteratively refined.
To do this, follow these steps precisely:
Read .claude/plan-critique-config.json and get plansFolder path from settings.
If the file doesn't exist or plansFolder is not set:
Respond with "No plans folder configured. Run /plan:create first to set up."
Get the Claude Code process ID by running: echo $PPID. Store this as sessionPID.
Clean up stale sessions: Scan [plansFolder]/.sessions/ for files. For each file named with a PID, check if that
process is still running via kill -0 [PID] 2>/dev/null. If the command fails (process not running), delete that
session file. This is non-blocking cleanup.
Read the current session's plan from [plansFolder]/.sessions/[sessionPID] if it exists. Store as sessionPlan.
Scan [plansFolder]/ for subdirectories (each subdirectory is a plan).
Exclude archived/ and .sessions/ folders and any files, only list plan directories.
If no plan folders exist: Respond with "No plans found. Create one with /plan:create".
Select the plan to execute:
sessionPlan exists and matches a plan folder, auto-select it. Inform the user:
"Using current session plan: [sessionPlan]"Available plans:
1. add-user-authentication
2. refactor-database-layer
3. implement-caching
Which plan would you like to execute? [1-3]
Update the session file [plansFolder]/.sessions/[sessionPID] with the selected plan slug (create if needed).
Check prerequisites:
[plansFolder]/[selected-plan]/plan.md does not exist: Respond with "No plan.md found."plan.md is empty: Respond with "Plan file is empty. Run /plan:critique first."Read CLAUDE.md from the project root if it exists. Hold its standards as context and ensure compliance during
each execution step. If it does not exist, note this but do not block execution.
Read [plansFolder]/[selected-plan]/critique.md if it exists. Note the iteration number and summary.
Inform the user: "Plan was critiqued (iteration N). Last critique summary: [brief]."
Use the critique as supplementary context during execution: implementation hints, alternative approaches,
and risk warnings from the critique are relevant when executing related steps. Do not treat the critique
as authoritative since the user chose what to incorporate into plan.md.
If critique.md does not exist, warn: "This plan has not been critiqued. Run /plan:critique first,
or confirm you want to proceed without review." Wait for user confirmation before continuing.
Check git status by running git status.
Check for existing execution state. If [plansFolder]/[selected-plan]/execution-state.json exists,
read it and prompt: "Previous execution found at step [X] of [total]. Resume or restart?"
Wait for user response before proceeding.
plan-execute: prefix. If they do not match, warn the user
that the codebase may have diverged from the recorded state. Skip already-completed steps.Review supporting files in the [plansFolder]/[selected-plan]/ folder. Classify each file by type
and inferred purpose. Present to the user alongside the step list:
"Supporting files found: schema.sql (SQL migration), mockup.png (UI reference)."
Let the user confirm or clarify how each file should be used during execution.
Parse the plan into discrete, executable steps using this ordering strategy:
Example: If a plan has "Add utility function", "Create database migration", and "Update API endpoint (uses utility)", order as: 1) Add utility function, 2) Create database migration, 3) Update API endpoint
Use Glob and Grep to estimate which existing files each step is likely to affect. Present the steps to the user for confirmation, including the dependency graph and file estimates:
I've parsed your plan into the following steps:
1. [Step description] - likely affects: src/auth.ts, src/middleware.ts
(no dependencies)
2. [Step description] - creates new file: src/utils/hash.ts
(no dependencies)
3. [Step description] - likely affects: src/routes.ts
(depends on step 1)
...
Do you want me to proceed with execution? You can reorder or adjust steps before starting.
Wait for the user to confirm or request changes to the ordering.
Execute each step sequentially:
stepStartedAt
(see execution-state-format.md).mcp__ide__getDiagnostics on files modified in this step. Report only NEW errors
or warnings (compare before and after to avoid flagging pre-existing issues).plan-execute: [plan-slug] step N - [brief description]gitCommits.CLAUDE.md,
flag this to the user immediately rather than waiting until completion./plan:execute.On successful completion:
git log --oneline -N."/plan:archive to archive this plan."Notes:
git revert. This is the primary safety net.