ワンクリックで
pr-review
Auto-review open PRs with severity-tagged findings, inline comments, and a one-line verdict
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Auto-review open PRs with severity-tagged findings, inline comments, and a one-line verdict
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit every enabled skill's upstream file dependencies for staleness — flags chained skills about to consume yesterday's article or a long-dead topic file
Audit .github/workflows and composite actions with zizmor + actionlint, classify findings against the prior audit, auto-fix Critical/High regressions, and open a PR only when something actually changed.
Weekly API cost report — computes dollar costs from token usage, flags anomalies, forecasts burn, and prescribes concrete optimizations
Weekly partial-correlation of compute economics against a Hyperliquid macro basket — DePIN-token proxy track runs every week (n>180d), sweep-P&L track defers until n≥30 joined days
Score frontier LLMs (Claude, GPT, Gemini, DeepSeek, Grok) on a private compute-markets task corpus, track score deltas across releases, flag public-vs-private divergence
Save a note as one or more atomic notes under memory/notes/ (and optionally Supernotes). Splits bundled inputs into separate atomic files.
| name | PR Review |
| description | Auto-review open PRs with severity-tagged findings, inline comments, and a one-line verdict |
| var | |
| tags | ["dev"] |
${var} — Repo scope plus optional operator policy. If
${var}is multiline, treat the first non-empty line as the repo selector (owner/repoorowner/repo#N) and treat the remaining lines as additional review policy that overrides the default verdict wording.
Read memory/MEMORY.md and memory/watched-repos.md.
Read the last 2 days of memory/logs/ to pull the headRefOid of any PR reviewed recently — used for dedup.
If present, read these optional review-context files before reviewing:
memory/topics/pr-review-rules.md — fleet-wide review rules and standardsmemory/topics/pr-review-rules/<owner>__<repo>.md — repo-specific review rules, architecture notes, and merge gates${var} is empty, review every repo in memory/watched-repos.md.${var} is a single line, use it as the repo selector.${var} is multiline:
APPROVE, REQUEST_CHANGES, and BLOCK, use those exact labels in the review body.owner/repo#N, review only that PR number in that repo.If memory/watched-repos.md is empty or missing, log PR_REVIEW_NO_REPOS and end.
Noise is the documented failure mode of automated PR review. Every finding emitted must be severity-tagged, line-specific, and justified with a one-sentence "why it matters". If there is nothing worth saying, say so in one line and move on.
gh pr list -R owner/repo --state open --limit 20 \
--json number,title,author,isDraft,labels,headRefOid,updatedAt
Skip a PR if any of the following hold (record the skip reason for the run summary):
isDraft: true^(WIP|\[WIP\]|Draft:) (case-insensitive)no-review, do-not-merge, wip, or blocked[bot] (dependabot, renovate, etc.) or equals aeonframeworkheadRefOid already appears in the last 2 days of memory/logs/ against the same PR (already reviewed at this commit)coderabbitai, copilot-pull-request-reviewer, claude) posted a review in the last 30 min — skip to avoid piling on. Check via:
gh api repos/owner/repo/pulls/NUMBER/reviews --jq '.[] | {user: .user.login, submitted_at}'
Fetch context:
gh pr view NUMBER -R owner/repo \
--json title,body,headRefOid,baseRefName,files,additions,deletions,statusCheckRollup
If the body contains Fixes #N or Closes #N, fetch the linked issue for context:
gh issue view N -R owner/repo --json title,body,labels
Also inspect the PR checks before deciding the verdict:
statusCheckRollup.typecheck, pyright, mypy, tsc, ruff, eslint, pytest, unit, integration, build, check, quality, smoke, and validate as high-signal quality checks.Expand context beyond the diff:
Fetch the diff:
gh pr diff NUMBER -R owner/repo
additions + deletions > 3000, review only the top-5 largest-delta files from the files array (not the full diff).gh pr diff fails, fall back to per-file patches:
gh api repos/owner/repo/pulls/NUMBER/files --jq '.[] | {path, patch}'
empty-diff.Early-exit for trivial PRs: if the diff is docs-only (.md/.rst/docs/**), lockfile-only, or test-only, skip deep review and post the 1-line ack form in step 6 only after confirming there is no failing type-check / lint / build / quality signal that still needs to be called out.
Review with severity tagging. Every finding must carry exactly one tag:
[CRITICAL] — correctness break, security hole, data loss, API break, regression[ISSUE] — likely bug, missing edge case, wrong behavior under a realistic input[NIT] — naming, style, minor cleanup (dropped by default)Rules:
path/to/file:LINE and include a one-sentence "why it matters" — the consequence, not just "this is wrong".ts/tsx, py with mypy/pyright, etc.) is at least [ISSUE].[ISSUE].[ISSUE] unless the PR body clearly explains why no such check exists.[CRITICAL] when the failure implies broken main-branch behavior rather than just incomplete evidence.Determine a verdict:
approve-ready — no CRITICAL, no ISSUEblocked: <one-phrase reason> — at least one CRITICALdiscussion-needed — ISSUE findings but no CRITICALAPPROVE — risk is low and evidence is sufficientREQUEST_CHANGES — important test coverage, type-check evidence, or reliability/quality safeguards are missing, but no critical break is presentBLOCK — any critical security or correctness risk is presentAPPROVE when the touched surface lacks convincing type-check / lint / test / build evidence appropriate to the change.0/5 to 5/5:
5/5 — strong evidence, low risk, merge-ready4/5 — low risk with minor follow-up3/5 — mixed evidence or meaningful open concerns2/5 — significant implementation or validation gaps0-1/5 — serious correctness/security riskPost the review. Send both a consolidated summary comment and inline line-specific comments — inline for precision, summary for consumers that parse review bodies.
For each line-specific finding:
gh api repos/owner/repo/pulls/NUMBER/comments \
-f body="[SEVERITY] finding text — why it matters" \
-f path="path/to/file" \
-f commit_id="$HEAD_SHA" \
-F line=LINE_NUMBER \
-f side="RIGHT"
Then the consolidated summary as a review — include the verdict and a bulleted recap of every inline finding (severity + file:line + one-sentence rationale), so downstream body-parsers don't miss them:
gh pr review NUMBER -R owner/repo --comment --body "**Verdict**: <verdict>
Confidence: <N/5> <one-line rationale if blocked or discussion-needed; omit if approve-ready>
Evidence:
Findings (mirrored as inline comments):
If there are no CRITICAL/ISSUE findings, skip inline comments and post a compact review that still includes confidence and evidence: `**Verdict**: approve-ready — no blockers. **Confidence**: 5/5.`
If operator policy defines custom labels, use that label in the single-line review too, for example `**Verdict**: APPROVE — no blockers.`
For trivial-PR early-exits (step 3), post a single-line review matching the category: `Docs-only change — no blockers.` / `Dependency-bump — no review needed.` / `Test-only change — no production code touched.`
**Fallback**: if inline-comment creation fails (missing permissions, commit_id mismatch), consolidate all findings into the review body, preserving the severity tags and `file:line` refs. Do not silently drop findings.
Send one combined message per run via ./notify:
*PR Review — ${today}*
Reviewed N, skipped K (drafts: x, bots: y, dup-SHA: z, bot-reviewed-recently: w).
- owner/repo#123: [verdict] — N critical, M issues
If every PR was skipped, do not notify — just log.
Log to memory/logs/${today}.md:
### pr-review
- owner/repo#123 (SHA abc1234): [verdict] — N critical, M issues
- Skipped: owner/repo#124 (draft), owner/repo#125 (bot-reviewed-recently)
If no open PRs across all repos, log PR_REVIEW_OK and end.
gh CLI handles GitHub auth internally — use it over raw curl in this sandbox. If gh fails at the repo level, log the error and continue to the next repo. As a last-resort fallback, use WebFetch on the raw PR URL to read the diff.