agentleFS
mir-ammir-am/skills-agents-ai-coding/skills/gh-copilot-review-read/SKILL.md

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/

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
  1. Very specific:

    Write a readable markdown digest to .opencode/review/

    line 17
  2. Distinctive:

    Use this skill when:

    line 22
  3. Very specific:

    If given only a PR number, the current repository must have a GitHub origin remote

    line 31
  4. Very specific:

    If gh not installed -> error: Error: GitHub CLI not found.

    line 33
  5. Very specific:

    If not authenticated -> error: Error: Not authenticated with GitHub.

    line 34
  6. Distinctive:

    If input is a full PR URL:

    line 47
  7. Very specific:

    Use it directly with gh pr view <url> and related gh commands.

    line 48
  8. Distinctive:

    If input is a PR number:

    line 49
  9. Distinctive:

    If the input is neither a valid URL nor a PR number:

    line 53
  10. Distinctive:

    Treat likely bot/service accounts as Copilot feedback when the login clearly indicates Copilot

    line 83
  11. Distinctive:

    Do not paraphrase, rewrite, or normalize the wording

    line 88
  12. Very specific:

    Keep suggestion blocks inside Original Copilot Comment.

    line 90
  13. Very specific:

    Use the structured comment fields such as path, line, start_line, side, start_side, and subject_type

    line 93
  14. Distinctive:

    Do not claim this exact header came from a single API field.

    line 94
  15. Very specific:

    Use + for right-side/new lines and - for left-side/old lines when deriving the displayed line marker

    line 100
  16. Very specific:

    If both start_line and line are present and different, show a range.

    line 101
  17. Distinctive:

    Write the review digest using this structure:

    line 121
  18. Distinctive:

    Keep the markdown readable and skimmable

    line 168
  19. Very specific:

    Treat the comment body as source text.

    line 172
  20. Distinctive:

    Add a short synthesized overview, but do not invent issues not present in the review data

    line 173
  21. Distinctive:

    If multiple Copilot comments hit the same file, keep them under one file heading

    line 174
  22. Distinctive:

    If no Copilot comments are found, still write a digest file with an overview and a note saying no Copilot-authored feedback was detected

    line 175
  23. Distinctive:

    Prefer structured API data over scraped terminal text:

    line 184
  24. Distinctive:

    Never replace raw Copilot material with a paraphrased version.

    line 190
  25. Very specific:

    No GitHub remote for PR number mode -> Error: No GitHub remote found.

    line 197
  26. Distinctive:

    No Copilot comments found -> write the digest anyway and state that no Copilot-authored comments were detected

    line 199
  27. Very specific:

    Use gh CLI only; no separate GitHub SDK is required

    line 203

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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
    • Example: 123

Resolution Rules

  1. If input is a full PR URL:
    • Use it directly with gh pr view <url> and related gh commands.
  2. 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
  3. If the input is neither a valid URL nor a PR number:
    • Error: Error: Provide a GitHub PR URL or PR number

Workflow

  1. Validate GitHub access
    gh auth status
  2. 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
  3. Fetch reviews and review comments
    gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate
    gh api repos/<owner>/<repo>/pulls/<number>/comments --paginate
  4. 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
  5. 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
  6. 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:
      • README.md
      • Comment 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_line and line are present and different, show a range; otherwise show a single line
  7. Create output directory
    mkdir -p .opencode/review
  8. Generate filename
    • Format: YYYY-MM-DD-HHmm-pr-<number>-copilot-review-digest.md
    • Timestamp command:
      date +%Y-%m-%d-%H%M
  9. 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 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
  • 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.