What I do
- Accept a GitHub pull request URL or PR number
- Fetch PR metadata, diff, reviews, and review comments via GitHub CLI (
gh)
- Detect comments authored by GitHub Copilot or Copilot-related bot accounts
- Render a GitHub-style location header for each comment from the API line metadata
- Write a readable markdown digest to
.opencode/review/
- Return the saved file path to the user
When to use me
Use this skill when:
- User wants a local markdown summary of Copilot review comments on a PR
- User wants Copilot feedback preserved outside GitHub for later review
- User wants AI review feedback exported from GitHub into a clean local markdown file
- User wants the raw Copilot wording and inline code suggestions copied exactly into a local note
Prerequisites
- GitHub CLI (
gh) must be installed and authenticated
- If given only a PR number, the current repository must have a GitHub
origin remote
- The target PR must be accessible with the current GitHub credentials
- If
gh not installed -> error: Error: GitHub CLI not found. Install: https://cli.github.com/
- If not authenticated -> error:
Error: Not authenticated with GitHub. Run: gh auth login
Input Handling
Accept either of these forms:
- Full GitHub PR URL
- Example:
https://github.com/owner/repo/pull/123
- PR number
Resolution Rules
- If input is a full PR URL:
- Use it directly with
gh pr view <url> and related gh commands.
- If input is a PR number:
- Resolve repository from
git remote get-url origin
- Derive
owner/repo
- Build the API path from that repository and PR number
- If the input is neither a valid URL nor a PR number:
- Error:
Error: Provide a GitHub PR URL or PR number
Workflow
Validate GitHub access
gh auth status
Resolve PR and fetch metadata
- For PR URL, use:
gh pr view <pr> --json number,title,url,author,baseRefName,headRefName,changedFiles,additions,deletions
- For PR number in current repo, verify remote:
git remote get-url origin
gh pr view <number> --json number,title,url,author,baseRefName,headRefName,changedFiles,additions,deletions
Fetch reviews and review comments
gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate
gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate
Identify Copilot-authored feedback
- Match exact known Copilot review identities first, including
Copilot and copilot-pull-request-reviewer[bot]
- Then match review/comment authors whose login contains
copilot
- Treat likely bot/service accounts as Copilot feedback when the login clearly indicates Copilot
- Ignore human reviewer comments
Preserve comment text exactly
- Copy each Copilot comment body exactly as returned by GitHub
- Do not paraphrase, rewrite, or normalize the wording
- Preserve markdown, fenced code blocks, suggestion blocks, bullets, and links exactly
- Keep suggestion blocks inside
Original Copilot Comment; do not split them into a separate section
Render comment location from API metadata
- Use the structured comment fields such as
path, line, start_line, side, start_side, and subject_type
- Do not claim this exact header came from a single API field; it is composed from the metadata
- Render a GitHub-style location header such as:
sync.sh
Comment on lines +42 to +50
- For single-line comments, render a concise variant such as:
- Use
+ for right-side/new lines and - for left-side/old lines when deriving the displayed line marker
- If both
start_line and line are present and different, show a range; otherwise show a single line
Create output directory
mkdir -p .opencode/review
Generate filename
- Format:
YYYY-MM-DD-HHmm-pr-<number>-copilot-review-digest.md
- Timestamp command:
date +%Y-%m-%d-%H%M
Write digest
- Save markdown to
.opencode/review/<filename>.md
- Return the saved path to the user
Output Structure
Write the review digest using this structure:
# Copilot Review Digest: PR #<number> <title>
**PR:** <url>
**Author:** <author>
**Branch:** <head> -> <base>
**Files changed:** <count>
**Lines:** +<additions> / -<deletions>
**Generated:** YYYY-MM-DD HH:mm
## Overview
<2-4 sentence summary of what the PR changes and what Copilot flagged>
## Copilot Findings
### `path/to/file.ext`
Comment on lines +42 to +50
#### Finding 1
**Original Copilot Comment:**
<exact Copilot review comment body copied unchanged>
**GitHub link:** <comment html url if available>
#### Finding 2
...
## General Notes
- <cross-cutting observation>
- <pattern across multiple comments>
## Raw Review Stats
- Total reviews fetched: <n>
- Total review comments fetched: <n>
- Copilot comments included: <n>
Writing Guidelines
- Keep the markdown readable and skimmable
- Group findings by file path when possible
- Preserve the original Copilot wording exactly; do not rewrite or summarize the comment body
- Preserve any code fences, suggestion blocks, and markdown formatting exactly as GitHub returned them inside
Original Copilot Comment
- Treat the comment
body as source text; copy it exactly as returned by the API, including punctuation, quotes, and whitespace-sensitive markdown
- Add a short synthesized overview, but do not invent issues not present in the review data
- If multiple Copilot comments hit the same file, keep them under one file heading
- If no Copilot comments are found, still write a digest file with an overview and a note saying no Copilot-authored feedback was detected
Suggested Title and Filename Style
- Document title:
Copilot Review Digest: PR #123 Improve sync reporting
- Filename:
2026-03-06-1530-pr-123-copilot-review-digest.md
Data Sources
Prefer structured API data over scraped terminal text:
- PR metadata:
gh pr view --json ...
- Reviews:
gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate
- Review comments:
gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate
Never replace raw Copilot material with a paraphrased version.
Error Handling
- Invalid input ->
Error: Provide a GitHub PR URL or PR number
gh missing -> Error: GitHub CLI not found. Install: https://cli.github.com/
- Not authenticated ->
Error: Not authenticated with GitHub. Run: gh auth login
- No GitHub remote for PR number mode ->
Error: No GitHub remote found. Provide a full PR URL or set origin
- PR not found or inaccessible ->
Error: Unable to access the pull request with current GitHub credentials
- No Copilot comments found -> write the digest anyway and state that no Copilot-authored comments were detected
Notes
- Use
gh CLI only; no separate GitHub SDK is required
- Favor raw GitHub-provided comment text over synthesized summaries
- This skill is read-oriented: it should not modify code, update the PR, or post replies
1---2name: gh-copilot-review-read3description: Read GitHub Copilot PR review comments, pair them with diff context, and write a markdown digest to .opencode/review/4license: MIT5---67## What I do89- Accept a GitHub pull request URL or PR number10- Fetch PR metadata, diff, reviews, and review comments via GitHub CLI (`gh`)11- Detect comments authored by GitHub Copilot or Copilot-related bot accounts12- Render a GitHub-style location header for each comment from the API line metadata13- Write a readable markdown digest to `.opencode/review/`14- Return the saved file path to the user1516## When to use me1718Use this skill when:19- User wants a local markdown summary of Copilot review comments on a PR20- User wants Copilot feedback preserved outside GitHub for later review21- User wants AI review feedback exported from GitHub into a clean local markdown file22- User wants the raw Copilot wording and inline code suggestions copied exactly into a local note2324## Prerequisites2526- GitHub CLI (`gh`) must be installed and authenticated27- If given only a PR number, the current repository must have a GitHub `origin` remote28- The target PR must be accessible with the current GitHub credentials29- If `gh` not installed -> error: `Error: GitHub CLI not found. Install: https://cli.github.com/`30- If not authenticated -> error: `Error: Not authenticated with GitHub. Run: gh auth login`3132## Input Handling3334Accept either of these forms:3536- Full GitHub PR URL37 - Example: `https://github.com/owner/repo/pull/123`38- PR number39 - Example: `123`4041### Resolution Rules42431. If input is a full PR URL:44 - Use it directly with `gh pr view <url>` and related `gh` commands.452. If input is a PR number:46 - Resolve repository from `git remote get-url origin`47 - Derive `owner/repo`48 - Build the API path from that repository and PR number493. If the input is neither a valid URL nor a PR number:50 - Error: `Error: Provide a GitHub PR URL or PR number`5152## Workflow53541. **Validate GitHub access**55 ```bash56 gh auth status57 ```58592. **Resolve PR and fetch metadata**60 - For PR URL, use:61 ```bash62 gh pr view <pr> --json number,title,url,author,baseRefName,headRefName,changedFiles,additions,deletions63 ```64 - For PR number in current repo, verify remote:65 ```bash66 git remote get-url origin67 gh pr view <number> --json number,title,url,author,baseRefName,headRefName,changedFiles,additions,deletions68 ```69703. **Fetch reviews and review comments**71 ```bash72 gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate73 gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate74 ```75764. **Identify Copilot-authored feedback**77 - Match exact known Copilot review identities first, including `Copilot` and `copilot-pull-request-reviewer[bot]`78 - Then match review/comment authors whose login contains `copilot`79 - Treat likely bot/service accounts as Copilot feedback when the login clearly indicates Copilot80 - Ignore human reviewer comments81825. **Preserve comment text exactly**83 - Copy each Copilot comment body exactly as returned by GitHub84 - Do not paraphrase, rewrite, or normalize the wording85 - Preserve markdown, fenced code blocks, suggestion blocks, bullets, and links exactly86 - Keep suggestion blocks inside `Original Copilot Comment`; do not split them into a separate section87886. **Render comment location from API metadata**89 - Use the structured comment fields such as `path`, `line`, `start_line`, `side`, `start_side`, and `subject_type`90 - Do not claim this exact header came from a single API field; it is composed from the metadata91 - Render a GitHub-style location header such as:92 - `sync.sh`93 - `Comment on lines +42 to +50`94 - For single-line comments, render a concise variant such as:95 - `Comment on line +141`96 - Use `+` for right-side/new lines and `-` for left-side/old lines when deriving the displayed line marker97 - If both `start_line` and `line` are present and different, show a range; otherwise show a single line98997. **Create output directory**100 ```bash101 mkdir -p .opencode/review102 ```1031048. **Generate filename**105 - Format: `YYYY-MM-DD-HHmm-pr-<number>-copilot-review-digest.md`106 - Timestamp command:107 ```bash108 date +%Y-%m-%d-%H%M109 ```1101119. **Write digest**112 - Save markdown to `.opencode/review/<filename>.md`113 - Return the saved path to the user114115## Output Structure116117Write the review digest using this structure:118119```markdown120# Copilot Review Digest: PR #<number> <title>121122**PR:** <url>123**Author:** <author>124**Branch:** <head> -> <base>125**Files changed:** <count>126**Lines:** +<additions> / -<deletions>127**Generated:** YYYY-MM-DD HH:mm128129## Overview130131<2-4 sentence summary of what the PR changes and what Copilot flagged>132133## Copilot Findings134135### `path/to/file.ext`136137Comment on lines +42 to +50138139#### Finding 1140141**Original Copilot Comment:**142<exact Copilot review comment body copied unchanged>143144**GitHub link:** <comment html url if available>145146#### Finding 2147148...149150## General Notes151152- <cross-cutting observation>153- <pattern across multiple comments>154155## Raw Review Stats156157- Total reviews fetched: <n>158- Total review comments fetched: <n>159- Copilot comments included: <n>160```161162## Writing Guidelines163164- Keep the markdown readable and skimmable165- Group findings by file path when possible166- Preserve the original Copilot wording exactly; do not rewrite or summarize the comment body167- Preserve any code fences, suggestion blocks, and markdown formatting exactly as GitHub returned them inside `Original Copilot Comment`168- Treat the comment `body` as source text; copy it exactly as returned by the API, including punctuation, quotes, and whitespace-sensitive markdown169- Add a short synthesized overview, but do not invent issues not present in the review data170- If multiple Copilot comments hit the same file, keep them under one file heading171- If no Copilot comments are found, still write a digest file with an overview and a note saying no Copilot-authored feedback was detected172173## Suggested Title and Filename Style174175- Document title: `Copilot Review Digest: PR #123 Improve sync reporting`176- Filename: `2026-03-06-1530-pr-123-copilot-review-digest.md`177178## Data Sources179180Prefer structured API data over scraped terminal text:181182- PR metadata: `gh pr view --json ...`183- Reviews: `gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate`184- Review comments: `gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate`185186Never replace raw Copilot material with a paraphrased version.187188## Error Handling189190- Invalid input -> `Error: Provide a GitHub PR URL or PR number`191- `gh` missing -> `Error: GitHub CLI not found. Install: https://cli.github.com/`192- Not authenticated -> `Error: Not authenticated with GitHub. Run: gh auth login`193- No GitHub remote for PR number mode -> `Error: No GitHub remote found. Provide a full PR URL or set origin`194- PR not found or inaccessible -> `Error: Unable to access the pull request with current GitHub credentials`195- No Copilot comments found -> write the digest anyway and state that no Copilot-authored comments were detected196197## Notes198199- Use `gh` CLI only; no separate GitHub SDK is required200- Favor raw GitHub-provided comment text over synthesized summaries201- This skill is read-oriented: it should not modify code, update the PR, or post replies