Skip to content
Skill

/erk:plan-implement

by dagster-io

AI Summary

Automates the workflow of implementing plans from GitHub issues or files into code, orchestrating setup, execution, CI, and PR submission. Developers using the erk framework benefit from streamlined implementation pipelines.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to install the "/erk:plan-implement" skill in my project.

Please run this command in my terminal:
# Install skill into the correct directory (29 files)
mkdir -p .claude/skills/erk && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/SKILL.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/plan-implement.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/__init__.py "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/__init__.py" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/consolidate-learn-plans.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/consolidate-learn-plans.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/diag-lock-error.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/diag-lock-error.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/diverge-fix.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/diverge-fix.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/git-pr-push.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/git-pr-push.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/land.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/land.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/learn.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/learn.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/migrate-objective-schema.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/migrate-objective-schema.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/objective-create.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/objective-create.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/objective-list.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/objective-list.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/objective-plan.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/objective-plan.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/objective-update-with-closed-plan.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/objective-update-with-closed-plan.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/one-shot-plan-only.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/one-shot-plan-only.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/one-shot.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/one-shot.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/plan-save.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/plan-save.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-address-remote.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-address-remote.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-address.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-address.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-dispatch.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-dispatch.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-incremental-dispatch.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-incremental-dispatch.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-list.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-list.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-preview-address.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-preview-address.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-rebase.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-rebase.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/pr-submit.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/pr-submit.md" && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/replan.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/replan.md" && mkdir -p .claude/skills/erk/system && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/system/consolidate-learn-plans-plan.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/system/consolidate-learn-plans-plan.md" && mkdir -p .claude/skills/erk/system && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/system/objective-plan-node.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/system/objective-plan-node.md" && mkdir -p .claude/skills/erk/system && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/system/objective-update-with-landed-pr.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/system/objective-update-with-landed-pr.md" && mkdir -p .claude/skills/erk/system && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/skills/erk/system/one-shot-plan.md "https://raw.githubusercontent.com/dagster-io/erk/master/.claude/commands/erk/system/one-shot-plan.md"

Then restart Claude Code (or reload the window in Cursor) so the skill is picked up.

Description

Implement a plan from GitHub issue, file path, current branch, or current .erk/impl-context/ folder

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 directory under .erk/impl-context/ • A plan branch checked out (e.g., plnd/... or P{number}-...) • A plan in ~/.claude/plans/ (from plan mode)

Usage

`bash /erk:plan-implement # Use impl directory, detect from branch, 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 ` ---

/erk:plan-implement

Implement a plan - either from a GitHub issue, a markdown file, an existing impl directory under .erk/impl-context/, or by saving the current plan first. This is the primary implementation workflow - it orchestrates: • Setting up the impl directory under .erk/impl-context/<branch>/ (from issue, file, existing folder, or fresh plan) • Executing the implementation • Running CI and submitting the PR

Step 1: Set Up Implementation

Parse $ARGUMENTS and run the consolidated setup command: • If numeric (e.g., 2521): erk exec setup-impl --issue 2521 • If GitHub URL (e.g., https://github.com/.../issues/2521): Extract number, erk exec setup-impl --issue 2521 • If path to file (anything else non-empty): erk exec setup-impl --file <path> • If empty: erk exec setup-impl (auto-detects from .erk/impl-context/, branch, or fails) `bash erk exec setup-impl [--issue <N> | --file <path>] ` This single command handles: • Fetching plan from GitHub issue/PR (draft-PR or issue-based) • Setting up from a local markdown file • Auto-detecting from existing impl directory under .erk/impl-context/ • Auto-detecting plan number from branch name (P{number}-... or PR lookup) • Creating/checking out the feature branch • Creating impl directory under .erk/impl-context/<branch>/ with plan content • Running impl-init validation • Cleaning up .erk/impl-context/ staging directory (git rm + commit + push) Otherwise, generate a branch slug and set up from the specified issue: • Fetch the title: gh pr view <ISSUE_ARG> --json title -q .title (for draft-PR plans) or gh issue view <ISSUE_ARG> --json title -q .title (for issue plans). Try PR first, fall back to issue. • Generate a branch slug from the title: • 2-4 hyphenated lowercase words, max 30 characters • Capture distinctive essence, drop filler words (the, a, for, implementation, plan) • Prefer action verbs: add, fix, refactor, update, consolidate, extract, migrate • Examples: "fix-auth-session", "add-plan-validation", "refactor-gateway-abc" • Store as BRANCH_SLUG. `bash erk exec setup-impl --issue <ISSUE_ARG> --branch-slug="${BRANCH_SLUG}" ` If setup-impl exits with code 1 and error: "no_plan_found", fall back to saving the current plan: Generate a branch slug from the plan title (the first # heading in the plan file): • 2-4 hyphenated lowercase words, max 30 characters • Capture distinctive essence, drop filler words (the, a, for, implementation, plan) • Prefer action verbs: add, fix, refactor, update, consolidate, extract, migrate • Store as BRANCH_SLUG Save the current plan to GitHub and capture the issue number: `bash erk exec plan-save --format json --session-id="${CLAUDE_SESSION_ID}" --branch-slug="${BRANCH_SLUG}" ` Parse the JSON output to get issue_number, then: `bash erk exec setup-impl --issue <issue_number> ` The setup-impl output includes related_docs (skills and docs to load) and has_plan_tracking (whether GitHub issue tracking is active). If this fails, display the error and stop.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 1mo ago
Active
AdoptionUnder 100 stars
72 ★ · Niche
DocsREADME + description
Well-documented

GitHub Signals

Stars72
Forks7
Issues139
Updated1mo ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Claude Code