pr

pr is a command for coding agents from mturac/everything-openai-codex. It costs 21 tokens per session (1,281 once invoked), scanned A, original, MIT.

A command that creates a GitHub pull request from commits on the current Git branch. A pull request is a request for a project team to review and merge changes.

In plain words
What is it for?
It helps inspect changes, use a repository's pull-request template, push the branch, and open a normal or draft pull request.
Why use it?
It checks branch status, uncommitted work, existing pull requests, and available templates before publishing the request.

Command

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/mturac/everything-openai-codex/pr
Clone the repo
git clone --depth 1 https://github.com/mturac/everything-openai-codex

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/mturac/everything-openai-codex/pr.svg)](https://agentmods.dev/commands/mturac/everything-openai-codex/pr)
Your own site
<a href="https://agentmods.dev/commands/mturac/everything-openai-codex/pr"><img src="https://agentmods.dev/badge/commands/mturac/everything-openai-codex/pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 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,281 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.00021 $0.01281
Opus 5 $0.00010 $0.00641
Sonnet 5 $0.00004 $0.00256
Haiku 4.5 $0.00002 $0.00128

Measured yesterday against content hash af8de76f051c, 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 yesterday.

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.

Origin

Copies of this mod

3 near-identical copies found in the catalogue:

  • pr — 94% identical, 32 lines differ
  • prp-pr — 92% identical, 22 lines differ
  • prp-pr — 88% identical, 18 lines differ
commands/pr.md · 185 lines

How it starts

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

Create Pull Request

Input: $ARGUMENTS — optional, may contain a base branch name and/or flags (e.g., --draft).

Parse $ARGUMENTS:

  • Extract any recognized flags (--draft)
  • Treat remaining non-flag text as the base branch name
  • Default base branch to main if none specified

Phase 1 — VALIDATE

Check preconditions:

git branch --show-current
git status --short
git log origin/<base>..HEAD --oneline
Check Condition Action if Failed
Not on base branch Current branch ≠ base Stop: "Switch to a feature branch first."
Clean working directory No uncommitted changes Warn: "You have uncommitted changes. Commit or stash first."
Has commits ahead git log origin/<base>..HEAD not empty Stop: "No commits ahead of <base>. Nothing to PR."
No existing PR gh pr list --head <branch> --json number is empty Stop: "PR already exists: #. Use gh pr view <number> --web to open it."

If all checks pass, proceed.


Phase 2 — DISCOVER

PR Template

Search for PR template in order:

  1. .github/PULL_REQUEST_TEMPLATE/ directory — if exists, list files and let user choose (or use default.md)
  2. .github/PULL_REQUEST_TEMPLATE.md
  3. .github/pull_request_template.md
  4. docs/pull_request_template.md

If found, read it and use its structure for the PR body.

Commit Analysis

git log origin/<base>..HEAD --format="%h %s" --reverse

Analyze commits to determine:

  • PR title: Use conventional commit format with type prefix — feat: ..., fix: ..., etc.
    • If multiple types, use the dominant one
    • If single commit, use its message as-is
  • Change summary: Group commits by type/area

File Analysis

git diff origin/<base>..HEAD --stat
git diff origin/<base>..HEAD --name-only

Categorize changed files: source, tests, docs, config, migrations.

Planning Artifacts

Check for related artifacts produced by /plan-prd, /plan, or the legacy PRP workflow:

  • .codex/prds/ — PRDs this PR implements a milestone of
  • .codex/plans/ — Plans executed by this PR
  • .codex/PRPs/prds/ — legacy PRP PRDs
  • .codex/PRPs/plans/ — legacy PRP implementation plans
  • .codex/PRPs/reports/ — legacy PRP implementation reports

Read the full file on GitHub · 185 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. yesterday First seen · 185 lines · 21 tokens per session scan A af8de76f051c

Subscribe to this mod's changes

pr is a command published in the GitHub repository mturac/everything-openai-codex (89 stars, last pushed 11d ago), licensed MIT. It adds 21 tokens to every session and 1,281 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-09-03.