phase: Skill for Claude Code

.claude/skills/pr-review-loop/SKILL.md

pr-review-loop is a skill for Claude Code from phase-rs/phase. It costs 67 tokens per session (12,999 once invoked), scanned A, original, Apache-2.0.

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 Code

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

This is phase-rs/phase's own configuration. It tells Claude Code how to work on phase 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 phase configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/matt/dev/forge.rs-pr-tracker.tsv.

Reuse

Borrowing it

Nothing to install: this file belongs to phase-rs/phase. 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/phase-rs/phase/main/.claude/skills/pr-review-loop/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/phase-rs/phase

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 pr-review-loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/phase-rs/phase/pr-review-loop/github.svg)](https://agentmods.dev/skills/phase-rs/phase/pr-review-loop)
Your own site
<a href="https://agentmods.dev/skills/phase-rs/phase/pr-review-loop"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/pr-review-loop/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 pr-review-loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/phase-rs/phase/pr-review-loop"><img src="https://agentmods.dev/badge/skills/phase-rs/phase/pr-review-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,999 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.00067 $0.12999
Opus 5.5 $0.00027 $0.05200
Sonnet 5.5 $0.00013 $0.02600
Haiku 4.5 $0.00007 $0.01300

Measured 3d ago against content hash f6bafab26747, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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/skills/pr-review-loop/SKILL.md · 319 lines

How it starts

The opening of the file, as written. The whole thing — 319 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.
    • github-discovery.json — disposable, versioned, repository-scoped raw GitHub discovery cache with the last successful query-start checkpoint. github-discovery.lock serializes the complete discovery/render/publish flow. Neither file is review memory or approval evidence; remove the cache or use --full-refresh to recover.
    • 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.
  • Repository writers bypass contributor-only gates. An author with write, maintain, or admin access (read live from GitHub's collaborator permissions, never from authorAssociation, which also reports triage-only collaborators as COLLABORATOR) is exempt from hard-stop path routing, architecture scope, frontend policy, and artifact admission; author_policy.repository_writer marks these packets. Their PRs still receive the full implementation review and the normal approval bar. When pr-contribution-handler is dispatched for one, pass the writer status so its path-based hard stops do not re-block the PR.
  • 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 · 319 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 Changed · +1 lines f6bafab26747
  2. 9d ago Changed · +8 lines 7a01e6cea422
  3. 23d ago Changed · +31 lines f87761b70974
  4. 1mo ago Changed · +1 tokens per session fad84b44caff
  5. 1mo ago Changed · +12 lines ac74f03d1024
  6. 2mo 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 (312 stars, last pushed today), licensed Apache-2.0. It adds 67 tokens to every session and 12,999 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

critic-contract

Shared read-side contract every read-only CRITIC imports — adversarial stance, empirical verification of runtime-behavior claims, the mandatory self-red-team before APPROVE, how a finding is stated (quote the span, take the UNKNOWN escape hatch) and held (only new evidence moves a severity, never pushback), spec-UB…

saeedkolivand/ai-job-hunter-app · 97 tokens

code-quality

Shared clean-code / DRY / KISS / YAGNI standards and stack-specific smells for the React 19 + TypeScript + Rust (Tauri 2) monorepo. Library consumed by the code-quality-reviewer and code-quality-author agents.

saeedkolivand/ai-job-hunter-app · 55 tokens

deployment-rules

Release/deployment standards — semantic-release, commitlint, version sync, the updater. Load for /prepare-release and changes to release.config.mjs / commitlint / workflows / version files. Owned by project-steward.

saeedkolivand/ai-job-hunter-app · 49 tokens

review-workflow

The implement→review flow under the ≤3-reviewer budget with the conditional test stage. Use for /implement-feature, /fix-bug, /refactor-module and any change that needs structured review.

saeedkolivand/ai-job-hunter-app · 45 tokens

coding-standards

General repo rules enforced by ESLint/TypeScript/CI — PRs-only, never bypass lint, import ordering, type imports, path privacy, commit format. Load for any code change.

saeedkolivand/ai-job-hunter-app · 44 tokens

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits with the [compiler] or [rust-compiler] prefix.

react/react · 42 tokens