create-pr

create-pr is a command for Claude Code from dsswift/ion. It costs 28 tokens per session (2,306 once invoked), scanned A, original, MIT.

A command that pushes the current feature branch and opens a pull request into the main branch. A pull request is a proposal to merge reviewed code changes into a shared branch.

In plain words
What is it for?
Use it to run the required checks, push a non-main branch, and create a pull request with a generated title and description.
Why use it?
It turns branch commits and related issue references into a structured review request while checking that tests and builds pass first.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: model in frontmatter; names the AskUserQuestion tool.

Good fit Use it to run the required checks, push a non-main branch, and create a pull request with a generated title and description.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/dsswift/ion/create-pr
View source ↗ dsswift/ion
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.

Clone the repo
git clone --depth 1 https://github.com/dsswift/ion

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 create-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/dsswift/ion/create-pr/github.svg)](https://agentmods.dev/commands/dsswift/ion/create-pr)
Your own site
<a href="https://agentmods.dev/commands/dsswift/ion/create-pr"><img src="https://agentmods.dev/badge/commands/dsswift/ion/create-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for create-pr

Your own site · 80×15
<a href="https://agentmods.dev/commands/dsswift/ion/create-pr"><img src="https://agentmods.dev/badge/commands/dsswift/ion/create-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 28 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,306 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.00028 $0.02306
Opus 5.5 $0.00011 $0.00922
Sonnet 5.5 $0.00006 $0.00461
Haiku 4.5 $0.00003 $0.00231

Measured 16d ago against content hash e30b866fbcb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

create-pr 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 16d 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.

.ion/commands/create-pr.md · 266 lines

How it starts

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

/create-pr

Push the current feature branch and open a pull request into main. The title and body come from the branch's commits and the issues they resolve.

Rules

  • This command is the one place git push runs. It pushes the feature branch and nothing else.
  • The operator merges. This command opens the PR and stops.
  • The PR is a real PR, not a draft, so it gets review coverage.
  • Every failure a check in this command surfaces is fixed before the PR opens. CI (.github/workflows/quality.yml) is expected to be green.
  • Issue closure is resolved in Step 7 on every run, by matching open issues against the branch.

Step 1: Validate the branch

git branch --show-current

If the result is main, stop:

You're on main. Switch to a feature branch before creating a PR.

Step 2: Check for uncommitted work

git status --porcelain

If there are uncommitted changes, stop:

There are uncommitted changes on this branch. Commit them before opening a PR.

Step 2b: Rebase onto the latest main and read the diff

git fetch origin main
git rebase origin/main

The parity gate then tests what main will receive. On a conflict, resolve it when both sides make the intent plain, then continue the rebase. When the resolution needs a decision, run git rebase --abort and stop with the conflicting files named.

Read what the PR will carry:

git diff origin/main...HEAD --stat
git diff origin/main...HEAD

Check the whole diff against what the commits say they do. Debug output, stray files, edits unrelated to the goal, and secret values are removed in a commit, and the command starts again from Step 2.


Step 3: Linux parity gate

CI runs the engine, desktop, and server suites on ubuntu-latest. Development is on macOS, so path semantics, file-watcher timing, locale, and race-detector scheduling can pass locally and fail in CI. This step runs the same commands in Linux containers.

3a. Determine the gates

Read the full file on GitHub · 266 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. 16d ago Changed · -20 lines e30b866fbcb8
  2. 1mo ago Changed · +50 lines · +3 tokens per session fe5523c9d584
  3. 1mo ago Changed · +1 lines 3ed1660ebe70
  4. 1mo ago First seen · 235 lines · 25 tokens per session scan A 6b4746817c20

Subscribe to this mod's changes

create-pr is a command published in the GitHub repository dsswift/ion (4 stars, last pushed today), licensed MIT. It adds 28 tokens to every session and 2,306 once invoked, about $0.0001 per session on Opus 5.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-31.