create-pr

A command that prepares a GitHub pull request from your current branch. A pull request is a request to review and merge code into another branch.

In plain words
What is it for?
Use it to rebase on the latest main branch, squash commits, and create a GitHub pull request with a generated title and description.
Why use it?
It handles the checks, rebasing, commit cleanup, and draft or target-branch options needed before opening the request.

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/areal-project/areal/create-pr
Clone the repo
git clone --depth 1 https://github.com/areal-project/AReaL

Made for: Claude Code.

Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,611 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.00040 $0.05611
Opus 5 $0.00020 $0.02805
Sonnet 5 $0.00008 $0.01122
Haiku 4.5 $0.00004 $0.00561

Measured 3d ago against content hash b29389596e2a, 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 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/create-pr.md · 796 lines

How it starts

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

Create Pull Request

Rebase from the latest origin/main, squash commits, and create a PR on GitHub with an intelligent title and description.

Usage

/create-pr [--draft] [--base <branch>]

Arguments:

  • --draft: Create as draft PR
  • --base <branch>: Target branch (default: main)

Workflow

Step 1: Verify Prerequisites

# Check current branch
git branch --show-current

# Check if on main/master (should NOT be)
if [[ $(git branch --show-current) == "main" || $(git branch --show-current) == "master" ]]; then
  echo "ERROR: Cannot create PR from main/master branch"
  exit 1
fi

# Check for uncommitted changes
git status --short

# Ensure gh CLI is available
gh --version

Action: If there are uncommitted changes, stop, and then ask user to commit or stash them first.

Step 1.5: Determine Push Remote (Fork Support)

Check if user has push access to origin, and if not, identify the fork remote.

# List all remotes
git remote -v

# Try to determine push remote
# Option 1: Check if origin is writable (try a dry-run push)
git push --dry-run origin $(git branch --show-current) 2>&1

# Option 2: Check gh auth status and repo permissions
gh auth status
gh repo view --json owner,name,viewerPermission

Logic for Determining Push Remote:

If origin is writable: Use origin directly (maintainer workflow)

If origin is NOT writable: Look for a fork remote

  • Common fork remote names: fork, user, <username>, or any remote pointing to user's fork
  • Verify the fork remote points to user's own fork via gh repo view <remote-url> --json owner

If no fork remote found: Ask user to add their fork as a remote:

git remote add fork https://github.com/<username>/AReaL.git

Store for later use:

  • PUSH_REMOTE: The remote to push to (e.g., origin or fork)
  • UPSTREAM_REPO: The upstream repo for PR target (e.g., areal-project/AReaL)
  • FORK_OWNER: Fork owner username (for --head parameter if needed)

Read the full file on GitHub · 796 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 · 796 lines · 40 tokens per session scan A b29389596e2a

Subscribe to this mod's changes

create-pr is a command published in the GitHub repository areal-project/AReaL (5,708 stars, last pushed yesterday), licensed Apache-2.0. It adds 40 tokens to every session and 5,611 once invoked, about $0.0002 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.