AReaL: Command for Claude Code

.claude/commands/create-pr.md

create-pr is a command for Claude Code from areal-project/AReaL. It costs 40 tokens per session (5,611 once invoked), scanned A, original, Apache-2.0.

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

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is areal-project/AReaL's own configuration. It tells Claude Code how to work on AReaL itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AReaL configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is - [ ] I have read the [Contributing Guide](../CONTRIBUTING.md).

About the project

AReaL is an infrastructure system for training large language models with reinforcement learning, connecting model training to applications built around AI agents. Researchers and developers use it to train reasoning and agentic models through asynchronous workflows, and the catalogue add-ons support working with AReaL.

areal-project/AReaL · 5,888 stars · on GitHub · areal-ai.io

Reuse

Borrowing it

Nothing to install: this file belongs to areal-project/AReaL. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/areal-project/AReaL/main/.claude/commands/create-pr.md
Clone the repo
git clone --depth 1 https://github.com/areal-project/AReaL

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/areal-project/areal/create-pr/github.svg)](https://agentmods.dev/commands/areal-project/areal/create-pr)
Your own site
<a href="https://agentmods.dev/commands/areal-project/areal/create-pr"><img src="https://agentmods.dev/badge/commands/areal-project/areal/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/areal-project/areal/create-pr"><img src="https://agentmods.dev/badge/commands/areal-project/areal/create-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. 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.00040 $0.05611
Opus 5.5 $0.00016 $0.02244
Sonnet 5.5 $0.00008 $0.01122
Haiku 4.5 $0.00004 $0.00561

Measured 2mo ago against content hash b29389596e2a, 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 2mo 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. 2mo 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,888 stars, last pushed today), licensed Apache-2.0. It adds 40 tokens to every session and 5,611 once invoked, about $0.0002 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-30.