Borrowing it
Nothing to install: this file belongs to Ailian0206/mcp-guardian. 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/Ailian0206/mcp-guardian/main/.claude/skills/pr-review/SKILL.mdgit clone --depth 1 https://github.com/Ailian0206/mcp-guardianWrote 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/ailian0206/mcp-guardian/pr-review)<a href="https://agentmods.dev/skills/ailian0206/mcp-guardian/pr-review"><img src="https://agentmods.dev/badge/skills/ailian0206/mcp-guardian/pr-review/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/ailian0206/mcp-guardian/pr-review"><img src="https://agentmods.dev/badge/skills/ailian0206/mcp-guardian/pr-review.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.00046 | $0.00901 |
| Opus 5 | $0.00023 | $0.00451 |
| Sonnet 5 | $0.00009 | $0.00180 |
| Haiku 4.5 | $0.00005 | $0.00090 |
Grade A, and why
pr-review 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 11d 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.
What it actually says
PR 独立只读审核(MCP Guardian)
替代 Cursor Bugbot。只发现和报告问题;修复由开发 agent 完成。
成本红线(最高优先级)
- 每个 PR 只审一次。评论里已有任意
CLAUDE_REVIEWED_SHA,或已有claude-reviewed/claude-changes-requested→ 立即退出,不发新评论、不改标签、不读 diff。 - 禁止因 head 前进、修复 push、pr-gate 重跑而复审。
- 禁止并行启动第二个
/pr-review(同一 PR)。 - 禁止扫描「所有缺 marker 的 PR」并批量审核;一次调用只处理用户指定的那一个开放 PR(普通模式若有多个开放 PR,只审编号最小的一个,且若它已审过则退出)。
- 优先
gh pr diff;高风险文件按需用 Contents API,禁止无目的整仓拉取。
调用模式
/pr-review
/pr-review --trusted-base <PR编号>
- 普通:当前工作区;未改审核协议 skill/规则时用这个。
- 可信基线:仅当 diff 命中
.claude/skills/pr-review/**或.cursor/rules/pr-review-gate.mdc时使用。
代码只读硬边界
允许:gh pr list/view/diff、gh api、Read、Grep、只读验证。
禁止:改 tracked 文件、commit/push、开/关/合 PR、checkout 目标 head、在 trusted-base 执行目标分支代码、直接修 finding。
审核状态协议
Summary 结尾:
<!-- CLAUDE_REVIEWED_SHA: <head-sha> -->
claude-reviewed:本次(也是本 PR 唯一一次)审核完成。claude-changes-requested:存在未解决 CRITICAL/HIGH。
幂等:本 PR 任意历史 marker / 上述标签已存在 → 跳过(不要求 marker 等于当前 head)。
只有本审核器可维护这两个标签。
审核协议路径(才强制 trusted-base)
.claude/skills/pr-review/**.cursor/rules/pr-review-gate.mdc
普通模式若命中上述路径:零 GitHub 写入退出,提示开发 agent 用 trusted-base。
注意:改 AGENT.md / playbook 文案 不再强制 trusted-base(避免无意义烧额度)。
普通模式
gh pr list --state open ...;取编号最小的一个开放 PR。- 若已审过(marker 或标签)→ 退出。
- 命中协议路径 → 退出并要求 trusted-base。
- 否则进入共同审核过程(一次)。
可信基线模式
只审参数指定的一个 PR。校验 OPEN、baseRefOid、detached HEAD=baseRefOid。
已审过 → 立即退出。
读目标:只用 gh pr diff + 必要的 Contents API。
共同审核过程
- 读完整
gh pr diff。 - 策略/Gateway/审批等高风险点按需读全文。
- 等级:CRITICAL/HIGH 阻塞;MEDIUM/LOW 记录。
- 必查:密钥、路径穿越、fail-open、审批绕过、审计、ownership、吞错、无界查询、缺测。
- inline + 一条 summary + marker;设标签;立即退出,不轮询、不复审。
项目约束
- Draft 也审(仍只一次)。
- 忽略无关
.worktrees/。
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.
- 11d ago First seen · 82 lines · 46 tokens per session scan A abf3c6617c82
pr-review is a skill published in the GitHub repository Ailian0206/mcp-guardian (1 stars, last pushed 1mo ago), licensed MIT. It adds 46 tokens to every session and 901 once invoked, about $0.0002 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-31.
Other skills, from other repositories
autoreview
Pre-commit/ship code review: Codex default; optional Claude or Pi.
omh-code-review
This is a Hermes-native code-review workflow skill.
revdiff-plan
Review the last Codex assistant message (plan, analysis, or proposal) with inline annotations in a TUI overlay. Extracts the most recent response from Codex rollout files and opens it in revdiff for review and annotation. Activates on "revdiff-plan", "review plan with revdiff", "annotate plan", "review last response"…
code-reviewer
Code review specialist focused on patterns, bugs, security, and performance.
full-repo-review
Comprehensive four-wave review of all repo source files, producing a prioritized issue backlog.
agent-teams-simplify-and-harden
Implementation + audit loop using parallel agent teams with structured simplify, harden, and document passes. Spawns implementation agents to do the work, then audit agents to find complexity, security gaps, and spec deviations, then loops until code compiles cleanly, all tests pass, and auditors find zero issues or…