Files
improvise/.claude/skills/pr-watch/SKILL.md
T
Edward Langley 7fd57c06b3 docs: say what to do; attribute what agents post
Two user rulings.

Documentation should not spend itself on history -- that is bloat. Prose docs
now lead with the rule and keep only the line that stops it looking arbitrary;
the worked examples and the how-we-found-it move into doctrine/2 text, which is
what that predicate is for and where a reader goes deliberately rather than
while looking for a command. Trimmed: both skills, context/code/kb-tool.md, and
the kb paragraph in AGENTS.md.

Anything an agent posts to GitHub goes out under the owner's account, so every
comment, review and issue body now opens with a line naming the model and that
an agent wrote it. A PR body's generated-with footer already did this; comments
carried nothing, and an unattributed one reads as his own words to every reader
-- including a reviewer deciding how much weight to give it. The reply on PR #68
has been amended in place.

improvise-xfsb files the structural fix: a GitHub App or machine user so agents
post under their own identity. An attribution line is a convention an agent can
forget; a separate identity cannot be.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
2026-09-20 16:04:33 -07:00

1.6 KiB

name, description
name description
pr-watch Wait for a GitHub PR's checks to finish before merging or reporting on it. Use whenever you need to know whether a PR is green. Do not hand-roll a polling loop over gh pr view.

Waiting on a PR

scripts/pr-watch <pr-number> [--expect <sha>] [--timeout <sec>] [--interval <sec>]
exit 0  every check COMPLETED and none failed
exit 1  a check failed, or the PR is CONFLICTING
exit 2  the head moved during the wait, or is not --expect
exit 3  timed out with checks still running
exit 4  usage or environment error

Pass --expect <sha> whenever you know which commit you are asking about. It is the difference between "this PR is green" and "the thing I pushed is green", and a PR here was once merged at a head that predated its own fix.

Do not write the loop yourself

Three signals look like "finished" and are not:

  • "nothing pending" — also true when no check has registered yet. Require a non-zero total as well.
  • conclusion == null — conclusion is a string, empty while running. Test status == "COMPLETED".
  • a verdict from before the head moved — re-check the head, or --expect.

gh is shell-aliased to a different tool in these shells; pr-watch locates a real one itself. Do not reintroduce a bare gh call in a script here.

Before deciding a PR is stuck

Check suites can take several minutes to appear at all, and a Copilot review takes about six. Compare date -u against the GitHub timeline rather than a felt interval, and do not close and reopen a PR to unstick it.

scripts/pr-watch-test.sh drives every case from fixtures.