plan-execute

plan-execute is a command for coding agents from FlorianBruniaux/claude-code-plugins. It costs 41 tokens per session (1,688 once invoked), scanned A, original, MIT.

A command that carries out a validated implementation plan through isolated Git work, tests, parallel task execution, quality checks, and pull-request completion. A Git worktree is a separate working directory for a branch, keeping the main directory clean during the work.

In plain words
What is it for?
Use it to execute planned tasks in a worktree, write failing tests first for TDD tasks, run quality checks and smoke tests, and create and merge a pull request.
Why use it?
It provides a defined path from an approved plan to tested, reviewed code while separating implementation work from the main branch.

Command

Part of the pr-workflow plugin — 5 skills, 7 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/florianbruniaux/claude-code-plugins/plan-execute
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins

Or install pr-workflow, the plugin that ships this one along with the rest of its 5 skills, 7 commands, 3 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plan-execute

README.md
[![agentmods](https://agentmods.dev/badge/commands/florianbruniaux/claude-code-plugins/plan-execute.svg)](https://agentmods.dev/commands/florianbruniaux/claude-code-plugins/plan-execute)
Your own site
<a href="https://agentmods.dev/commands/florianbruniaux/claude-code-plugins/plan-execute"><img src="https://agentmods.dev/badge/commands/florianbruniaux/claude-code-plugins/plan-execute.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,688 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00041 $0.01688
Opus 5 $0.00020 $0.00844
Sonnet 5 $0.00008 $0.00338
Haiku 4.5 $0.00004 $0.00169

Measured today against content hash 5a171ab87023, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan-execute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/pr-workflow/commands/plan-execute.md · 237 lines

How it starts

The opening of the file, as written. The whole thing — 237 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Plan Execute — Execution to Merged PR

Execute the validated plan in an isolated worktree. Spawn per-task agents, verify quality, create and merge the PR. Handles everything through to cleanup.

Run /clear before this command.


Prerequisite

A validated plan must exist at docs/plans/plan-{name}.md with all issues resolved (output of /plan-validate).


Step 1: Worktree Setup

Create an isolated git worktree:

git worktree add .worktrees/{plan-name} -b feature/{plan-name}

All execution happens inside the worktree. Main branch remains clean throughout.


Step 2: TDD Scaffolding

Only for tasks marked as TDD in the plan.

For each TDD task, before any implementation:

  1. Write the failing test(s) that define the acceptance criteria
  2. Run tests to confirm they fail (red)
  3. Commit the failing tests
  4. Mark the test file in the task for the implementation agent to find

Do not write implementation code in this step.


Step 3: Level-Based Parallel Execution

Parse the task list from the plan. Group tasks by layer (Layer 1 = foundation, Layer 2 = depends on Layer 1, etc.).

For each layer:

  1. Identify all tasks in the layer
  2. Spawn one agent per task in parallel (Task tool, run_in_background: true)
  3. Each agent receives: its task description, files to modify, acceptance criteria, and relevant ADRs
  4. Monitor all agents by reading .claude/tasks/<id>/output.log via Read (TaskOutput is deprecated since v2.1.83)
  5. Each agent commits on task completion: git commit -m "feat: {task-description}"
  6. Wait for all tasks in the layer to complete before starting the next layer

Drift detection: after each layer, diff the actual changes against the plan spec. If implementation deviates significantly from the plan (new files not in plan, plan files not touched), flag and ask how to proceed. Do not silently continue on drift.

Agent instructions for each task:

You are implementing one task from a validated plan.
Task: {description}
Files to modify: {file list}
Acceptance criteria: {criteria}
Relevant ADRs: {adr list}

First principles:
- Build state-of-the-art. No workarounds, no legacy patterns.
- Fix at the correct architectural level, never with component-level hacks.
- If you discover that the plan is wrong or missing context, stop and report — do not improvise architecture.

Commit your changes when complete with message: "feat: {task-description}"

Read the full file on GitHub · 237 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 237 lines · 41 tokens per session scan A 5a171ab87023

Subscribe to this mod's changes

plan-execute is a command published in the GitHub repository FlorianBruniaux/claude-code-plugins (40 stars, last pushed 3d ago), licensed MIT. It adds 41 tokens to every session and 1,688 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.