Skills
Skill 94 of 200
Copilot left 14 review comments on your PR — half are nits. Hours of fix → reply → resolve → re-request, and each round lands MORE comments.
6 minutes · 1,368 words · 8 sections
Install
npx skills add github/awesome-copilot --skill copilot-pr-autopilotnpx skills add github/awesome-copilot/plugin marketplace add github/awesome-copilotThe first command installs just this skill, by the name in its SKILL.md; the second installs the whole repository.
Drive any GitHub pull request through repeated rounds of Copilot code
review until the agent has done its job — every Copilot finding has
a reply from the agent (fix-acknowledgement, decline-with-rationale,
or explicit escalate-to-user hand-off). Remaining open threads, if
any, are deliberate hand-offs to the human merge owner — they’re
not loop failures. Repository-agnostic — works on any repo that has
Copilot Code Review enabled, run from a machine with gh CLI
installed and authenticated (see Prerequisites).
gh CLI installed and authenticated against the target repository.powershell.exe) or
PowerShell 7+ (pwsh). Both are tested.01-request-review.ps1
uses GraphQL requestReviewsByLogin to trigger Copilot). It is
NOT a hard requirement — if 01-request-review.ps1 fails
because Copilot isn’t enabled on the repo / account, the agent can
still drive existing review threads (human, advanced-security, etc.)
to completion by running steps 3–8 once as a single iteration; just
skip the trigger + wait. There is no auto-detect for “Copilot
unavailable” — the agent makes that decision after the trigger
fails (the script can’t reliably tell “Copilot disabled” from
“Copilot enabled but not yet triggered” from API state alone).The full multi-round autopilot (steps 1 → 9 → 1) needs Triage or Write permission on the target repo, because GitHub’s only public API for adding the Copilot bot as a reviewer (requestReviewsByLogin) is gated on that permission. Verified against the public REST + GraphQL surface in this PR’s commit history — there is no public-API path for bot reviewers without write permission.
| You are… | What works |
|---|---|
| Repo collaborator with Triage / Write | Full loop: 01 triggers Copilot, 02 waits, 04–08 triage / fix / reply, loop back to 01. Hands-off. |
| External PR author (no write permission) | 01 will throw a clear actionable error. Use -SingleIteration mode: address all current findings in one pass, then either click the UI 🔄 next to Copilot, or push a substantive commit (the synchronize event auto-triggers Copilot on most repos). Then re-run 02 to verify. |
In single-iteration mode the loop’s convergence boolean is Converged: true iff OpenThreadsAwaitingReply == 0 (the agent’s side is done). The maintainer-side re-trigger then drives any additional rounds.
Every script dot-sources scripts/_lib.ps1 (opens in a new tab) which
runs Assert-GhReady on load: if gh is missing OR gh auth status
fails, the script halts before any work with a single actionable
error message naming the install command and gh auth login. The
agent should surface that message to the user verbatim and stop the
loop — do not retry or work around it.
The loop: steps 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9, then back to step 1 if
Converged: false. Repeat the 1→9 round until step 9 returnsConverged: true; only then run step 10 once and calltask_complete. At every 10th round, the parent runs the round-cap recap gate (opens in a new tab) before looping back — recap all prior rounds and stop if the loop has drifted out of the PR’s original scope.
Each round runs steps 1–9; step 10 is a one-time cleanup after convergence. The parent agent coordinates; every sub-agent step runs in a fresh context with a bounded budget. Cross-cutting protocol (time-boxing, extension, single-iteration fallback): orchestration.md (opens in a new tab).
Converged: false → loop back to step 1 for another round (re-trigger, wait, list, triage, fix, push, reply, re-check). Each round addresses Copilot’s findings on the previous round’s HEAD; the loop terminates as soon as Copilot has nothing new to say AND every open thread has a reply from the agent.Converged: true → exit the loop, run step 10 once, call task_complete with the proof.Convergence is computed by scripts/02-check-review-status.ps1 (opens in a new tab) as a single Converged: true boolean. Do not call task_complete until it returns true; print the proof (HeadOid, LatestCopilotReview.commitOid, submittedAt) in the completion message.
The bundled scripts enforce the hard correctness invariants (trigger landing via copilot_work_started event id, Converged requiring HEAD-match + zero-awaiting + at-HEAD review, single-iteration fallback semantics, PR-state guard). Trust them — don’t re-derive. The notes below cover decisions the scripts can’t make for you:
fix and decline threads, reply + resolve. For escalate-to-user threads, reply with the analysis but leave the thread OPEN (08-reply-and-resolve.ps1 -NoResolve) so the human merge owner can act on it. See 08-reply-resolve.md (opens in a new tab).escalate-to-user. Auto-resolving a human review thread can hide unaddressed concerns. See 04-triage.md (opens in a new tab) for the rubric.git bisect. See 07-commit-push.md (opens in a new tab).CONTRIBUTING / AGENTS / README / package.json / Makefile) before pushing a fix. Discovery procedure: 06-build-test.md (opens in a new tab).decline path in 04-triage.md (opens in a new tab).gh api graphql -F type-coercion, git stash push -m positional parsing, the three GraphQL traps for the reviewer mutation) are documented in references/api-quirks.md (opens in a new tab). Read before modifying any script.| Issue | Solution |
|---|---|
Script throws prerequisite missing — gh CLI is not on PATH | Install gh (winget install GitHub.cli on Windows; brew install gh on macOS; package manager on Linux; or download from https://cli.github.com (opens in a new tab)). Then gh auth login. Surface the message to the user and STOP the loop — do not retry. |
Script throws prerequisite missing — gh CLI is not authenticated | Run gh auth login. STOP the loop until the user completes auth. |
Trigger fails or no copilot_work_started event lands | Push a substantive (non-whitespace) commit — auto-assign on synchronize is the most reliable trigger. Persistent failure indicates Copilot Code Review may not be enabled on the repo / account (check repo Settings → Code & automation → Copilot, or account-level Copilot Pro/Pro+). |
| No new review after waiting ~10 min | Quiet-period after recent dismissal or trivial-diff suppression. Push a substantive commit and retry. Do not blindly re-run 01-request-review.ps1 — it reports InFlight while Copilot is still a requested reviewer. |
| Outdated-but-unresolved threads in the open list | Expected: unresolved state is the source of truth. Reply + resolve them like any other open thread. 10-cleanup-outdated.ps1 is only a final safety net. |
| Unsure whether to fix or decline a finding | See references/04-triage.md (opens in a new tab). |
| Need a reply phrasing for “fixed”, “declined”, or “drift” | See the templates under templates/ (opens in a new tab) — reply-fix.md (opens in a new tab), reply-decline.md (opens in a new tab), reply-drift.md (opens in a new tab), reply-partial.md (opens in a new tab). |
NN-*.md per step):
references/01-request-review.md (opens in a new tab) (parent),
references/02-wait.md (opens in a new tab),
references/03-list-threads.md (opens in a new tab),
references/04-triage.md (opens in a new tab) (includes the
fix-vs-decline rubric),
references/05-fix.md (opens in a new tab),
references/06-build-test.md (opens in a new tab),
references/07-commit-push.md (opens in a new tab) (parent),
references/08-reply-resolve.md (opens in a new tab),
references/09-convergence.md (opens in a new tab) (includes
the round-cap recap gate),
references/10-cleanup.md (opens in a new tab) (parent).Invoke-Gh,
Invoke-GhGraphQL, Resolve-RepoCoords); dot-sourced by every
script.copilot_work_started event.Converged: true only when all three conditions hold.Copilot left 14 review comments on your PR — half are nits. Hours of fix → reply → resolve → re-request, and each round lands MORE comments. This skill runs loop engineering: auto-triggers Copilot Code Review via GraphQL (no @copilot mention), triages every open thread (Copilot, humans, advanced-security) with a fix / decline / escalate rubric, dispatches parallel fix sub-agents that obey the repo build/test/lint conventions, commits per iteration, replies+resolves citing the pushed SHA, then re-triggers until HEAD is reviewed with zero threads awaiting the agent's reply (remaining open threads are explicit hand-offs to the human — escalated declines, design tradeoffs). You merge a clean PR; the bot runs it. Trigger phrases: "address copilot comments", "run a copilot review loop", "fix this PR", "iterate on copilot feedback". Repo-agnostic, gh CLI + PowerShell. Full autopilot needs repo Triage/Write; external PR authors get single-iteration mode plus manual re-trigger (UI 🔄 or substantive-commit push).
The verbatim description from this skill’s front matter — the string an agent matches on to decide whether to load it.
main, last pushed 24 September 2026.SKILL.md, not by matching a directory convention. 2 distinct layouts observed: .github/skills/*/SKILL.md, skills/*/SKILL.md.h1 and no skipped levels:.github/plugin/marketplace.json by GitHub, declaring 162 plugins. It is read for editorial metadata only — never as the skill index, which is always the repository tree./github/awesome-copilot.md, and each skill at its own .md URL.23 files · 126 KB
Everything this skill ships beside its prose. All of it is set here, as subchapters of skill 94.
Documentation the agent loads on demand, rather than up front.
Executable code the skill can run.
Templates, schemas and fixtures the skill draws on.