AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

copilot-pr-autopilot

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).

Original source
github
License
MIT
Pinned revision
5269f7ea2d6c3a9bfda5ed878b6726cf509121fd

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read github--copilot-pr-autopilot at revision 5269f7ea2d6c3a9bfda5ed878b6726cf509121fd, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 17

references/01-request-review.md

Step 1: Request review

Owner: parent (no sub-agent); budget: n/a.

Inputs

  • PrNumber for the target PR.

Return contract

  • Captured baseline = LatestCopilotReview.submittedAt string (or empty) to be passed to step 2.
  • Boolean single_iteration_mode — true if the trigger failed because Copilot isn't a valid reviewer; false otherwise.

Procedure

  1. Snapshot first to learn whether Copilot is already pending:

    $snap = pwsh ./scripts/02-check-review-status.ps1 -PrNumber <n>
    $baseline = if ($snap -match '"submittedAt":"([^"]+)"') { $Matches[1] } else { '' }
    $pending  = ($snap -match '"CopilotPending":true')
    

    Regex on raw JSON keeps submittedAt a string across the parent → sub-agent boundary on any PS version (5.1 / 7.x), avoiding [datetime] rebinding.

  2. If $pending — skip the trigger; jump to step 2 with baseline.

  3. Else — fire the trigger:

    pwsh ./scripts/01-request-review.ps1 -PrNumber <n>
    

    The script keeps its own InFlight short-circuit as a safety net, but the canonical "is Copilot pending?" signal lives in 02-check-review-status.ps1 (above).

  4. If 01-request-review.ps1 throws because Copilot isn't a valid reviewer (Copilot Code Review not enabled on the repo / account), take the single-iteration fallback.