plan-execute
Skill13 starsChanged 14 days agoMITView on GitHub
Execute the user's plan that has been iteratively refined, step by step, with resume on failure. Use when the user runs /plan-execute or asks to execute an existing plan.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- ZenStudioLab/skillstheir own version, first seen Nov 29, 2026
- pantheon-org/tekhnetheir own version, first seen Nov 15, 2026
- Esi-Abolfazl/skillstheir own version, first seen Nov 1, 2026
- allemaar/open-skillstheir own version, first seen Oct 13, 2026
- vanenshi/skillstheir own version, first seen Aug 5, 2026
- maxenko/claude-skillstheir own version, first seen Jul 14, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- okikusan-public/stock_skills★ 134same name
- longranger2/claude-gpt-workflow★ 76same name
- allemaar/open-skills★ 15same name
- pantheon-org/tekhne★ 10same name
- erhwenkuo/stock_skills★ 3same name
- Esi-Abolfazl/skills★ 3same name
- vanenshi/skills★ 2same name
- maxenko/claude-skills★ 1same name
- ZenStudioLab/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- plan-archiveSkill
- plan-createSkill
- plan-critiqueSkill
- plan-cycleSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
47 rules. 0 are common, 29 are distinctive, and 18 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
29
Distinctive
This author's own choices. Worth a look.
18
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Read the working agreement at working-agreement.md before step 1 and follow it for the whole run.
- Distinctive: line 23
Never report a step as done, fixed or working until you have run the tests and shown the output.
- Very specific: line 33
Never add yourself as a co-author and never append a Co-Authored-By or Generated-with trailer to a commit.
- Very specific: line 34
Commit only when the user answers yes to the per-step commit prompt.
- Very specific: line 41
Check the active agent's config file first (.codex/plan-critique-config.json for Codex, .claude/plan-critique-config.json for Claude Code, …
- Very specific: line 54
Read the current session's plan from [plansFolder]/.sessions/[sessionId] if it exists.
- Very specific: line 57
If no plan folders exist: Respond with "No plans found.
- Very specific: line 59
If sessionPlan exists and matches a plan folder, auto-select it.
- Very specific: line 72
Update the session file [plansFolder]/.sessions/[sessionId] with the selected plan slug (create if needed).
- Very specific: line 74
If [plansFolder]/[selected-plan]/plan.md does not exist: Respond with "No plan.md found."
- Very specific: line 75
If plan.md is empty: Respond with "Plan file is empty.
- Very specific: line 79
Read [plansFolder]/[selected-plan]/critique.md if it exists.
- Distinctive: line 81
Use the critique as supplementary context during execution: implementation hints, alternative approaches, and risk warnings from the …
- Very specific: line 84
If critique.md does not exist, warn: "This plan has not been critiqued.
- Distinctive: line 86
Check git status by running git status.
- Distinctive: line 87
If git repo and clean: inform user "Git available.
- Distinctive: line 88
If git repo and dirty: warn "Uncommitted changes detected.
- Distinctive: line 90
If not a git repo: inform "Not a git repository.
- Very specific: line 95
If found, record the command that runs the suite and inform the user: "Test suite detected: [command].
- Distinctive: line 97
If not found, inform the user: "No test infrastructure detected.
- Very specific: line 101
Check for existing execution state.
- Distinctive: line 103
Wait for user response before proceeding.
- Distinctive: line 121
Use Glob and Grep to estimate which existing files each step is likely to affect.
- Distinctive: line 136
Wait for the user to confirm or request changes to the ordering.
- Very specific: line 139
Before each step, update execution-state.json with current progress including stepStartedAt (see execution-state-format.md).
- Distinctive: line 141
Ask for explicit user permission before high-risk operations:
- Distinctive: line 147
If tests are available (step 12), write the test for this step before writing any implementation code.
- Distinctive: line 148
Run it, show the output, and confirm it fails for the expected reason.
- Distinctive: line 153
After the step completes, run verification:
- Distinctive: line 154
If tests are available (step 12), run the suite with the recorded command and show the output verbatim.
- Distinctive: line 155
Do not mark the step COMPLETED until the tests pass.
- Distinctive: line 157
If tests are not available, state plainly that the step is unverified by tests and say what evidence you do have, such as the diff or the …
- Very specific: line 159
Use mcp__ide__getDiagnostics when available, otherwise use LSP / code intelligence diagnostics on files modified in this step.
- Distinctive: line 162
If new errors are found, inform the user and ask: "Fix now, continue, or stop?"
- Distinctive: line 167
If git is available (step 11), offer to commit:
- Distinctive: line 169
If the user chose "yes-to-all", commit subsequent steps automatically without asking.
- Very specific: line 170
Commit message format: plan-execute: [plan-slug] step N - [brief description]
- Very specific: line 171
Never append a Co-Authored-By or Generated-with trailer to the commit message.
- Distinctive: line 175
If a step introduces architectural patterns that should be documented in the project instructions, flag this to the user immediately rather …
- Very specific: line 185
Stop execution - save state, stop.
- Distinctive: line 186
Wait for user choice.
- Distinctive: line 188
If tests are available (step 12), run the full suite one last time and show the output.
- Distinctive: line 191
If tests are not available, say so explicitly in the final message rather than implying verification.
- Distinctive: line 192
Update execution log with final summary.
- Distinctive: line 194
If git was used, mention the commit count: "Plan executed across N commits.
- Distinctive: line 200
Never continue past a failed step automatically.
- Distinctive: line 201
Keep the execution log updated in real-time.
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
On Codex, invoke skills with $skill-name (for example, $plan-create). Use that form when giving Codex
commands; other clients use /skill-name.
You are executing the user's plan that has been iteratively refined.
Fixed rules:
Read the working agreement at working-agreement.md before step 1 and follow it for the whole run. If it cannot be found, tell the user it is missing and apply the rules listed below.
These rules bind this phase and override any step below that conflicts with them:
- Never report a step as done, fixed or working until you have run the tests and shown the output. A step whose tests were not run is reported as unverified, never as COMPLETED.
- Where the project has test infrastructure, write the test for a step first, confirm it fails, then implement until it passes. Never modify an existing test to make it pass. Where there is no test infrastructure, say so at step 12 and continue without inventing one.
- Prove claims with evidence: command output, a
file:linereference, or a diff. Never assert a plausible but unverified result. - Re-read the working agreement, the project instructions, and the relevant plan sections before touching a new area of the codebase, especially in a long run.
- Output complete file contents. Never truncate code with "... rest of code ..." placeholders.
- Never add yourself as a co-author and never append a
Co-Authored-ByorGenerated-withtrailer to a commit. Commit only when the user answers yes to the per-step commit prompt. Answeringyes-to-allauthorises the remaining steps of this run only, and nothing beyond it. - Be brief. No filler, no preamble. No emojis, no em dashes in code, comments, docs or commit messages.
To do this, follow these steps precisely:
- Resolve
plansFolderfrom config: Check the active agent's config file first (.codex/plan-critique-config.jsonfor Codex,.claude/plan-critique-config.jsonfor Claude Code,.gemini/plan-critique-config.jsonfor Agy/Gemini, or.copilot/plan-critique-config.jsonfor Copilot CLI), falling back to reading the other agent configs. If no config exists orplansFolderis not set or is empty: Respond with "No plans folder configured. Run/plan-createfirst to set up." - Get the active session id:
- On Copilot CLI (or when
COPILOT_AGENT_SESSION_IDis set): readCOPILOT_AGENT_SESSION_IDviaecho $COPILOT_AGENT_SESSION_ID(macOS/Linux) or$env:COPILOT_AGENT_SESSION_ID(Windows); if empty, use the literal valuedefault. Store assessionId. - Otherwise (Codex, Claude Code / Agy): run
echo $PPIDand store assessionId.
- On Copilot CLI (or when
- Clean up stale sessions in
[plansFolder]/.sessions/(non-blocking, never abort because of cleanup):- For numeric PID filenames, check
kill -0 [PID] 2>/dev/nulland delete if the process is no longer running. - For non-PID session files (e.g.
defaultor UUIDs), delete files not modified in the last 7 days.
- For numeric PID filenames, check
- Read the current session's plan from
[plansFolder]/.sessions/[sessionId]if it exists. Store assessionPlan. - Scan
[plansFolder]/for subdirectories (each subdirectory is a plan). Excludearchived/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:
- If
sessionPlanexists and matches a plan folder, auto-select it. Inform the user: "Using current session plan: [sessionPlan]" - Else if only one plan exists, auto-select it and inform user.
- Otherwise, ask the user to select a plan from the list.
Example:
Available plans: 1. add-user-authentication 2. refactor-database-layer 3. implement-caching Which plan would you like to execute? [1-3]
- If
- Update the session file
[plansFolder]/.sessions/[sessionId]with the selected plan slug (create if needed). - Check prerequisites:
- If
[plansFolder]/[selected-plan]/plan.mddoes not exist: Respond with "No plan.md found." - If
plan.mdis empty: Respond with "Plan file is empty. Run/plan-critiquefirst."
- If
- Resolve project instructions in the project root. Use
AGENTS.mdfor Codex,GEMINI.mdfor Agy,.github/copilot-instructions.mdfor Copilot, orCLAUDE.mdfor Claude Code. Fall back toAGENTS.mdthenCLAUDE.md. Apply those standards during each execution step. If none exist, note this but do not block. - Read
[plansFolder]/[selected-plan]/critique.mdif 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-critiquefirst, or confirm you want to proceed without review." Wait for user confirmation before continuing. - Check git status by running
git status.- If git repo and clean: inform user "Git available. Per-step commits will be offered after each step."
- If git repo and dirty: warn "Uncommitted changes detected. Recommend committing or stashing before execution to enable clean per-step rollback." Wait for user acknowledgement.
- If not a git repo: inform "Not a git repository. Per-step commits are not available." Store whether git is available for later use.
- Detect test infrastructure. Look for a test runner and existing tests: a
testscript inpackage.json,pytest.iniortox.ini,phpunit.xml, ago.modalongside_test.gofiles,Cargo.toml, atests/,test/or__tests__/directory, or aMakefiletarget namedtest.- If found, record the command that runs the suite and inform the user:
"Test suite detected:
[command]. Tests-first is binding for every step of this run." - If not found, inform the user: "No test infrastructure detected. Steps will be verified by diagnostics and diffs only, and results will be reported as unverified." Do not create a test harness the project does not already have. Store the test command and whether tests are available for later use.
- If found, record the command that runs the suite and inform the user:
"Test suite detected:
- Check for existing execution state. If
[plansFolder]/[selected-plan]/execution-state.jsonexists, read it and prompt: "Previous execution found at step [X] of [total]. Resume or restart?" Wait for user response before proceeding.- On resume: if git is available, check that the last committed step matches the state file
by reviewing recent commits with the
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. - On restart: overwrite execution-log.md with a new header. Note the restart in the log: "Restarted execution (previous attempt reached step [X])."
- On resume: if git is available, check that the last committed step matches the state file
by reviewing recent commits with the
- 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:
- Independent tasks first: changes with no dependencies on other changes
- Small to large: within independent tasks, order from smallest to largest scope
- Dependent tasks after: once all independent tasks are ordered, add tasks that depend on them
- Same-level tiebreaker: for tasks at the same dependency level, order by logical grouping
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. Prefer the affected files
the plan already lists, and use Glob to confirm each of those paths exists before presenting it.
Present the steps to the user for confirmation, including the dependency graph and file estimates:
Wait for the user to confirm or request changes to the ordering.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. - Execute each step sequentially:
- Record the step start time.
- Before each step, update execution-state.json with current progress including
stepStartedAt(see execution-state-format.md). - Ask for explicit user permission before high-risk operations:
- Database migrations or schema changes
- Deleting files or directories
- Modifying configuration files
- External API calls with side effects
- Any irreversible operations
- If tests are available (step 12), write the test for this step before writing any implementation code. Run it, show the output, and confirm it fails for the expected reason. If it passes before the implementation exists, the test is wrong: fix the test, not the expectation. Never edit an existing passing test to accommodate this step.
- Execute the step, ensuring compliance with the project instructions loaded in step 9. Reference critique.md findings when they are relevant to the current step.
- After the step completes, run verification:
- If tests are available (step 12), run the suite with the recorded command and show the output verbatim. Do not mark the step COMPLETED until the tests pass. If they fail, treat this as an error and go to the error branch below.
- If tests are not available, state plainly that the step is unverified by tests and say what evidence you do have, such as the diff or the diagnostics.
- Use
mcp__ide__getDiagnosticswhen available, otherwise use LSP / code intelligence diagnostics on files modified in this step. Report only NEW errors or warnings (compare before and after to avoid flagging pre-existing issues). - If new errors are found, inform the user and ask: "Fix now, continue, or stop?"
- Show a diff summary: list files added, modified, or deleted in this step.
- Report the outcome with evidence. Cite the test output, the command output, or a
file:linereference for every claim about what the step accomplished. Do not describe a step as working on the strength of the code looking correct. - If git is available (step 11), offer to commit:
- On the first step, ask: "Commit this step? (yes / no / yes-to-all)"
- If the user chose "yes-to-all", commit subsequent steps automatically without asking.
- Commit message format:
plan-execute: [plan-slug] step N - [brief description] - Never append a
Co-Authored-ByorGenerated-withtrailer to the commit message. - Record the commit hash in execution-state.json under
gitCommits.
- Compute step duration and log results to execution-log.md including duration and files changed (see execution-log-format.md).
- If a step introduces architectural patterns that should be documented in the project instructions, flag this to the user immediately rather than waiting until completion.
- On error:
- Save execution state with the failed step.
- Diagnose the error: read the error output, identify the likely root cause.
- Include the actual error output verbatim in the execution log (not just a summary).
- Present recovery options to the user:
- Fix and retry - attempt to fix the issue, then re-execute this step.
- Skip step - mark as SKIPPED, warn about downstream dependencies, continue.
- Rollback step - if git commits are available, revert the last commit. Then stop.
- Stop execution - save state, stop. Resume later with
/plan-execute.
- Wait for user choice.
- On successful completion:
- If tests are available (step 12), run the full suite one last time and show the output. Do not declare the plan executed successfully until that run passes. If it fails, report the failure and go to the error branch of step 17 instead.
- If tests are not available, say so explicitly in the final message rather than implying verification.
- Update execution log with final summary.
- Delete execution-state.json.
- If git was used, mention the commit count: "Plan executed across N commits.
Review with
git log --oneline -N." - Inform user: "Plan executed successfully. Run
/plan-archiveto archive this plan."
Notes:
- Never continue past a failed step automatically. Always present recovery options and wait.
- Keep the execution log updated in real-time.
- Be explicit about what changes are being made at each step.
- Reference any supporting files in the plan folder as needed during execution.
- critique.md is read as supplementary context, not as an authoritative override of plan.md.
- Git commits enable rollback of individual steps via
git revert. This is the primary safety net. - Code intelligence / LSP diagnostics are advisory. They surface issues early but do not block execution unless the user chooses to stop. Test runs are not advisory: a failing suite blocks COMPLETED.
- A step is never reported as done, fixed or working on the strength of the code alone. Either the test output backs it, or it is reported as unverified.
- Plans exceeding 10 steps should be flagged to the user with a recommendation to split into smaller plans to avoid context window exhaustion during execution.
- Project instructions are applied during execution. If any step introduces patterns that should be documented there, flag this to the user immediately.
- Execution state is best-effort. If the session ends mid-step, the state file may not reflect the actual codebase state. Git commits provide the definitive record of what was completed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

