Monitor a pull request until CI status or Copilot review is available. Use when: monitor PR, watch PR, land PR, wait for CI, wait for checks, wait for review, check PR status. Starts two async terminal tasks (CI + Copilot review) and reacts when either completes.
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "monitor-pr" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/vscode-team-kit/main/monitor-pr/skills/monitor-pr/SKILL.md 2. 保存为 ~/.claude/skills/monitor-pr/SKILL.md 3. 装好后重载技能,告诉我可以用了
Monitor a pull request by running two scripts in async terminals: one that waits for a Copilot code review, and one that waits for CI to finish. When either terminal exits, the host's async-terminal runtime notifies the agent on its next turn, so the agent can react without polling.
Host requirement: this skill assumes the agent host can run long-lived background terminals and notify the agent when they exit — for example, VS Code Chat's
run_in_terminalwithmode=asyncplusget_terminal_output/kill_terminal. Hosts without that capability will need to adapt the procedure (e.g. foreground the scripts and block on them).
gh CLI installed and authenticated.NO_PENDING_COPILOT_REVIEW — this skill only waits for Copilot reviews, it does not request them.Extract the PR number from the conversation context. Determine the repo with:
gh repo view --json nameWithOwner -q .nameWithOwner
Run BOTH of these scripts in separate async terminals (mode=async on run_in_terminal, or your host's equivalent). Use a small timeout, such as timeout=1000, so the tool returns quickly after the monitor process starts. Do NOT await them and do NOT poll or sleep; the runtime will notify you on a later turn when each script exits.
The scripts live inside this skill directory, at <skill-dir>/scripts/wait-for-ci.mts and <skill-dir>/scripts/wait-for-copilot-review.mts. Always invoke them by absolute path — derive the skill directory from the absolute path of this SKILL.md, not from the current working directory. The agent's CWD is usually the user's project repo, not this plugin.
Terminal A — wait for Copilot code review:
node <skill-dir>/scripts/wait-for-copilot-review.mts <pr-number> <owner/repo>
Terminal B — wait for CI:
node <skill-dir>/scripts/wait-for-ci.mts <pr-number> <owner/repo>
After launching both, record their terminal IDs and stop. Return control to the user with a brief status message, for example: "Monitoring PR #N — waiting for CI and Copilot review."
When you are notified that one of these terminals has exited, read its output with get_terminal_output and act on the RESULT: line. The terminal output already contains everything you need — read it carefully before taking any action.
| Script | Result | Exit | Action |
|---|---|---|---|
wait-for-copilot-review.mts | UNRESOLVED_COPILOT_REVIEW_COMMENTS | 0 | Unresolved Copilot comments existed before monitoring started. The output lists each comment (file, line, body). Follow step 4 below. |
wait-for-copilot-review.mts | NO_PENDING_COPILOT_REVIEW | 0 | No Copilot review is currently in flight and there are no unresolved Copilot comments. Report the status and move on — do not try to request a review yourself. |
wait-for-copilot-review.mts | NEW_COPILOT_REVIEW | 0 | A new Copilot review arrived after monitoring started. The output lists each new inline comment (file, line, body). Follow step 4 below. |
wait-for-copilot-review.mts | COPILOT_REVIEW_ERROR | 2 | Report the script or gh error output to the user. |
wait-for-ci.mts | CI_PASSED | 0 | CI is green. Report the status and keep waiting for the review terminal if it is still running. |
wait-for-ci.mts | CI_FAILED | 1 | Follow step 5 below. |
…
帮助你完整搭建 Component Explorer,配置 CLI、MCP、VS Code 任务与调试环境。
为 GitHub 议题或拉取请求快速添加表情反应,提升协作反馈效率。
帮助 AI 代理读写记忆与规则,并按环境自动选择可用存储方案
汇集多模型独立方案与辩论,辅助实现路径和架构决策
为方案、设计与实现提供高质量第二意见,及早发现逻辑与缺陷问题
帮助用户通过 gh 命令获取并查看 GitHub 通知列表,快速处理仓库动态。