plan-save

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

A command that saves the current development plan to GitHub as an issue, with the plan stored in the issue’s first comment.

In plain words
What is it for?
Use it to create a standalone plan issue or link a plan to an existing objective issue.
Why use it?
It keeps machine-readable issue metadata separate from the human-readable plan and provides a durable place to track the work.

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-save
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 plan-save

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/plan-save.svg)](https://agentmods.dev/commands/dagster-io/dagster/plan-save)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/plan-save"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/plan-save.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,351 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.00012 $0.01351
Opus 5 $0.00006 $0.00675
Sonnet 5 $0.00002 $0.00270
Haiku 4.5 $0.00001 $0.00135

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

Security

Grade A, and why

plan-save 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/plan-save.md · 192 lines

How it starts

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

/erk:plan-save

Save the current session's plan to GitHub as an issue with session context.

Usage

/erk:plan-save                           # Standalone plan
/erk:plan-save --objective-issue=3679    # Plan linked to objective

When creating a plan from an objective (via /erk:objective-next-plan), the exit-plan-mode hook will automatically suggest the command with the correct --objective-issue flag.

Issue Structure

The created issue has a specific structure:

  • Issue body: Contains only the metadata header (schema version, timestamps, etc.)
  • First comment: Contains the actual plan content

This separation keeps machine-readable metadata in the body while the human-readable plan is in the first comment.

Agent Instructions

Step 1: Parse Arguments

Check $ARGUMENTS for the --objective-issue flag:

If $ARGUMENTS contains "--objective-issue=<number>":
  - Extract the number
  - Store as OBJECTIVE_ISSUE variable
  - Set OBJECTIVE_FLAG to "--objective-issue=<number>"
Else:
  - Set OBJECTIVE_FLAG to empty string

Step 2: Run Save Command

Run this command with the session ID and optional objective flag:

erk exec plan-save-to-issue --format json --session-id="${CLAUDE_SESSION_ID}" ${OBJECTIVE_FLAG}

Parse the JSON output to extract issue_number for verification in Step 3.

If the command fails, display the error and stop.

Step 3: Verify Objective Link (if applicable)

Only run this step if --objective-issue was provided in arguments.

Verify the objective link was saved correctly:

erk exec get-plan-metadata <issue_number> objective_issue

Parse the JSON response:

  • If success: true and value matches the expected objective number: verification passed
  • If success: false or value doesn't match: verification failed

On verification success:

Display: Verified objective link: #<objective-number>

On verification failure:

Display error and remediation steps:

ERROR: Objective link verification failed
Expected objective: #<expected>
Actual: <actual-or-null>

The plan was saved but without the correct objective link.
Fix: Close issue #<issue_number> and re-run:
  /erk:plan-save --objective-issue=<expected>

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

Subscribe to this mod's changes

plan-save is a command published in the GitHub repository dagster-io/dagster (16,073 stars, last pushed 6d ago), licensed Apache-2.0. It adds 12 tokens to every session and 1,351 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.