pr-comments
Skill11 starsChanged 7 days agoMITView on GitHub
Single-lane interval watcher that drives PR review threads to resolved, then arms auto-merge — the review-thread-closer lane of a multi-agent fleet. Watches every open agent PR for AI-review-bot and human review comments, dispatches a fix sub-agent or posts a reasoned counter, resolves the thread only after the fix is pushed, and owns the INITIAL arm-after-bot-review (deliberately not done at dispatch, to avoid racing the bot). Loops on an interval ("/loop <interval> start"). Use when running a comments/review lane, when reviewed-but-unmerged PRs pile up because unresolved threads block auto-merge, when you must decide whether a PR is safe to arm yet, or to handle the race where review comments land after a PR is already queued.
19 other projects use a version of this.
Adopted by
Most recently taken up by
- SamuelBostic29/claude-skillstheir own version, first seen Nov 16, 2026
- domengabrovsek/agent-configtheir own version, first seen Nov 8, 2026
- domengabrovsek/claudetheir own version, first seen Nov 8, 2026
- ieuanign/skillstheir own version, first seen Nov 3, 2026
- flavio-portela/skillstheir own version, first seen Nov 1, 2026
- K-log/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use worktree, jira and 6 more.
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.
MicrosoftSkillworktree
Create, reuse or clean up a dedicated git worktree for working on a pull request or a private branch. Use from any PR-scoped workflow that needs an isolated checkout to keep current code and build output untouched.
Also in 3 projects that use this
MicrosoftSkilljira
Jira issue workflows for search, issue updates, transitions, comments, field discovery, and interactive credential setup via the Jira REST API. Use when you need to configure Jira access, search with JQL, inspect an issue, create or update work items, move an issue between statuses, post comments, or discover required fields for issue creation.
Also in 3 projects that use this
simo97Skillwrite-a-skill
Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.
Also in 3 projects that use this
AWSSkillship
Finalize dev work on an issue branch — update docs, push, and open a PR.
Also in 4 projects that use this
DockerSkillreview-pr
Review one or more incoming Docker documentation pull requests as a maintainer. Independently validate technical claims, assess editorial fit and information architecture, choose a verdict, and draft exact inline or PR-wide feedback behind a confirmation gate. Use for requests such as "review PR 123", "is this PR correct?", "does this information belong here?", "validate this PR", or "help review backlog PRs". Do not use to maintain or fix a PR you own; use maintain-pr for that.
Also in 3 projects that use this
GoogleSkillprototype
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
Also in 3 projects that use this
- +1 more from microsoft
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 19
- ccch1mneyyy/dsh-TUI★ 7.8ksame name
- nudgebee/nudgebee★ 525same name
- vstorm-co/agenticos★ 315same name
- BrOrlandi/my-claude-skills★ 22same name
- domengabrovsek/agent-config★ 22same name
- domengabrovsek/claude★ 22same name
- hdcola/skills★ 4same name
- tomazb/agent-skills★ 4same name
- ieuanign/skills★ 2same name
- WhatIfWeDigDeeper/agent-skills★ 2same name
9 more not listed
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 repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- browser-diagnosisSkill
- cavemanSkill
- ci-flake-huntingSkill
- ci-speed-huntingSkill
- deploy-watchingSkill
- dispatching-subagentsSkill
- doc-coauthoringSkill
- docxSkill
- driving-prs-to-mergeSkill
- fast-forwarding-branchesSkill
- figmaSkill
- figma-specsSkill
- gh-issue-filingSkill
- gh-issue-labelsSkill
- gh-issue-lockingSkill
- grooming-issuesSkill
- humanizerSkill
- jira-issue-fieldsSkill
- jira-issue-filingSkill
- jira-issue-lockingSkill
- mcp-builderSkill
- orchestrating-slotsSkill
- pdfSkill
- pptxSkill
- pr-checksSkill
- pr-cleanupSkill
- skill-creatorSkill
- spelunking-specsSkill
- technical-reconSkill
- token-bleed-huntingSkill
- xlsxSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 1 is distinctive, and 3 are very specific to this project.
0
Common
Most of the 18 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 37
Run the loop on the workhorse tier.
- Very specific: line 55
One writer per branch: if the pr-checks lane is also pushing a CI fix to this same branch, do not push concurrently.
- Very specific: line 67
When both true: gh pr merge <PR#> --auto <merge-strategy> (merge queue active → omit the strategy flag, or the queue silently drops …
- Very specific: line 71
Never post <ai-mention-trigger> from any agent — it is a human-only trigger.
“Common” is measured: kept by at least 6 in 10 of the 18 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
PR Comments Watcher
One job: drive review threads to resolved, then arm auto-merge. Auto-merge will not fire while any thread is open, so this lane is what unblocks reviewed PRs. Find new bot/human review comments, fix or counter, push, resolve — and only then enable auto-merge. This lane owns the initial arm-after-review (the dispatch lane deliberately does NOT enable auto-merge, to avoid racing the review bot). Nothing else.
This skill assumes the shared PR mechanics in the driving-prs-to-merge skill (thread-resolution GraphQL, mergeStateStatus, the async-orphan trap, force-push discipline). This skill adds only the single-lane watcher loop and the arm/disarm gate on top of it.
Project bindings
Project-agnostic; the adopting project defines these in its own CLAUDE.md (the full set lives in the driving-prs-to-merge skill). Used here:
| Placeholder | Meaning |
<owner>/<repo> | GitHub repository slug |
<integration-branch> | Branch PRs target |
<bot-reviewer> | AI review bot identity (if any), sync vs async, and whether the ruleset enables required_review_thread_resolution |
<bot-ack-reaction> | The signal the bot has picked up a PR (e.g. an 👀 reaction); absence = not started yet |
<merge-strategy> | Allowed strategy flag — and whether a merge queue is enabled (omit the flag when it is; see driving-prs-to-merge) |
<ai-mention-trigger> | The human-only AI-action mention string (e.g. @claude), if any — never posted from an agent |
The watcher model
A single-lane, interval-driven loop — one concern, scanned end-to-end every tick (/loop <interval> start). This differs from the N-slot event loop in orchestrating-slots (which fills mixed slots reactively) and from the one-shot pr-rescuer (which fixes one named PR). One watcher per lane; lanes do not cross (see below).
Slots = max fix sub-agents running at once — NOT a cap on PRs scanned. Scan EVERY agent PR each tick; if more PRs need fixes than you have slots, queue the rest for the next tick — never skip a PR because slots are full. Pick a small fixed default (≈2 for this lane) and tune to the machine; a slots=N token in the start prompt overrides.
You orchestrate; you do not write fixes yourself. Delegate per MODEL-DEFAULTS.md:
- Anything that writes or edits code (applying a review fix) → a workhorse sub-agent (prefer
caveman:cavecrew-builderfor ≤2-file fixes — compressed output, most review nits qualify). Never the cheap tier for code. - Trivial read-only shell → the cheap tier (a
gh/grep/lsone-liner, a path lookup,caveman:cavecrew-investigatorlocating something). Nothing that edits. - Premium tier for a sub-agent only on explicit operator instruction or an
agent-model:/agent-effort:label — never self-escalated (see thegh-issue-labels/jira-issue-fieldsskills). Counter-replies you post yourself are normal prose, written by you.
Run the loop on the workhorse tier. Judging a thread (valid fix vs reasoned counter) and the arm/disarm gate are the high-attention steps; the one place to consider operator-gated premium escalation, never on your own.
Lane (do not cross)
You OWN: unresolved review threads (bot + human), applying or countering comment feedback, resolving threads, and enabling auto-merge once a PR is clear.
You do NOT touch: dispatching new issues (the dispatch lane — see dispatching-subagents / orchestrating-slots), CI failures / merge conflicts / merge-queue health (the pr-checks lane), merged-PR cleanup (the pr-cleanup lane), deploy/infra health (a deploy lane, if your fleet runs one). Notice one → ignore it.
One exception, by ownership: re-arming auto-merge after a merge-queue ejection belongs to the pr-checks lane (it owns queue health). If an already-reviewed PR loses auto-merge because a group-drop ejected it, that is a queue event — do NOT treat a dropped-after-ejection auto-merge as an unresolved-thread problem.
Each loop tick
Agent PR (shared definition across lanes): an open PR whose author OR assignee = your login (gh api user --jq .login) — opened by a sub-agent this operator dispatched. Scope every scan to YOUR login only; never touch another operator's PRs.
- List open agent PRs. For each, list unresolved review threads via the GraphQL query in
driving-prs-to-merge(gh pr view --json reviewThreadscan return EMPTY even when threads exist — use raw GraphQL). Treat<bot-reviewer>threads identically to human threads. - For each unresolved thread:
- Valid → dispatch a workhorse sub-agent to apply the fix on the PR branch (prefer
caveman:cavecrew-builderfor ≤2-file fixes). - Wrong / out of scope → post a reasoned counter-reply (verify before agreeing or refusing — no performative agreement, no reflexive dismissal).
- One writer per branch: if the
pr-checkslane is also pushing a CI fix to this same branch, do not push concurrently. Re-sync (git merge origin/<branch>) before pushing; if HEAD moved under you, merge onto it — never force-push another lane's commits.
- Valid → dispatch a workhorse sub-agent to apply the fix on the PR branch (prefer
- Resolve the thread ONLY after the fix is pushed (or the counter is posted and stands). Order is strict: push first, confirm pushed (
git log origin/<branch>..HEADis empty), then resolve. Never resolve a thread whose fix is still local/uncommitted — that merges pre-fix code under falsely-resolved threads. - Also read the PR body summary, not just threads — some bots put their full priority list / security findings only there, and the body does not gate merge (see the async-orphan / threads-are-a-subset traps in
driving-prs-to-merge).
The arm/disarm gate (the race fix)
Enable auto-merge only when BOTH hold:
- The review bot has actually reviewed the PR — it posted its review / comments or an explicit no-issues verdict. If
<bot-reviewer>has NOT yet reacted (no<bot-ack-reaction>, no comments, no review), do NOT arm — wait for it. Arming before the bot reviews is exactly the race being killed: comments arriving after the PR is queued.- Timeout escape: if a small fixed grace window (≈5 min) has elapsed since PR-open (or since the last push that would re-trigger review) AND the bot still shows no reaction, assume it is not coming and arm anyway. Do not wait indefinitely on a bot that never reacts.
- All review threads are resolved (bot + human), no open requested-changes.
When both true: gh pr merge <PR#> --auto <merge-strategy> (merge queue active → omit the strategy flag, or the queue silently drops enrollment — see driving-prs-to-merge).
After arming, keep watching the PR. A late bot/human comment can still land once the PR is already queued — the original race. Do NOT assume the queue holds for a new unresolved thread. If a fresh thread appears on an armed PR: gh pr merge <PR#> --disable-auto first, then fix → push → resolve → re-arm per this gate.
Never post <ai-mention-trigger> from any agent — it is a human-only trigger; one AI session invoking another creates unsupervised loops. Enforce with a permission deny rule matching the mention string.
Token discipline: caveman for ops, humanizer for prose
This lane runs in a high-volume, repetitive loop where tokens compound across many ticks and agents. Operate in caveman mode (load the caveman skill) for all working output. Delegate code edits to sub-agents (or caveman:cavecrew-investigator/-builder for small scoped changes) so diffs and logs stay out of your context.
Report per tick: PRs N, open threads M, fixes pushed+resolved K, countered J, auto-merge armed: #x, waiting-on-bot: #y.
Caveman compresses prose only — never machine-precise content: gh/GraphQL commands, label/field names, the arm/disarm gate conditions, file:line refs, code blocks all stay byte-exact. Durable prose a human reads — counter-replies and commit messages — is the exception: write those normally, through the humanizer skill, not in caveman.
Stop conditions
All threads resolved + auto-merge armed on every reviewed-or-timed-out PR → no open threads, auto-merge armed and end the tick. PRs still inside the grace window awaiting the bot's first reaction → leave unarmed, report waiting-on-bot; a later tick (or once the window passes) arms them. The loop re-fires on its interval.
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.

