dagster: Command for Claude Code

.claude/commands/erk/pr-address.md

pr-address is a command for Claude Code from dagster-io/dagster. It costs 7 tokens per session (2,979 once invoked), scanned A, original, Apache-2.0.

A command that fetches review and discussion comments from the pull request for your current branch and works through the unresolved feedback.

In plain words
What is it for?
Use it to inspect pull-request feedback, update the code in response, commit the changes, and resolve the addressed review threads through `erk` commands.
Why use it?
It groups related comments and handles the required thread-resolution process while making incremental commits.

Command for Claude Code

Written for Claude Code: installed under .claude/.

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/pr-address.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 pr-address

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/pr-address.svg)](https://agentmods.dev/commands/dagster-io/dagster/pr-address)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/pr-address"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/pr-address.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 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,979 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.1 $0.00007 $0.02979
Opus 5 $0.00003 $0.01489
Sonnet 5 $0.00001 $0.00596
Haiku 4.5 $0.00001 $0.00298

Measured 6d ago against content hash b3c77b7a2d65, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

pr-address 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 6d 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/pr-address.md · 368 lines

How it starts

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

/erk:pr-address

Description

Fetches unresolved PR review comments AND PR discussion comments from the current branch's PR and addresses them using holistic analysis with smart batching. Comments are grouped by complexity and relationship, then processed batch-by-batch with incremental commits and resolution.

Usage

/erk:pr-address
/erk:pr-address --all    # Include resolved threads (for reference)

Agent Instructions

CRITICAL: Use ONLY erk exec Commands

  • ❌ DO NOT use raw gh api calls
  • ❌ DO NOT use gh pr commands directly
  • ✅ ONLY use erk exec get-pr-review-comments, erk exec resolve-review-thread, etc.

The erk exec commands handle thread resolution correctly. Raw API calls only reply without resolving.

Phase 1: Fetch & Analyze

Step 1.1: Fetch All Comments

Run both CLI commands to get review comments AND discussion comments:

erk exec get-pr-review-comments
erk exec get-pr-discussion-comments

Review Comments JSON:

{
  "success": true,
  "pr_number": 123,
  "pr_url": "https://github.com/owner/repo/pull/123",
  "pr_title": "Feature: Add new capability",
  "threads": [
    {
      "id": "PRRT_abc123",
      "path": "src/foo.py",
      "line": 42,
      "is_outdated": false,
      "comments": [
        {
          "author": "reviewer",
          "body": "This should use LBYL pattern instead of try/except",
          "created_at": "2024-01-01T10:00:00Z"
        }
      ]
    }
  ]
}

Discussion Comments JSON:

{
  "success": true,
  "pr_number": 123,
  "pr_url": "https://github.com/owner/repo/pull/123",
  "pr_title": "Feature: Add new capability",
  "comments": [
    {
      "id": 12345,
      "author": "reviewer",
      "body": "Please also update the docs",
      "url": "https://github.com/owner/repo/pull/123#issuecomment-12345"
    }
  ]
}
Step 1.2: Handle No Comments Case

If both threads is empty AND comments is empty, display: "No unresolved review comments or discussion comments on PR #123."

Read the full file on GitHub · 368 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. 6d ago First seen · 368 lines · 7 tokens per session scan A b3c77b7a2d65

Subscribe to this mod's changes

pr-address is a command published in the GitHub repository dagster-io/dagster (16,114 stars, last pushed yesterday), licensed Apache-2.0. It adds 7 tokens to every session and 2,979 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.