pr

A command for opening a pull request, which is a request to review and merge code into another branch. It checks the current branch, handles committed changes, updates documentation, and monitors continuous integration checks with approval at each step.

In plain words
What is it for?
Use it to prepare a branch, optionally commit and push its changes, open a pull request, and follow its CI results.
Why use it?
It reduces mistakes such as working from a protected branch, overlooking uncommitted changes, or opening a pull request without a remote branch or current documentation.

Command for Codex

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/opsmill/infrahub-mcp/pr
Clone the repo
git clone --depth 1 https://github.com/opsmill/infrahub-mcp

Made for: Codex.

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 1,664 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.01664
Opus 5 $0.00009 $0.00832
Sonnet 5 $0.00004 $0.00333
Haiku 4.5 $0.00002 $0.00166

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

Security

Grade A, and why

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 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.

.agents/commands/pr.md · 205 lines

How it starts

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

Open Pull Request

Introduction

Handle the full workflow from current branch state to an open, CI-monitored pull request. This command enforces branch discipline, analyzes all branch changes for a business-value-focused description, ensures documentation is current, and requires user approval at every step.

Arguments

#$ARGUMENTS

Supported arguments:

  • commit — Stage, commit, and push uncommitted changes before proceeding. Without this argument, no commits are made — the command works only with what is already committed on the branch.

Main Tasks

1. Safety Checks & Branch Setup

  • Verify we are NOT on stable or main:
    git branch --show-current
    
    If on a protected branch, stop immediately and inform the user.
  • Check working tree status:
    git status --short
    
    If there are uncommitted changes and commit was NOT passed, warn the user but do not commit.
  • Ensure the branch tracks a remote:
    git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo "no upstream"
    
    If no upstream, set one:
    git push -u origin $(git branch --show-current)
    

2. Commit Changes (only when commit argument is provided)

Skip this phase entirely if commit was NOT passed as an argument.

When commit IS provided:

  1. Run the required quality gates:
    uv run pre-commit run
    
    Fix any issues that arise before committing.
  2. Stage all changes:
    git add -A
    
  3. Create a commit with a descriptive message following project conventions.
  4. Push to remote:
    git push
    

3. Analyze All Branch Changes

  1. Find the merge base with stable:
    git merge-base stable HEAD
    
  2. Review all commits on this branch:
    git log stable..HEAD --oneline
    
  3. Review the full diff:
    git diff stable...HEAD --stat
    
  4. Read changed files to understand the full scope of changes.
  5. Check if a spec exists for this work (look in .specify/ or specs/).

Read the full file on GitHub · 205 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 · 205 lines · 18 tokens per session scan A aa2e4bb89e02

Subscribe to this mod's changes

pr is a command published in the GitHub repository opsmill/infrahub-mcp (10 stars, last pushed 5d ago), licensed Apache-2.0. It adds 18 tokens to every session and 1,664 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-31.