dagster: Command for Claude Code

.claude/commands/erk/replan.md

replan is a command for Claude Code from dagster-io/dagster. It costs 12 tokens per session (1,485 once invoked), scanned A, original, Apache-2.0.

A command for recalculating an existing implementation plan for an issue against the repository's current code.

In plain words
What is it for?
Use it with an issue number or GitHub issue URL when an issue has an erk-plan label and its original plan needs updating.
Why use it?
It replaces an outdated plan with one that reflects code changes made since the original plan was written.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is dagster-io/dagster's own configuration. It tells Claude Code how to work on dagster itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dagster configures →

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,114 stars · on GitHub · dagster.io

Reuse

Borrowing it

Nothing to install: this file belongs to dagster-io/dagster. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dagster-io/dagster/master/.claude/commands/erk/replan.md
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 replan

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/replan.svg)](https://agentmods.dev/commands/dagster-io/dagster/replan)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/replan"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/replan.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 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,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00012 $0.01485
Opus 5 $0.00006 $0.00743
Sonnet 5 $0.00002 $0.00297
Haiku 4.5 $0.00001 $0.00148

Measured 7d ago against content hash 174f52efc5cb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

replan 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 7d 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/replan.md · 229 lines

How it starts

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

/erk:replan

Recomputes an existing erk-plan issue against the current codebase state, creating a new plan and closing the original.

Usage

/erk:replan 2521
/erk:replan https://github.com/owner/repo/issues/2521

Agent Instructions

Step 1: Parse Issue Reference

Extract the issue number from the argument:

  • If numeric (e.g., 2521), use directly
  • If URL (e.g., https://github.com/owner/repo/issues/2521), extract the number from the path

If no argument provided, ask the user for the issue number.

Step 2: Fetch Original Issue

erk exec get-issue-body <number>

This returns JSON with {success, issue_number, title, body, state, labels, url}. Store the issue title and check that:

  1. Issue exists
  2. Issue has erk-plan label

If not an erk-plan issue, display error:

Error: Issue #<number> is not an erk-plan issue (missing erk-plan label).

If issue is already closed, display warning but continue:

Warning: Issue #<number> is already closed. Proceeding with replan anyway.

Step 3: Fetch Plan Content

The plan content is stored in the first comment's plan-body metadata block:

gh issue view <number> --comments --json comments

Parse the first comment to find <!-- erk:metadata-block:plan-body --> section.

Extract the plan content from within the <details> block.

If no plan-body found, display error:

Error: No plan content found in issue #<number>. Expected plan-body metadata block in first comment.

Step 4: Deep Investigation

Use the Explore agent (Task tool with subagent_type=Explore) to perform deep investigation of the codebase. This is the most important step - surface-level analysis leads to poor plans.

4a: Check Plan Items Against Codebase

For each implementation item in the plan:

  • Search for relevant files, functions, or patterns
  • Determine status: implemented, partially implemented, not implemented, or obsolete

Build a comparison table showing:

Read the full file on GitHub · 229 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. 7d ago First seen · 229 lines · 12 tokens per session scan A 174f52efc5cb

Subscribe to this mod's changes

replan is a command published in the GitHub repository dagster-io/dagster (16,114 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,485 once invoked, about $0.0001 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.