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.
curl -O https://raw.githubusercontent.com/phase-rs/phase/main/.claude/skills/pr-review-loop/SKILL.mdgit clone --depth 1 https://github.com/phase-rs/phaseWrote 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.
[](https://agentmods.dev/skills/phase-rs/phase/pr-review-loop)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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.tomland 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>/unlessPR_REVIEW_STATE_DIRor--state-diris 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.lockserializes the complete discovery/render/publish flow. Neither file is review memory or approval evidence; remove the cache or use--full-refreshto recover.- A stray
review-state.sqlitefrom 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.jsonldirectly. It is unbounded and not token-shaped; all queries must go through thepr_review.pyCLI (scan/inspect/recommend/analytics/compact).review-summary.jsonand the dashboard renderer'sreview-dashboard.jsoninput 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 asCOLLABORATOR) is exempt from hard-stop path routing, architecture scope, frontend policy, and artifact admission;author_policy.repository_writermarks these packets. Their PRs still receive the full implementation review and the normal approval bar. Whenpr-contribution-handleris 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.jsonundercontributor_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 recordedsignals, is the data authority for per-contributor patterns. - Gittensor PR-history enrichment is advisory.
pr_review.pyfetches the public Gittensor PR feed by default and adds agittensorblock to packets when the author appears there. A high closed-PR count across other repos adds the genericgittensor-closed-heavyproof 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.
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.
- 3d ago Changed · +1 lines f6bafab26747
- 9d ago Changed · +8 lines 7a01e6cea422
- 23d ago Changed · +31 lines f87761b70974
- 1mo ago Changed · +1 tokens per session fad84b44caff
- 1mo ago Changed · +12 lines ac74f03d1024
- 2mo ago First seen · 267 lines · 66 tokens per session scan A 9c2f40c6fa8e
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.
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…
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.
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.
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.
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.
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.