git-pr-push

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

A command that commits local changes, pushes a branch with standard Git, and creates or finds a GitHub pull request. Git is the version-control system used to track code changes.

In plain words
What is it for?
Use it to turn current changes into a commit, push them to the remote repository, and open a GitHub PR.
Why use it?
It provides a complete GitHub PR workflow without requiring Graphite or its branch-stack features. It removes repetitive staging, commit, push, and PR-creation steps.

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/git-pr-push
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 git-pr-push

README.md
[![agentmods](https://agentmods.dev/badge/commands/dagster-io/dagster/git-pr-push.svg)](https://agentmods.dev/commands/dagster-io/dagster/git-pr-push)
Your own site
<a href="https://agentmods.dev/commands/dagster-io/dagster/git-pr-push"><img src="https://agentmods.dev/badge/commands/dagster-io/dagster/git-pr-push.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 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,241 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.00014 $0.02241
Opus 5 $0.00007 $0.01120
Sonnet 5 $0.00003 $0.00448
Haiku 4.5 $0.00001 $0.00224

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

Security

Grade A, and why

git-pr-push 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 3d 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/git-pr-push.md · 346 lines

How it starts

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

Push PR (Git Only)

Automatically create a git commit with a helpful summary message and push the current branch as a pull request using standard git + GitHub CLI (no Graphite required).

Usage

# Invoke the command (description argument is optional but recommended)
/erk:git-pr-push "Add user authentication feature"

# Without argument (will analyze changes automatically)
/erk:git-pr-push

What This Command Does

Handles the complete git-only push-pr workflow:

  1. Check for uncommitted changes and stage/commit them if needed
  2. Analyze git diff to generate meaningful commit message
  3. Create commit with AI-generated message
  4. Push to origin with upstream tracking
  5. Create GitHub PR (or find existing one)
  6. Report results with PR URL

Key Differences from /gt:submit-branch

  • Uses standard git push instead of gt submit
  • Uses gh pr create instead of Graphite's PR submission
  • No stack operations (no restack, no stack metadata updates)
  • Simpler workflow: git -> push -> PR (no Graphite layer)
  • Works in any git repository (not just Graphite-enabled repos)

Prerequisites

  • Git repository with remote configured
  • GitHub CLI (gh) installed and authenticated
  • Run gh auth status to verify authentication
  • Run gh auth login if not authenticated

Implementation

Execute the git-only push-pr workflow with the following steps:

Step 1: Verify Prerequisites

Check GitHub CLI authentication and get current git state:

# Check GitHub CLI authentication (show status for verification)
gh auth status

# Get current branch name
current_branch=$(git branch --show-current)

# Check for uncommitted changes
has_changes=$(git status --porcelain)

If gh auth status fails, report error and tell user to run gh auth login.

Step 2: Stage Changes (if needed)

If has_changes is non-empty, stage all changes:

git add .

Step 3: Analyze Staged Diff

Get the staged diff and analyze it to generate a commit message:

Read the full file on GitHub · 346 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. 3d ago First seen · 346 lines · 14 tokens per session scan A ce70ba799c3c

Subscribe to this mod's changes

git-pr-push is a command published in the GitHub repository dagster-io/dagster (16,073 stars, last pushed 6d ago), licensed Apache-2.0. It adds 14 tokens to every session and 2,241 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.