gh-copilot-review-read
Skill2 starsChanged 43 days agoMITView on GitHub
Read GitHub Copilot PR review comments, pair them with diff context, and write a markdown digest to .opencode/review/
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- changelog-bump-verSkill
- gh-copilot-review-resolveSkill
- gh-copilot-reviewSkill
- gh-cr-submitSkill
- gh-issue-fixSkill
- gh-issueSkill
- gh-pr-mergeSkill
- gh-protect-default-branchSkill
- gh-pr-reviewSkill
- gh-prSkill
- gh-releaseSkill
- git-branchSkill
- git-commitSkill
- git-pushSkill
- make-changelogSkill
- mir-skills-installSkill
- mir-skills-updateSkill
- python-venvSkill
- save-planSkill
- session-noteSkill
- work-reportSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
27 rules. About 0 are common, 15 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈15
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Write a readable markdown digest to .opencode/review/
- Distinctive: line 22
Use this skill when:
- Very specific: line 31
If given only a PR number, the current repository must have a GitHub origin remote
- Very specific: line 33
If gh not installed -> error: Error: GitHub CLI not found.
- Very specific: line 34
If not authenticated -> error: Error: Not authenticated with GitHub.
- Distinctive: line 47
If input is a full PR URL:
- Very specific: line 48
Use it directly with gh pr view <url> and related gh commands.
- Distinctive: line 49
If input is a PR number:
- Distinctive: line 53
If the input is neither a valid URL nor a PR number:
- Distinctive: line 83
Treat likely bot/service accounts as Copilot feedback when the login clearly indicates Copilot
- Distinctive: line 88
Do not paraphrase, rewrite, or normalize the wording
- Very specific: line 90
Keep suggestion blocks inside Original Copilot Comment.
- Very specific: line 93
Use the structured comment fields such as path, line, start_line, side, start_side, and subject_type
- Distinctive: line 94
Do not claim this exact header came from a single API field.
- Very specific: line 100
Use + for right-side/new lines and - for left-side/old lines when deriving the displayed line marker
- Very specific: line 101
If both start_line and line are present and different, show a range.
- Distinctive: line 121
Write the review digest using this structure:
- Distinctive: line 168
Keep the markdown readable and skimmable
- Very specific: line 172
Treat the comment body as source text.
- Distinctive: line 173
Add a short synthesized overview, but do not invent issues not present in the review data
- Distinctive: line 174
If multiple Copilot comments hit the same file, keep them under one file heading
- Distinctive: line 175
If no Copilot comments are found, still write a digest file with an overview and a note saying no Copilot-authored feedback was detected
- Distinctive: line 184
Prefer structured API data over scraped terminal text:
- Distinctive: line 190
Never replace raw Copilot material with a paraphrased version.
- Very specific: line 197
No GitHub remote for PR number mode -> Error: No GitHub remote found.
- Distinctive: line 199
No Copilot comments found -> write the digest anyway and state that no Copilot-authored comments were detected
- Very specific: line 203
Use gh CLI only; no separate GitHub SDK is required
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
originremote - The target PR must be accessible with the current GitHub credentials
- If
ghnot 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
- Example:
- PR number
- Example:
123
- Example:
Resolution Rules
- If input is a full PR URL:
- Use it directly with
gh pr view <url>and relatedghcommands.
- Use it directly with
- 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
- Resolve repository from
- If the input is neither a valid URL nor a PR number:
- Error:
Error: Provide a GitHub PR URL or PR number
- Error:
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
- For PR URL, use:
- 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
Copilotandcopilot-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
- Match exact known Copilot review identities first, including
- 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, andsubject_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:
README.mdComment on lines +42 to +50
- For single-line comments, render a concise variant such as:
Comment on line +141
- Use
+for right-side/new lines and-for left-side/old lines when deriving the displayed line marker - If both
start_lineandlineare present and different, show a range; otherwise show a single line
- Use the structured comment fields such as
- 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
- Format:
- Write digest
- Save markdown to
.opencode/review/<filename>.md - Return the saved path to the user
- Save markdown to
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
bodyas 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 review 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 ghmissing ->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
ghCLI 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
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.

