GitHub Copilot PR Comments Skill
Extract GitHub Copilot review comments from a PR and produce a markdown report using gh CLI.
Prerequisites
- •
ghCLI installed and authenticated (gh auth login) - •
jqinstalled for JSON processing
Usage
bash
./scripts/fetch_copilot_comments.sh <owner/repo> <pr_number> [output_file]
Parameters
| Param | Required | Description |
|---|---|---|
owner/repo | Yes | Full repo identifier, e.g. microsoft/vscode |
pr_number | Yes | PR number |
output_file | No | Output markdown path (default: copilot_review.md) |
Workflow
- •Ask the user for repo and PR number if not provided.
- •Verify
ghis authenticated (gh auth status). If not, instruct the user to rungh auth login. - •Run:
bash scripts/fetch_copilot_comments.sh <owner/repo> <pr_number> /home/claude/copilot_review.md - •Copy output to
/mnt/user-data/outputs/copilot_review.mdand present to the user.
Output Format
The generated markdown includes:
- •PR metadata — title, author, link, creation date
- •Summary — total Copilot comments by type, files reviewed, suggestion count
- •Review summaries — top-level Copilot review bodies with approval state
- •Inline code comments — grouped by file with diff context, line numbers, and
suggestionblocks - •General comments — issue-level comments from Copilot
Copilot Detection
Comments are attributed to Copilot if the author login matches: copilot, copilot[bot], github-copilot, github-copilot[bot], github-advanced-security[bot], or any bot user with "copilot" in the login.