prepare

prepare is a command for Claude Code from dagster-io/dagster. It costs 9 tokens per session (314 once invoked), scanned A, original, Apache-2.0.

A command for preparing a Git worktree from the latest GitHub plan issue in the conversation. A worktree is a separate working directory linked to the same Git repository.

In plain words
What is it for?
Use it after saving a plan to find the issue, create the worktree, and show the commands needed to activate it.
Why use it?
It avoids manually finding the issue number and setting up an isolated directory for implementation.

Command for Claude Code

About the project

Dagster is a platform for developing, running, and observing data assets, such as datasets and the processes that produce them. It is used to organize and automate data workflows.

dagster-io/dagster · 16,073 stars · on GitHub

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

Made for: Claude Code.

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 prepare

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/prepare.svg)](https://agentmods.dev/commands/dagster-io/dagster/prepare)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/prepare"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/prepare.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 314 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.00009 $0.00314
Opus 5 $0.00005 $0.00157
Sonnet 5 $0.00002 $0.00063
Haiku 4.5 $0.00001 $0.00031

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

Security

Grade A, and why

prepare 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 4d 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.

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.

.claude/commands/erk/prepare.md · 49 lines

What it actually says

/erk:prepare

Goal

Find the most recent GitHub plan issue created in this conversation and prepare a worktree for implementation via erk prepare.

What This Command Does

  1. Search conversation for the last GitHub issue reference
  2. Extract the issue number
  3. Run erk prepare <issue_number> to create a worktree

Finding the Issue

Search the conversation from bottom to top for these patterns (in priority order):

  1. plan-save/save-raw-plan output: Look for **Issue:** https://github.com/.../issues/<number>
  2. Issue URL: https://github.com/<owner>/<repo>/issues/<number>

Extract the issue number from the most recent match.

Execution

Once you have the issue number, run:

erk prepare <issue_number>

Display the command output to the user. The erk prepare command handles worktree creation and slot allocation.

The output will include activation instructions like:

To activate the worktree environment:
  source /path/to/worktree/.erk/bin/activate.sh

Share these activation instructions with the user so they can switch to the new worktree.

Error Cases

  • No issue found in conversation: Report "No GitHub plan issue found in conversation. Run /erk:plan-save first to create an issue."
  • erk prepare fails: Display the error output from the command
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. 4d ago First seen · 49 lines · 9 tokens per session scan A fbca0f322ef0

Subscribe to this mod's changes

prepare is a command published in the GitHub repository dagster-io/dagster (16,073 stars, last pushed 6d ago), licensed Apache-2.0. It adds 9 tokens to every session and 314 once invoked, about $0.0000 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-08-30.