pr-review-comments
Skill584 starsChanged 10 months agoMITView on GitHub
Guide for submitting/posting inline PR review comments to GitHub. Use this when you need to post code review comments on specific lines of a Pull Request.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- michaelminter/skillstheir own version, first seen Sep 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- michaelminter/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-functionSkill
- build-docsSkill
- code-styleSkill
- dax-optimizationSkill
- direct-lake-operationsSkill
- github-repo-exploreSkill
- planning-with-filesSkill
- query-builder-daxSkill
- rest-api-patternsSkill
- run-testsSkill
- sql_to_daxSkill
- tom-operationsSkill
- ui-stylingSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when you need to:
- Very specific: line 21
GitHub CLI installed: Check with gh --version
- Distinctive: line 22
If not installed on Linux:
- Very specific: line 30
GitHub CLI authenticated: Check with gh auth status
- Very specific: line 31
If not authenticated: gh auth login -h github.com -p https --web
- Distinctive: line 32
Follow the device code flow to complete authentication
- Distinctive: line 47
Create a JSON file with the review comments.
- Distinctive: line 86
Make sure the line number exists in the diff, otherwise the API will reject the comment
- Very specific: line 97
Use \n for newlines in JSON
- Distinctive: line 99
Use emoji prefixes for severity: 🔴 Critical/High, 🟡 Medium/Minor, 🟢 Suggestion
- Distinctive: line 145
Use severity emojis: 🔴 Critical, 🟡 Medium, 🟢 Minor
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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
Posting Inline PR Review Comments to GitHub
This skill documents how to post inline review comments to GitHub Pull Requests using the GitHub CLI (gh) and GitHub API. Inline comments appear directly on specific lines of code in the PR diff, making it easier for PR authors to identify and address issues.
When to Use This Skill
Use this skill when you need to:
- Post inline review comments on specific lines of a PR
- Automate code review feedback with targeted comments
- Submit batch review comments via the GitHub API
Prerequisites
- GitHub CLI installed: Check with
gh --version- If not installed on Linux:
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update && sudo apt install gh -y
- If not installed on Linux:
- GitHub CLI authenticated: Check with
gh auth status- If not authenticated:
gh auth login -h github.com -p https --web - Follow the device code flow to complete authentication
- If not authenticated:
Method: Using GitHub API with JSON Payload
Step 1: Get the PR's Head Commit SHA
COMMIT_SHA=$(gh api repos/{OWNER}/{REPO}/pulls/{PR_NUMBER} --jq '.head.sha')
echo "Commit SHA: $COMMIT_SHA"Step 2: Create the Review JSON Payload
Create a JSON file with the review comments. Each comment needs:
path: The file path relative to repository rootline: The line number in the new version of the file (right side of diff)body: The comment content (supports Markdown)
cat > /tmp/review.json << 'EOF'
{
"commit_id": "YOUR_COMMIT_SHA_HERE",
"event": "COMMENT",
"comments": [
{
"path": "src/path/to/file.py",
"line": 40,
"body": "🔴 **Critical:** Description of the issue.\n\n**Suggested fix:**\n```python\n# your code here\n```"
},
{
"path": "src/path/to/another_file.py",
"line": 21,
"body": "🟡 **Minor:** Another issue description."
}
]
}
EOFStep 3: Post the Review
gh api repos/{OWNER}/{REPO}/pulls/{PR_NUMBER}/reviews --method POST --input /tmp/review.jsonImportant Notes
Line Numbers
- The
linefield refers to the line number in the new version of the file (right side of the diff) - For deleted lines, use
side: "LEFT"and the line number from the old version - Make sure the line number exists in the diff, otherwise the API will reject the comment
Event Types
| Event | Description |
"COMMENT" | Just add comments without approving/requesting changes |
"APPROVE" | Approve the PR with comments |
"REQUEST_CHANGES" | Request changes with comments |
Comment Body Formatting
- Supports full GitHub Markdown
- Use
\nfor newlines in JSON - Escape special characters properly
- Use emoji prefixes for severity: 🔴 Critical/High, 🟡 Medium/Minor, 🟢 Suggestion
Multi-line Comments
For commenting on a range of lines:
{
"path": "src/file.py",
"start_line": 10,
"line": 15,
"body": "This comment spans lines 10-15"
}Troubleshooting
| Issue | Solution |
| "Validation Failed" error | Check that the line number exists in the PR diff; verify the file path is correct |
| "Resource not accessible" error | Ensure you have write access to the repository; re-authenticate with gh auth login |
| Comments not appearing on specific lines | The line must be part of the diff (added, modified, or within context lines) |
Alternative: Using gh pr review Command
For simpler reviews without inline comments:
gh pr review {PR_NUMBER} --repo {OWNER}/{REPO} --comment --body "Your review comment here"This posts a general review comment but does not support inline comments on specific lines.
Repository-Specific Information
- Repository:
microsoft/semantic-link-labs - Common file paths:
src/sempy_labs/{module}/_items.pysrc/sempy_labs/{module}/__init__.py
- Review comment conventions:
- Use severity emojis: 🔴 Critical, 🟡 Medium, 🟢 Minor
- Include "Suggested fix" with code blocks
- Reference specific line numbers
Examples
See the examples/ folder for complete working scripts:
- post_pr1059_review.sh - Example script posting inline review comments to PR #1059
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.

