plan-implement

A command that carries out a software-development plan from a GitHub issue, a Markdown file, an existing `.impl` folder, or the current session.

In plain words
What is it for?
Use it to implement a tracked GitHub task or local plan in an `erk`-managed Git repository, then run checks and submit the result for review.
Why use it?
It brings planning, code changes, continuous-integration checks, and pull-request submission into one workflow.

Command for Claude Code

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/dagster-io/dagster/plan-implement
Clone the repo
git clone --depth 1 https://github.com/dagster-io/dagster

Made for: Claude Code.

Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,028 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00016 $0.02028
Opus 5 $0.00008 $0.01014
Sonnet 5 $0.00003 $0.00406
Haiku 4.5 $0.00002 $0.00203

Measured 2d ago against content hash cdc094cfbeb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

plan-implement scanned grade C with 1 finding 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 2d ago.

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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

git rm -rf .worker-impl/
.claude/commands/erk/plan-implement.md · 288 lines

How it starts

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

/erk:plan-implement

Implement a plan - either from a GitHub issue, a markdown file, an existing .impl/ folder, or by saving the current plan first.

This is the primary implementation workflow - it orchestrates:

  1. Setting up the .impl/ folder (from issue, file, existing folder, or fresh plan)
  2. Executing the implementation
  3. Running CI and submitting the PR

Prerequisites

  • Must be in a git repository managed by erk
  • GitHub CLI (gh) must be authenticated
  • One of:
    • An issue number, URL, or file path argument
    • An existing .impl/ folder
    • A plan in ~/.claude/plans/ (from plan mode)

Usage

/erk:plan-implement                    # Use .impl/ or save current plan
/erk:plan-implement 2521               # Fetch and implement issue #2521
/erk:plan-implement https://github.com/owner/repo/issues/2521  # URL form
/erk:plan-implement ./my-plan.md       # Implement from local markdown file

Agent Instructions

Step 0: Parse Arguments

Extract optional argument from $ARGUMENTS:

  • If numeric (e.g., 2521): Store as ISSUE_ARG
  • If GitHub URL (e.g., https://github.com/owner/repo/issues/2521): Extract number from path, store as ISSUE_ARG
  • If path to file (anything else non-empty): Store as FILE_ARG
  • If empty: Proceed to check .impl/ folder

Store either ISSUE_ARG (issue number) or FILE_ARG (file path), or neither if empty.

Step 1: Determine Implementation Source

Follow this priority order:

1a. If ISSUE_ARG is provided

Set up from the specified issue:

erk exec setup-impl-from-issue <ISSUE_ARG>

This command:

  • Creates a feature branch from current branch (stacked) or trunk
  • Checks out the new branch in the current worktree
  • Creates .impl/ folder with the plan content
  • Saves issue reference for PR linking

If this fails, display the error and stop.

Then run impl-init:

erk exec impl-init --json
1a-file. If FILE_ARG is provided

Set up from the specified markdown file:

Read the full file on GitHub · 288 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. 2d ago First seen · 288 lines · 16 tokens per session scan C cdc094cfbeb6

Subscribe to this mod's changes

plan-implement is a command published in the GitHub repository dagster-io/dagster (16,073 stars, last pushed 4d ago), licensed Apache-2.0. It adds 16 tokens to every session and 2,028 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.