create-pr

A command for opening a GitHub pull request, which is a proposed set of code changes for review and merging. It writes the title and description from the work done in the current session.

In plain words
What is it for?
Use it after making changes on a branch when you want to create a pull request with an accurate, public-facing summary. It includes checks and guidance for this Python service and its tenant-specific data graphs.
Why use it?
It avoids descriptions based only on changed files and commit messages, which can miss why the work was done or describe it inaccurately.

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/robofinsystems/robosystems/create-pr
Clone the repo
git clone --depth 1 https://github.com/RoboFinSystems/robosystems

Made for: Claude Code.

Per session 18 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,424 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.00018 $0.02424
Opus 5 $0.00009 $0.01212
Sonnet 5 $0.00004 $0.00485
Haiku 4.5 $0.00002 $0.00242

Measured 2d ago against content hash 7c3a71f8bf99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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/create-pr.md · 121 lines

How it starts

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

Create a GitHub pull request for the current branch, writing the title and description from the actual work done in this session — not reconstructed from the diff.

Why this command exists

The previous flow outsourced PR-description authoring to a GitHub Action that only saw the diff and commit messages. It could not know why the changes were made, so it frequently described things that weren't true. Those inaccurate descriptions then fed @claude reviews, compounding the bad information. This command fixes that at the root: you author the description here, where the full context of what was done and why is available.

This is a Python backend service (FastAPI + LadybugDB graphs, managed with uv and just). Ground every description in the actual code that changed, and stay mindful of multi-tenancy (graph operations scoped to graph_id).

This repository is public. The PR title and body are world-readable the moment they're pushed — routinely before the change is deployed, since deploys are manual. Treat the description as a publication, not a work note.

Instructions

1. Preflight

Run these checks before touching anything:

# Current and target branches
CURRENT=$(git branch --show-current)
TARGET=${1:-main}            # override target via the first argument
  • Never PR from the default branch. If CURRENT is main (or master/staging), stop and tell the user to switch to a feature branch first.
  • Source ≠ target. If CURRENT == TARGET, stop.
  • Uncommitted changes. Run git status --porcelain. If there are uncommitted/staged changes, surface them and ask whether to commit them (respecting the repo's commit rules — never on main, stage files by name, no git add -A) or proceed without them. The PR description must reflect committed state.
  • Existing PR. Check gh pr list --head "$CURRENT" --base "$TARGET" --json url,number. If a PR already exists, do not create a duplicate — offer to update its title/body with gh pr edit instead.
  • Security fixes — check deployment first. A security-fix commit discloses the bug through its diff the moment it's pushed. If this branch carries one, check whether the vulnerable code is still live in production (git show <prod-tag>:<file> against the fix) and tell the user, so they can sequence the deploy with — or ahead of — the public push rather than opening a window.
  • Push the branch. gh pr create requires the branch on the remote. Ensure it's pushed: git push -u origin "$CURRENT" (the user invoking /create-pr is the explicit, in-the-moment request that authorizes pushing this feature branch — this is the one push allowed without a separate ask; never push main).

Read the full file on GitHub · 121 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. 2d ago First seen · 121 lines · 18 tokens per session scan A 7c3a71f8bf99

Subscribe to this mod's changes

create-pr is a command published in the GitHub repository RoboFinSystems/robosystems (24 stars, last pushed 3d ago), licensed Apache-2.0. It adds 18 tokens to every session and 2,424 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.