Token导航 LogoToken导航

Agent Skill · 研究检索

pr-guardian(公关卫士)

pr-guardian 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

pr-guardian 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 66,285。

总安装 267周安装 11GitHub Stars 4下载 87核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:pr-guardian(公关卫士)
来源仓库:https://github.com/s-hiraoku/synapse-a2a
仓库路径:skills/pr-guardian
安装命令:
npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

pr-guardian 用于查找、检索和筛选相关信息。适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景或来源线索快速定位候选结果。通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。

安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/pr-guardian

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

pr-guardian 怎么安装?

在终端执行 npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

pr-guardian 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

pr-guardian 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

pr-guardian 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

pr-guardian 用的人多吗?

公开数据是累计安装 267 次,近一周安装 11 次,下载 87 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

pr-guardian 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
pr-guardian

公关卫士 · 本页

2674执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

PR Guardian

Watch a PR, detect problems, fix them, repeat — until everything is green.

Why this exists

After pushing a PR you typically wait for CI, check for merge conflicts, and respond to CodeRabbit review comments. Each issue requires a separate manual step. PR Guardian automates the entire feedback loop: it uses gh run watch to efficiently wait for CI completion (consuming zero session cycles while waiting), then polls the PR status, dispatches the appropriate fix skill when a problem is found, and exits only when all checks pass (or the iteration limit is reached).

Quick start

/pr-guardian                     # Default: 5 min interval, 20 max iterations
/pr-guardian --interval 3        # Poll every 3 minutes
/pr-guardian --max-iterations 10 # Give up after 10 cycles

Workflow

Step 0: Validate preconditions

Before starting the loop, verify:

  1. gh CLI is installed and authenticated
  2. Current branch has an open PR (gh pr view)
  3. Display the PR number and URL

If any check fails, report the error and stop.

Step 1: Wait for CI with gh run watch

Before polling, wait for all GitHub Actions workflow runs to complete using gh run watch. This blocks at the shell level until CI finishes, consuming zero Claude Code session cycles while waiting.

# Get the latest workflow run for the current branch
RUN_ID=$(gh run list --branch "$(git rev-parse --abbrev-ref HEAD)" \
  --limit 1 --json databaseId --jq '.[0].databaseId' 2>/dev/null || echo "")

if [[ -n "$RUN_ID" ]]; then
  # Block until this run completes (exit code reflects pass/fail)
  gh run watch "$RUN_ID" --exit-status 2>/dev/null || true
fi

Fallback: If gh run watch is unavailable or fails (e.g., no workflow runs found yet on the first cycle after push), skip straight to Step 2 and let the polling script detect checks_running > 0.

Step 2: Poll PR status

Run the bundled status script:

bash <skill-path>/scripts/poll_pr_status.sh

This returns a JSON object with these fields:

FieldTypeMeaning
branchstringCurrent branch name
pr_numberintPR number
checks_totalintTotal CI checks (excludes CodeRabbit)
checks_passedintCI checks that passed
checks_failedintCI checks that failed
checks_runningintCI checks still in progress
has_conflictboolMerge conflicts detected
coderabbit_checkstringCodeRabbit check status: none/pending/pass/fail
coderabbit_commentsintNumber of CodeRabbit inline comments
all_greenboolTrue when everything passes (including CodeRabbit)

Important: all_green is only true when ALL of these hold:

  • No merge conflicts
  • No CI failures
  • No CI checks still running
  • CodeRabbit check is NOT pending AND NOT none (review must have completed at least once)
  • No unresolved CodeRabbit inline comments (comments marked ✅ Addressed are excluded)
  • At least one CI check exists

Step 3: Evaluate and report

Print a concise status line each cycle:

[PR Guardian] Cycle 3/20 — PR #42
  CI: 4 passed, 1 failed, 0 running
  Conflicts: none
  CodeRabbit: review completed, 2 inline comments
  → Action: fixing CodeRabbit comments

Step 4: Dispatch fixes (priority order)

When issues are found, fix them one category at a time in this order. Only fix one category per cycle — after fixing, go back to Step 1 to re-poll, because a fix may have changed the state (e.g., a push triggers new CI runs and gh run watch will wait for them).

Priority 1 — Merge conflicts

Merge conflicts block everything else. When has_conflict is true:

  1. Invoke /fix-conflict
  2. After resolution, the push triggers new CI runs — go back to Step 1

Priority 2 — CI failures

When checks_failed > 0 and checks_running == 0 (Step 1's gh run watch already waited, so running should normally be 0):

  1. Invoke /fix-ci
  2. After the fix commit is pushed, go back to Step 1

Priority 3 — CodeRabbit review comments

When coderabbit_check == "pass" and coderabbit_comments > 0 and CI is passing:

  1. Invoke /fix-review
  2. /fix-review will verify each finding against current code before fixing
  3. After the fix commit is pushed, go back to Step 1

IMPORTANT: Only dispatch /fix-review when coderabbit_check is "pass" (review completed). If it is "pending", wait — the review is still in progress and comments may not be final yet.

Step 5: Handle pending states

The correct action is to wait (not fix) when:

  • checks_running > 0: CI is still running — this should be rare since Step 1 already waited via gh run watch, but can happen if new runs were triggered between watch and poll
  • coderabbit_check == "pending": CodeRabbit review is in progress — wait with a short sleep (60-120 seconds) and re-run Step 2 only. Do NOT go back to Step 1 (gh run watch) — CodeRabbit is not a GitHub Actions run. Retry up to 5 times before moving to the next full cycle
  • coderabbit_check == "none": CodeRabbit hasn't started yet (common right after a push) — same short-sleep retry as pending
  • checks_total == 0 and it's the first cycle: checks haven't started yet — go back to Step 1 where gh run watch will block until they appear

Do not invoke any fix skill while checks are still running or reviews are pending — you would be fixing based on incomplete information.

Step 6: Check exit conditions

After each cycle, check:

  1. All green (all_green == true): Print success message and exit
  2. Max iterations reached: Print summary of remaining issues and exit
  3. Same failure repeated 3 times: The automatic fix is not working. Print what failed and suggest manual intervention, then exit

If none of these conditions are met, go back to Step 1. There is no fixed sleep between cycles — gh run watch in Step 1 provides the natural wait for CI to complete after a fix push.

Configuration

FlagDefaultDescription
--interval2Minutes between CodeRabbit pending retries
--max-iterations20Max cycles before giving up

Exit messages

Success:

[PR Guardian] All checks green! PR #42 is ready.
  CI: 6/6 passed | Conflicts: none | CodeRabbit: pass, 0 comments
  Completed in 3 cycles over 15 minutes.

Max iterations:

[PR Guardian] Reached 20 cycles without all-green.
  Remaining issues:
    - CI: tests failing (pytest assertion error in test_auth.py)
    - CodeRabbit: 2 unresolved inline comments
  Manual intervention needed.

Repeated failure:

[PR Guardian] Same CI failure persisted after 3 fix attempts.
  Failing check: tests
  Last error: AssertionError in test_auth.py:42
  Automatic repair is not resolving this — please fix manually.

Important notes

  • This skill composes /fix-conflict, /fix-ci, and /fix-review. It does not reimplement their logic — it orchestrates them.
  • Only one fix category is attempted per cycle to avoid cascading changes that confuse the state.
  • gh run watch replaces the old fixed-interval sleep loop for CI waiting. This eliminates wasted polling cycles and reduces session consumption from 5-10 cycles to 1-3 for a typical PR.
  • The skill respects both CI timing AND CodeRabbit timing: gh run watch handles CI, and a short-sleep retry loop (60-120s, max 5 retries) handles CodeRabbit pending states.
  • Synapse-independent: This skill depends only on gh CLI and standard git commands. It works outside Synapse environments.
  • If gh run watch is unavailable (no runs found, older gh version), the skill falls back to the polling script detecting checks_running > 0 and retrying on the next cycle.
  • CodeRabbit check status (pending/pass/fail) is tracked separately from inline comment count. A pending check means the review is still running — do NOT dispatch /fix-review yet.
  • Each fix skill handles its own commit and push. PR Guardian only handles the loop and dispatch.
  • /fix-review verifies each CodeRabbit finding against the current code before applying fixes — it does not blindly apply suggestions.

平台分布

Codex

37%
按下载量换算32

Claude

29.65%
按下载量换算26

Cursor

20.02%
按下载量换算17

Gemini CLI

8.43%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/s-hiraoku/synapse-a2a --skill pr-guardian 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills