pr-review-loop

An automated workflow for reviewing open contributor pull requests in phase.rs. A pull request is a proposed code change awaiting review.

In plain words
What is it for?
Use it to find pull requests needing review, send complex cases for implementation review, and hand approved merge work to the contributor handler.
Why use it?
It avoids repeating reviews when nothing has changed and identifies new commits, author replies, outdated reviews, CI changes, or policy problems that need attention.

Skill for Claude CodeCodex

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 skills/phase-rs/phase/pr-review-loop
Any agent
npx skills add phase-rs/phase --skill pr-review-loop
Clone the repo
git clone --depth 1 https://github.com/phase-rs/phase

Made for: Claude Code, Codex.

Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,395 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.00066 $0.10395
Opus 5 $0.00033 $0.05198
Sonnet 5 $0.00013 $0.02079
Haiku 4.5 $0.00007 $0.01039

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

Security

Grade A, and why

pr-review-loop 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 2d 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/skills/pr-review-loop/SKILL.md · 267 lines

How it starts

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

PR Review Loop

Continuously review open contributor PRs, reprocessing only when GitHub state indicates new information: changed head, author follow-up, stale approval, stale request-changes, CI transition, queue drop, or a policy/hard-stop condition.

This skill is intentionally small. Mutable policy and contributor-specific state do not live here.

Sources Of Truth

  • GitHub is authoritative for PR head, author, reviews, comments, labels, CI, and merge-queue state.
  • Repo policy lives in .agents/pr-review-policy.toml and must contain only repo-level, non-personal rules: path classifiers, domain capabilities, labels, hard-stop path patterns, generated-file patterns, and default gates.
  • Local review memory lives outside the repo by default under ~/.local/state/pr-review/<owner>__<repo>/ unless PR_REVIEW_STATE_DIR or --state-dir is set. This directory contains:
    • review-events.jsonl — the sole canonical store: an append-only local event log with locked, deduplicated, fsync'd appends.
    • review-summary.json — generated token-minimal summary derived from the log.
    • review-dashboard.json — generated dashboard snapshot. It is a derived cache, not review memory: it combines the current open-PR scan with a retained terminal-PR archive so closed-without-merge PRs remain visible after the 48-hour active window.
    • A stray review-state.sqlite from an older build is an orphaned leftover; it is no longer read or written, and is safe to ignore or delete manually.
  • Never Read review-events.jsonl directly. It is unbounded and not token-shaped; all queries must go through the pr_review.py CLI (scan/inspect/recommend/analytics/compact). review-summary.json and the dashboard renderer's review-dashboard.json input are the only state files intended for direct reading.
  • No hardcoded names. Contributor standings, frontend exceptions, reviewer identities, private overrides, and one-off maintainer policy belong in local/private state, never in this skill.
  • Contributor standing lives in private-overrides.json under contributor_standing (skip/probation/watch/trusted, lowercase-matched logins). It sits in the gitignored state dir on the review host; other hosts see only derived standing. The narrative quality log is a historical appendix — the event log, via recorded signals, is the data authority for per-contributor patterns.
  • Gittensor PR-history enrichment is advisory. pr_review.py fetches the public Gittensor PR feed by default and adds a gittensor block to packets when the author appears there. A high closed-PR count across other repos adds the generic gittensor-closed-heavy proof risk flag. Use it to increase caution and require concrete proof; do not cite it as a public accusation or reject a PR on that signal alone.

Read the full file on GitHub · 267 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. 2d ago First seen · 267 lines · 66 tokens per session scan A 9c2f40c6fa8e

Subscribe to this mod's changes

pr-review-loop is a skill published in the GitHub repository phase-rs/phase (259 stars, last pushed 2d ago), licensed Apache-2.0. It adds 66 tokens to every session and 10,395 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

add-card

Implements new Magic: The Gathering cards for the Argentum Engine. Use when adding a new card, the user provides one or more card names to implement, or asks to implement a specific MTG card. Several cards that reuse existing primitives can be implemented together into one PR.

wingedsheep/argentum-engine · 0 tokens

add-feature

Adds a new feature or mechanic to the Argentum Engine (SDK primitive, effect, trigger, condition, static/replacement ability, server/client capability) following the project's architecture and SDK-elegance principles. Use when implementing engine/SDK/server/client functionality that isn't a single card — e.g. "add an…

wingedsheep/argentum-engine · 87 tokens

verify-set

Prove a Magic set is actually finished — card-for-card complete, field-for-field faithful to Scryfall, scripts that match their oracle text, tokens that resolve the set's own art, behaviourally sound — then archive its backlog. Builds the Scryfall dump and CardFieldVerificationTest, fans the per-card DSL and token…

wingedsheep/argentum-engine · 152 tokens

assay-ready-sweep

Implement every "Assay-ready" card for a Magic set — the cards Argentum Assay reads whole that the set hasn't authored yet — placing each canonical in its earliest real printing and giving the sweep's own set a Printing row when the card is a reprint. Computes the four-way split first, authors to assay compile's JSON…

wingedsheep/argentum-engine · 156 tokens

review-changes

Review pending changes (a branch, PR, or working tree) for the Argentum Engine. Optimizes for an elegant, reusable SDK — flags one-off effects/abilities that should compose existing primitives — and checks correctness, projection use, tests, and architectural fit. Use when the user says "review this PR", "review this…

wingedsheep/argentum-engine · 87 tokens

create-backlog-for-set

Create the backlog/sets/ / entry for a Magic set — download the whole set from Scryfall (cached alongside Assay's cache), write cards.md as a per-colour checklist with the already-implemented cards ticked, scaffold the set's definitions/ / module if it doesn't exist, and write mechanics.md ordering every mechanic the…

wingedsheep/argentum-engine · 150 tokens