Borrowing it
Nothing to install: this file belongs to fitlab-ai/agent-infra. 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/fitlab-ai/agent-infra/main/.agents/skills/watch-pr/SKILL.mdgit clone --depth 1 https://github.com/fitlab-ai/agent-infraWrote 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/fitlab-ai/agent-infra/watch-pr)<a href="https://agentmods.dev/skills/fitlab-ai/agent-infra/watch-pr"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/watch-pr/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/fitlab-ai/agent-infra/watch-pr"><img src="https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/watch-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00043 | $0.02621 |
| Opus 5 | $0.00022 | $0.01311 |
| Sonnet 5 | $0.00009 | $0.00524 |
| Haiku 4.5 | $0.00004 | $0.00262 |
Grade A, and why
watch-pr 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 5d 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 — 154 lines — stays where its author put it; the contents beside it link to each section on GitHub.
监控 Pull Request
在 create-pr 之后持续监控同一 PR head 的全部 checks 与 mergeability。只有全部 checks 通过且平台明确可合入才进入成功出口;check 失败走既有修复,合并冲突走受限 rebase 自愈,未知或无法安全闭环时 fail-closed。
行为边界 / 关键规则
- 仅监控 + 自愈当前 PR 的全部 checks 与文本合并冲突;不扩展到审批或其他仓库规则。
- 自愈通过 Git workflow intent 发布修复,但发布前必须本地跑通相关测试;修复上限与代码层分类授权不变。
- 求助出口是「产出后停止」语义:停止本轮、输出阻塞说明、等待用户主动触发,不中途提问。
- 裸数字 /
NN/TASK-id入参一律按任务短号解析(见.agents/rules/task-short-id.md);PR 号只走--pr <number>/ PR URL / 省略(当前分支),不复用裸数字语法。 - 执行本技能(任务锚定路径)后,必须更新 task.md。
版本戳规则:创建或更新 task.md frontmatter 时,先读取 .agents/rules/version-stamp.md,并写入或刷新 agent_infra_version。
任务上下文解析
入口允许省略 task ref,也接受
--task <ref>/-t <ref>。先从完整参数中分离 task scope 并原样保留其他业务操作数,再调用agent-infra-internal task-context resolve {task-scope};{task-scope}为空或 task flag 之一。只读取结构化结果的taskId,后续把{task-id}绑定为该完整TASK-YYYYMMDD-HHMMSS。解析失败时透传非零退出码,不自行扫描任务。
步骤开始:写入 started 标记
确认前置条件后、本轮第一个产出动作之前,向 task.md ## 活动日志 追加一条 started 标记(与本轮 done 条目同基名 + [started] 后缀,note 用 started):
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N}) [started]** by {agent} — started
ai task log 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 .agents/rules/task-management.md 的「Activity Log started / done 双标记约定」。
执行步骤
1. 解析入参
按以下确定性分支解析出目标 PR 号 {pr#} 与可选 {task-id}:
- 场景 A(省略入参):从当前分支反查 active task;定位后读取其 verified
pr_delivery_fact.identity.number。 - 场景 B(省略 task ref 或
--task/-t,任务锚定主路径):按「任务上下文解析」取得完整{task-id}。读.agents/workspace/active/{task-id}/task.md取 verifiedpr_delivery_fact.identity.number作为{pr#};fact 未绑定时按「错误处理」提示先create-pr,停止。 - 场景 C(
--pr <number>或 PR URL):直接取该 PR 号为{pr#};随后按「反查任务」确定{task-id}。 - 反查任务(场景 A / C):通过任务上下文/任务查询取得与
{pr#}唯一绑定的 active task。未命中时停止并提示先绑定 PR;typed checks intent 不建立第二套无任务状态机。
2. 监控 PR readiness
执行此步骤前,先读取 reference/monitor-and-heal.md 与 .agents/rules/pr-checks-commands.md。
进入本轮时初始化 repairCommits=[] 与 rebaseAttempts=0。每轮 readiness 前先调用 platform-pr summary-context,按共享 PR change-report contract 以当前权威 PR head 重建任务绑定的 pr-change-report.json,再用含唯一 <!-- canonical-pr-change-report --> 占位符的正文调用 summary-sync --change-report-file ... --result no_op --strict 刷新同一条摘要。--strict 将报告或摘要刷新失败保留为 failed/blocked,不得把 warning 当作成功;刷新失败时不得进入 ready/complete 出口,按步骤 4 记录阻塞。刷新完成后调用 agent-infra-internal platform-checks watch {task-id} --interval-seconds 30 --deadline-seconds 1800,只按结构化 readiness.state 分流:ready 进入步骤 7,conflicting 或 checks-failed 进入步骤 3,pending|timed-out|cancelled 进入步骤 4。
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago Changed cd0ed2181398
- 7d ago Changed 5ef4a337e130
- 11d ago First seen · 154 lines · 43 tokens per session scan A 70d1a9cf2fe7
watch-pr is a skill published in the GitHub repository fitlab-ai/agent-infra (83 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 2,621 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-30.
Other skills, from other repositories
gwm
Manage git worktrees across any repository with the gwm Rust binary (CLI + ratatui TUI). Use when the user asks to create / list / remove / bootstrap / switch / link worktrees, run a command across worktrees (gwm exec) or reclaim build artifacts (gwm clean), materialise a PR into a worktree (gwm review), drive a…
agentplane
Use when a repository uses AgentPlane or the user wants a governed git-native workflow for planning, task execution, verification, and closure.
dos-verify-done-claims
Before accepting an agent's 'done / shipped / fixed' claim, verify it against ground truth (git ancestry + the commit's own diff) using the DOS kernel's dos verify and dos commit-audit — never the agent's own narration.
aigon-next
Suggest the most likely next workflow action based on current context.
take-task
A workflow for claiming a tracker task and preparing the development branch for it. It verifies the task, marks it as in progress, checks for uncommitted changes, and handles branch setup according to the task state.
release
Release Aigon — push to origin, cut a version+tag, or publish to npm. Wraps scripts/ship.js with CHANGELOG draft + dry-run preview. Triggers when the user types "/release", "/push", "/ship", or says "ship a release", "publish a beta", "cut a version", "push to origin", "release X to npm".