watch-pr
Skill455 starsChanged 32 days agoMITView on GitHub
Watch a pushed PR's checks with the Monitor tool, and act on the verdict. Use after opening or pushing to a PR.
10 other projects use a version of this.
Adopted by
Most recently taken up by
- spencerldixon/skillstheir own version, first seen Nov 8, 2026
- fitlab-ai/agent-infratheir own version, first seen Oct 27, 2026
- tbhb/vale-ai-tellstheir own version, first seen Oct 11, 2026
- s3s-project/s3stheir own version, first seen Oct 8, 2026
- ayutaz/piper-plustheir own version, first seen Oct 8, 2026
- meta-pytorch/OpenEnvtheir own version, first seen Oct 8, 2026
Used with
Projects with it also use commit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 3 projects that use this
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- meta-pytorch/OpenEnv★ 2.8ksame name
- huggingface/OpenEnv★ 2.8ksame name
- s3s-project/s3s★ 315same name
- ayutaz/piper-plus★ 240same name
- tbhb/vale-ai-tells★ 118same name
- fitlab-ai/agent-infra★ 87same name
- samsantosb/ship-it★ 37same name
- sherifabdlnaby/skills★ 9same name
- spencerldixon/skills★ 4same name
- rrjoson/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-stringsSkill
- device-screenshotsSkill
- investigating-bug-reportsSkill
- watch-gradle-testsSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Path filters: Every workflow here is filtered (app/, scripts/, gradle/, pyrightconfig.json, .flake8), so a PR touching only docs, …
- Very specific: line 45
A base that is not
main: Every workflow is pull_request: branches: [ "main" ], so a
“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Watching a PR through to a verdict
A pushed PR is not finished work. It is work awaiting a verdict that gh can read — so read it,
and say what happened. Offer this every time a PR is pushed, unless told otherwise.
Arm a Monitor. Do not poll in a loop, and do not go idle waiting. The notification arrives
on its own; keep working on the next thing in the meantime.
The trap this skill exists for
A monitor that emits nothing looks exactly like a monitor watching something that has not happened yet. Silence is not success. One was armed on PR #97 here, produced nothing for its whole lifetime, and exited 0 — and the PR's status was found by hand, while the monitor was still believed to be running.
So: run the poll body once in the foreground first, and see it print. One Bash call. If it
prints nothing there, it will print nothing for the next half hour either.
# Prove it emits BEFORE arming anything.
PR=99
gh pr view "$PR" --json statusCheckRollup --jq \
'.statusCheckRollup[] | select(.status == "COMPLETED") | "\(.name): \(.conclusion)"'First check whether this PR gets checks at all
An empty rollup is not "too early" — it may mean nothing will ever run.
gh pr view <n> --json statusCheckRollup,baseRefName \
--jq '{base: .baseRefName, checks: (.statusCheckRollup | length)}'Two independent reasons it comes back zero, and the second one is invisible in the diff:
- Path filters. Every workflow here is filtered (
app/**,scripts/**,gradle/**,pyrightconfig.json,.flake8), so a PR touching only docs,.gitattributes,.claude/, or.github/itself produces nothing. - A base that is not
main. Every workflow ispull_request: branches: [ "main" ], so a stacked PR gets no checks whatsoever, however much application code it touches. This is the one that catches you out: the obvious test — "does the diff touch a filtered path?" — says yes, and still nothing runs. Seen on #105, which changedapp/**heavily and had a rollup of zero because it was based on the branch of #104.
Zero either way? Do not arm a monitor. Say the change is not covered by CI and why, and let
the human decide — that is more useful than a green tick would have been, because it names what
is not being verified. For a stack, the choice is theirs: merge the base so GitHub retargets
the child onto main, or retarget it now and accept the parent's commits showing in the diff.
Whichever they pick, local runs are the only evidence until then. Say what you ran, in
numbers — ./gradlew :app:testEmulatorDebugAndroidTest and the pytest suites — rather than
letting "no checks" read as "nothing to check".
Use gh pr view, not gh pr checks
gh pr checks sets its exit code from the checks themselves, so the usual
s=$(gh pr checks …) || continue swallows the real answer and loops silently. gh pr view
--json statusCheckRollup exits 0 whatever the checks say, which is what a poll loop needs.
Note the two fields differ: .status is the lifecycle (QUEUED, IN_PROGRESS, COMPLETED) and
.conclusion is the verdict (SUCCESS, FAILURE, CANCELLED, SKIPPED). A check that has not
finished has an empty conclusion, so filter on .status == "COMPLETED" and report
.conclusion.
The monitor
Emits one line per check as it lands, then one line when the run is over. Copy it as-is and
change PR:
cd 'c:\Users\shaneb\git\OpenTagViewer'
PR=99
seen=""
while true; do
now=$(gh pr view "$PR" --json statusCheckRollup --jq \
'.statusCheckRollup[] | select(.status == "COMPLETED") | "\(.name): \(.conclusion)"' 2>/dev/null | sort)
comm -13 <(printf '%s\n' "$seen") <(printf '%s\n' "$now")
seen="$now"
total=$(gh pr view "$PR" --json statusCheckRollup --jq '.statusCheckRollup | length' 2>/dev/null)
if [ "$total" = "0" ]; then
echo "PR #$PR: NO CHECKS EXIST - nothing is verifying this. See the section above."
break
fi
if [ "$(gh pr view "$PR" --json statusCheckRollup --jq \
'[.statusCheckRollup[].status] | length > 0 and all(. == "COMPLETED")' 2>/dev/null)" = "true" ]; then
echo "PR #$PR: all $total checks finished"
break
fi
sleep 30
doneThe zero case is checked separately, and that is not belt-and-braces. [] | all(...) is
true in jq, so without it an empty rollup exits immediately announcing "all checks finished" —
a monitor reporting success over a PR that ran nothing at all. That happened on #105.
timeout_ms: the emulator suite here takes several minutes and the whole run rarely exceeds 20,
so 2700000 (45 min) is comfortable. persistent: false — it ends itself.
Why it is shaped this way:
comm -13against the previous set reports each check once, as it finishes, rather than re-reporting the finished ones every 30 seconds.printf '%s\n', notecho, so an emptyseenis one empty line andcommbehaves.- It reports failures as readily as successes. A filter matching only
SUCCESSstays silent through a red build, and silence reads as "still running". 2>/dev/nullon theghcalls, but no|| continue. A transient API failure yields an empty result and the loop tries again; it must not be able to exit quietly.length > 0 andbefore theall, becauseallon an empty list istrue. Without it the loop declares victory the instant the rollup is empty — which is exactly what a freshly pushed commit looks like before GitHub has created its runs, and what a fork PR waiting on "Approve and run" looks like indefinitely. It printedall checks finishedfor a PR with zero checks, one line after a push, and that reads identically to a green build.
A fork PR can sit at action_required forever, and that is not a failure state. GitHub gates
workflow runs on PRs from forks, so gh run list shows completed / action_required and
gh pr checks says "no checks reported". Nothing is wrong and nothing will happen until a
maintainer approves:
gh run list --limit 5 --json databaseId,headSha,conclusion \
--jq '.[] | select(.conclusion=="action_required") | .databaseId'
gh api -X POST repos/<owner>/<repo>/actions/runs/<id>/approveWhen it lands
- Green — merge if that was asked for, otherwise say it is green and offer.
gh pr merge <n> --merge --delete-branch. Thengit fetch && git rebase origin/mainon anything stacked on it. Red — read the failing step and fix it.
--log-failedrefuses while a run is still going, so get the step list from the API first:gh pr checks <n> # which job, and its URL gh api repos/parawanderer/OpenTagViewer/actions/jobs/<job-id> \ --jq '.steps[] | "\(.conclusion // .status)\t\(.name)"' gh run view --job <job-id> --log-failed | tail -30 # once the run has finishedRead the failure before assuming it is flaky. On #99 a red build was not CI noise: it was the repo type-checking against PyPI's
FindMywhile the app built a fork, which was a real defect the failure exposed.- Pushed a fix? Re-arm. A green run on the previous commit says nothing about this one.
Related
AGENTS.mdongh— why an agent without it can only guess at a red build.- The memory notes
propose-watching-a-pushed-pr(act on the one just pushed) andsweep-open-prs-read-only(look at all the others, and only look).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

