AReaL: Command for Claude Code

.claude/commands/review-pr.md

review-pr is a command for Claude Code from areal-project/AReaL. It costs 17 tokens per session (2,273 once invoked), scanned A, original, Apache-2.0.

A pull-request code-review command that analyzes the changes, detects relevant technical areas, assigns review tasks, and summarizes findings with confidence scores.

In plain words
What is it for?
Use it to review the current branch's pull request or a specified PR, run a faster first analysis with `--quick`, and produce domain-focused review results.
Why use it?
It structures a review around the actual changes in a pull request, so checks can focus on the affected parts of the code.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. 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 →

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,736 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/review-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 review-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/areal-project/areal/review-pr.svg)](https://agentmods.dev/commands/areal-project/areal/review-pr)
Your own site
<a href="https://agentmods.dev/commands/areal-project/areal/review-pr"><img src="https://agentmods.dev/badge/commands/areal-project/areal/review-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 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,273 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.00017 $0.02273
Opus 5 $0.00009 $0.01137
Sonnet 5 $0.00003 $0.00455
Haiku 4.5 $0.00002 $0.00227

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

Security

Grade A, and why

review-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 8d 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/review-pr.md · 294 lines

How it starts

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

@.claude/data/review-pr-domains-and-signals.md @.claude/data/review-pr-templates.md

PR Code Review (Dynamic Agent Allocation)

Intelligent code review for the current branch's Pull Request. Dynamically generates targeted review tasks based on PR changes.

Arguments

$ARGUMENTS

  • No arguments: Review PR for current branch
  • PR number: Review specific PR (e.g., /review-pr 123)
  • --quick: Quick mode, only run Phase 1 analysis

Quick Start

  1. Get current branch PR: gh pr view --json number,title,state,isDraft
  2. If PR doesn't exist or is closed, stop and explain
  3. Execute Phases 1-4 in order

Workflow Overview

Phase 1: Deep PR Analysis [Haiku + Sonnet]
    |- 1.0 PR Status Check [Haiku]
    |- 1.1 Get PR Summary [Haiku]
+- 1.2-1.4 Domain/Signal Detection [Sonnet]
    |
Phase 2: Dynamic Agent Planning [Sonnet]
    |
Phase 3: Execute Review Tasks [Parallel, Dynamic Model Selection]
    |
Phase 4: Confidence Scoring & Summary [Haiku]

Model Configuration

Mode CRITICAL/HIGH MEDIUM LOW
Default Opus Sonnet Haiku
Quick (--quick) Sonnet Sonnet Sonnet
Economy (--economy) Sonnet Haiku Haiku

Phase 1: Deep PR Analysis

1.0 PR Status Check [Haiku]

Check if PR should be reviewed:

  • Is it closed? -> Stop
  • Is it a draft? -> Note but continue
  • Is it bot-generated? -> Skip

1.1 Get PR Summary [Haiku]

Get basic PR info: title, description, modified files, change summary.

1.2 Domain & Signal Detection [Sonnet]

Analyze each file change, detecting L1 domains and L2 signals by risk level.

Reference: See review-pr-domains-and-signals.md for complete domain tables:

  • L1 domains (Distributed Runtime, Model Compute & Attention, Inference Backend & Serving, etc.)
  • L2 signals per domain
  • cross-domain linkage rules

Read the full file on GitHub · 294 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. 8d ago First seen · 294 lines · 17 tokens per session scan A 3b7b8f4c68fb

Subscribe to this mod's changes

review-pr is a command published in the GitHub repository areal-project/AReaL (5,736 stars, last pushed today), licensed Apache-2.0. It adds 17 tokens to every session and 2,273 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.