Guide · Agent skill
How to use the Copilot PR Autopilot agent skill
Updated · written with AI from the project's own documentation and checked against our catalogue data
Copilot PR Autopilot is an agent skill that takes a GitHub pull request through repeated rounds of Copilot code review. It requests the review, reads the comments, decides which ones to fix, decline or escalate, makes the fixes, runs your build and tests, commits, pushes, and replies to each thread. This guide is for developers and maintainers who get many Copilot review comments and want them worked through automatically. After reading it you will know what an agent skill is, how to install this one, how to trigger it, and what it needs and touches.
Quick start
- 1Download the ZIP. Get the copilot-pr-autopilot ZIP from this skill's page on the directory.
- 2Unzip into a skills folder. Extract it into ~/.claude/skills/ for all projects, or into the project's .claude/skills/ for one repository.
- 3Authenticate the GitHub CLI. Install gh and run gh auth login against the target repository so the scripts can start.
- 4Confirm PowerShell is available. Make sure powershell.exe (5.1+) or pwsh (7+) is on your PATH.
- 5Check your permission level. Confirm you have Triage or Write on the repo for the full loop, or plan for single-iteration mode.
- 6Ask for the loop in plain language. Say something like "run a copilot review loop" or "address copilot comments" with the PR number.
- 7Review the result. When the agent reports convergence, check the head commit, the thread replies and any open hand-offs, then merge if it is clean.
What is an agent skill and what does this one do?
An agent skill is a folder of instructions and optional scripts that an AI agent loads when your request matches the skill's purpose. This one, named copilot-pr-autopilot, is built for loop engineering on a pull request.
Once installed, the agent can request a Copilot code review through GraphQL without you mentioning @copilot, triage every open review thread from Copilot, humans and advanced-security, and dispatch parallel fix sub-agents that follow the repo's build, test and lint conventions. It commits per iteration, replies to each thread citing the pushed commit, resolves the ones it handled, and re-triggers review until the latest review is on the current HEAD and no thread is waiting on the agent's reply.
Open threads left for a human are treated as deliberate hand-offs, such as escalated declines or design tradeoffs, not failures. You review and merge the clean PR.
Install the skill from the downloaded ZIP
Download the ZIP for copilot-pr-autopilot from the skill's page on this directory. Unzip it into your personal skills folder at ~/.claude/skills/ to make it available in all projects, or into a project's .claude/skills/ folder to share it with that repository.
You can also upload the skill in the Claude apps. Go to Settings, then Capabilities, then Skills, and upload the ZIP there.
- Personal install: unzip into ~/.claude/skills/
- Project install: unzip into the project's .claude/skills/ folder
- Claude apps: Settings → Capabilities → Skills, then upload the ZIP
Check the prerequisites before the first run
The skill drives the GitHub CLI and PowerShell, so both must be ready on the machine where the agent runs. The skill's scripts load a shared library that checks the GitHub CLI on start. If gh is missing or not authenticated, the script stops before doing any work and shows an error naming the install command and gh auth login. Surface that message as is and fix the setup.
You need the GitHub CLI installed and authenticated against the target repository, and PowerShell: Windows PowerShell 5.1 or later, or PowerShell 7 or later. Copilot Code Review is the primary use case but is not a hard requirement.
- GitHub CLI (gh) installed and authenticated against the target repo
- PowerShell 5.1+ (powershell.exe) or PowerShell 7+ (pwsh)
- Copilot Code Review enabled on the repo or account (primary use case, not a hard requirement)
- Triage or Write permission on the target repo for the full loop
gh auth loginUnderstand permissions: full loop or single iteration
The full multi-round loop needs Triage or Write permission on the repo, because the public API for adding Copilot as a reviewer requires it. If you are an external PR author without write access, the trigger step throws a clear error, and the skill switches to single-iteration mode. In that mode the agent addresses all current findings in one pass, then you either click the 🔄 button next to Copilot in the UI or push a substantive commit to re-trigger review.
- Triage or Write: the agent runs the full hands-off loop
- External author: single-iteration mode, then manual re-trigger
Trigger the skill with natural requests
You do not need to remember script names. Ask in plain language and the agent will match your request to the skill. The skill's trigger phrases are the ones listed in its description.
Good phrasings include the examples below. Name the PR number or be on the PR's branch so the agent knows the target.
- "address copilot comments" on PR 123
- "run a copilot review loop" for this PR
- "fix this PR"
- "iterate on copilot feedback"
What happens during a run
Each round runs a fixed sequence. The parent agent requests the review, waits up to about 20 minutes for Copilot to finish, lists open threads, triages them as fix, decline or escalate, fixes in parallel, runs build and tests, commits and pushes, replies and resolves, then checks convergence. If the check says the loop is not finished, it starts another round. When it converges, it runs a one-time cleanup of outdated threads and reports back with the proof, including the head commit and the review it matched.
The skill has a circuit breaker: every tenth round, the agent recaps all prior rounds against the PR's original scope and chooses to continue, revert drifted commits and ship, or hand off to you.
- Request review, then wait for Copilot
- List and triage open threads
- Fix in parallel, then build and test
- Commit, push, reply and resolve
- Check convergence and repeat or finish
Safety notes: scripts and network access
This skill runs scripts and uses the network. It calls GitHub through the gh CLI and GraphQL, and it makes commits and pushes to the PR branch. Because of that, the loop is not read-only. Only use it on branches where automated commits are acceptable, and check the commit history after each run.
The skill is repository-agnostic and runs the repo's own build, test and lint conventions, so those commands run on your machine. Review the scripts in the skill folder before the first run if your policies require it.
- Runs scripts: yes
- Uses network: yes
- Makes commits and pushes to the PR branch
- Do not use it if you cannot accept automated commits on your branch
Tips for better results
Wait until the PR's structure is stable. The skill itself warns that findings churn each round while a PR is still under active design, which wastes effort. Use it when the PR is functionally complete and you want a final correctness pass.
If you want only human reviewer feedback, use a different workflow. The loop is built around Copilot's comments and treats human threads as items to triage alongside them.
- Use it on a functionally complete PR, not one still being designed
- Check the final commit history and the reply on each thread
- Expect open threads for a human to remain; they are intentional hand-offs
What people use it for
- Clearing a long list of Copilot nits on a feature PR before merge
- Running a final correctness pass on a functionally complete PR in a team repo
- Working through review threads from humans and advanced-security alongside Copilot's comments
- Continuing review iteration on an external contributor's PR in single-iteration mode
Frequently asked questions
How do I install the copilot-pr-autopilot skill?
Download the ZIP from the skill's page, then unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. You can also upload the ZIP in the Claude apps under Settings → Capabilities → Skills.
What do I need to run it?
You need the GitHub CLI (gh) installed and authenticated against the repo, plus PowerShell 5.1 or 7 or later. For the full loop you need Triage or Write permission on the repository. Copilot Code Review is the primary use case but not a hard requirement.
Is copilot-pr-autopilot free?
The skill is published under the MIT licence in the github/awesome-copilot repository. The source does not state pricing for Copilot itself, so check your GitHub Copilot plan for Copilot Code Review access.
Can I use it without Copilot Code Review?
Yes, but with limits. If the trigger fails because Copilot is not enabled, the agent can run one iteration to handle existing human or advanced-security threads, skipping the trigger and wait steps.
Why does the skill fail with a permission error?
The trigger uses a GitHub API that requires Triage or Write permission on the repository. External PR authors without write access get a clear error and should use single-iteration mode, then re-trigger Copilot manually from the UI or by pushing a substantive commit.
How does it compare to just asking Copilot to fix comments?
This skill runs a repeated, bounded loop: it triggers review, triages every open thread, fixes in parallel, runs your build and tests, replies, resolves and re-checks until convergence. A one-off request does not repeat the review or verify the final state.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use this skill if you regularly get many Copilot review comments on a PR, have Triage or Write access, and are happy for an agent to commit and push to the branch. Pick something else if the PR is still being designed, if you want only human review feedback, or if you cannot allow automated commits.
Download the skill