Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Ailian0206/mcp-guardiannpx agentmods add rules/ailian0206/mcp-guardian/pr-review-gateWrote 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/rules/ailian0206/mcp-guardian/pr-review-gate)<a href="https://agentmods.dev/rules/ailian0206/mcp-guardian/pr-review-gate"><img src="https://agentmods.dev/badge/rules/ailian0206/mcp-guardian/pr-review-gate/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/rules/ailian0206/mcp-guardian/pr-review-gate"><img src="https://agentmods.dev/badge/rules/ailian0206/mcp-guardian/pr-review-gate.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.00400 | $0.00400 |
| Opus 5 | $0.00200 | $0.00200 |
| Sonnet 5 | $0.00080 | $0.00080 |
| Haiku 4.5 | $0.00040 | $0.00040 |
Grade A, and why
pr-review-gate 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 9d 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 审核与合并门禁(成本优先)
开 PR 红线
- 同时最多 1 个开放 PR。
- 只有里程碑才开 PR;禁止没事提 PR、按天/小修/纯文档开 PR。
- 开 PR 前必须:
bash scripts/assert-can-open-pr.sh(里程碑确认后用ALLOW_OPEN_PR=1)。 - 日常在功能分支 commit/push,默认不开 PR。
- 只负责本仓库
mcp-guardian;禁止去其他仓库开 PR / 跑审核。
Claude:每个 PR 生涯只审一次
- 首次就绪后只触发一次:
bash scripts/pr-gate.sh <PR>(内部调用/pr-review)。 - 已有
CLAUDE_REVIEWED_SHA/claude-reviewed/claude-changes-requested→ 禁止再启动 Claude。 - 有问题:按评论修 →
SKIP_PR_REVIEW=1 bash scripts/pr-gate.sh <PR>→ merge。 - 没问题:同一次 gate 门禁绿后 merge。
- 禁止并发跑多个 pr-gate /
/pr-review(脚本有 flock)。 - 不得手改审核标签、冒充审核评论;不用 Bugbot。
合并
bash scripts/pr-gate.sh <PR> # 未审过:唯一一次 Claude + 合
SKIP_PR_REVIEW=1 bash scripts/pr-gate.sh <PR> # 已按评论修好:绝不复审
merge commit only。
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.
- 9d ago First seen · 33 lines · 400 tokens per session scan A 9256293b7669
pr-review-gate is a cursor rule published in the GitHub repository Ailian0206/mcp-guardian (1 stars, last pushed 1mo ago), licensed MIT. It adds 400 tokens to every session, about $0.0020 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 cursor rules, from other repositories
commit.detail
A detailed checklist for making Git commits safely. It covers reviews, automated checks, documentation alignment, staged-file handling, and release-related safeguards.
gitlab-mr-review
Review GitLab merge requests via glab when user says "mr this" or "pr this".
check
Analyze staged git changes with archguardian before committing.
ponytail
Ponytail, lazy senior dev mode. Always pick the simplest solution that works.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.