agent-infra: Skill for Claude Code

.agents/skills/watch-pr/SKILL.md

watch-pr is a skill for Claude Code, Codex from fitlab-ai/agent-infra. It costs 43 tokens per session (3,228 once invoked), scanned A, original, MIT.

A process for watching a pull request’s automated checks and whether it can be merged. It may apply limited fixes for failed checks or text merge conflicts, then stops safely when it cannot resolve the problem.

In plain words
What is it for?
Use it after creating a pull request to monitor all checks, repair eligible failures, handle restricted rebases for merge conflicts, update the related task log, and report blockers.
Why use it?
It reduces the need to repeatedly check whether a proposed code change is ready to merge. It also prevents uncertain or unsafe problems from being treated as resolved.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is fitlab-ai/agent-infra's own configuration. It tells Claude Code and Codex how to work on agent-infra itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent-infra configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/.agents/skills/watch-pr/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/fitlab-ai/agent-infra

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for watch-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/fitlab-ai/agent-infra/watch-pr/github.svg)](https://agentmods.dev/skills/fitlab-ai/agent-infra/watch-pr)
Your own site
<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.

agentmods 80×15 button for watch-pr

Your own site · 80×15
<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>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,228 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.03228
Opus 5.5 $0.00017 $0.01291
Sonnet 5.5 $0.00009 $0.00646
Haiku 4.5 $0.00004 $0.00323

Measured 3d ago against content hash 0fd349396d09, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 3d 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.

.agents/skills/watch-pr/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

监控拉取请求

在 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}。读 <task-workspace>/active/{task-id}/task.md 取 verified pr_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。每次覆盖当前报告前,先用 core 导出的 reader 验证并暂存现有报告的身份与 head;文件不存在或验证失败即记为无上一 head:

Read the full file on GitHub · 171 lines

Files

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.

Changes

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.

  1. 3d ago Changed 0fd349396d09
  2. 6d ago Changed d8c102faaff6
  3. 12d ago Changed · +17 lines 9005f574be29
  4. 24d ago Changed 698d78b0cf81
  5. 1mo ago Changed 83a95e5f182a
  6. 1mo ago Changed cd0ed2181398
  7. 1mo ago Changed 5ef4a337e130
  8. 1mo ago First seen · 154 lines · 43 tokens per session scan A 70d1a9cf2fe7

Subscribe to this mod's changes

watch-pr is a skill published in the GitHub repository fitlab-ai/agent-infra (86 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 3,228 once invoked, about $0.0002 per session on Opus 5.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.

Related

Other skills, from other repositories

ccb-github

Maintain this CCB project's GitHub-facing release and npm publication surface. Use when preparing, publishing, auditing, or fixing CCB releases; updating README.md, README/zh.md, localized README files, CHANGELOG.md, VERSION, package.json, GitHub release notes/assets, repository description/topics, npm registry state…

SeemSeam/claude_codex_bridge · 76 tokens

repo-hygiene

Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.

QwenLM/qwen-code · 48 tokens

gh-skill

Manage agent skills with gh skill. Use this skill to discover, preview, install, update, and publish Agent Skills so an agent can self-manage the skills available in its environment.

cli/cli · 41 tokens

cw-gates

Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.

Hmbown/Codewhale · 48 tokens

atmos-hooks

Atmos hooks: lifecycle events, hook kinds, command/store/git/security hooks, step/steps hooks, when: conditions, scoping and overrides, toolchain integration, --skip-hooks, and Atmos Pro/local output.

cloudposse/atmos · 46 tokens

conventional-commit

Conventional Commit - Generate Conventional Commits 1.0.0 compliant messages. MANDATORY for all git commits. Invoke when user says 'commit', 'commit this', or asks to commit code.

termio-sh/termio · 47 tokens