Automates posting review comments to specific lines in GitHub pull requests.
Install
mkdir -p .claude/skills/add-review-comment && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4053" && unzip -o skill.zip -d .claude/skills/add-review-comment && rm skill.zipInstalls to .claude/skills/add-review-comment
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Add a review comment to a GitHub pull request.Key capabilities
- →Post single-line review comments to GitHub PRs
- →Add multi-line range comments
- →Inject suggestion blocks for one-click code fixes
- →Fetch pull request context via GitHub CLI
How it works
Constructs and submits JSON payloads to the GitHub API via the `gh` command-line utility to attach feedback to specific diff segments.
Inputs & outputs
When to use add-review-comment
- →Commenting on specific lines in a PR
- →Providing code suggestions for PR fixes
- →Adding multi-line review feedback
About this skill
Add Review Comment
Adds a review comment to a specific line in a GitHub pull request.
Step 1: Locate the line to comment on
Use the fetch-diff skill (optionally piped through grep) to locate the line to comment on.
Step 2: Post the comment
Single-line comment:
gh api repos/<owner>/<repo>/pulls/<pr_number>/comments \
# Body must end with "🤖 Generated with Claude" on a separate line
-f body=<comment> \
-f path=<file_path> \
-F line=<line_number> \
-f side=<side> \
-f commit_id="$(gh pr view <pr_number> --repo <owner>/<repo> --json headRefOid -q .headRefOid)" \
--jq '.html_url'
Multi-line comment:
gh api repos/<owner>/<repo>/pulls/<pr_number>/comments \
# Body must end with "🤖 Generated with Claude" on a separate line
-f body=<comment> \
-f path=<file_path> \
-F start_line=<first_line> \
-f start_side=<side> \
-F line=<last_line> \
-f side=<side> \
-f commit_id="$(gh pr view <pr_number> --repo <owner>/<repo> --json headRefOid -q .headRefOid)" \
--jq '.html_url'
Parameters
line: Line number in the file (for multi-line, the last line)side:RIGHTfor added/modified lines (+),LEFTfor deleted lines (-)start_line/start_side: For multi-line comments, the first line of the range
Best Practices
-
Use suggestion blocks (three backticks + "suggestion") for simple fixes that maintainers can apply with one click
```suggestion <suggested code here> ```Note: Preserve original indentation exactly in suggestion blocks
-
For repetitive issues, leave one representative comment instead of flagging every instance
-
For bugs, explain the potential problem and suggested fix clearly
When not to use it
- →Posting non-code-related conversational replies
- →Approving or merging pull requests
Prerequisites
Limitations
- →Limited to the specific git commit hash at the time of the review
- →Requires correct side identification for diff lines
How it compares
Enables automated, programmatic insertion of code suggestions directly into the PR diff interface.
Compared to similar skills
add-review-comment side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| add-review-comment (this skill) | 1 | 3mo | Review | Beginner |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| git-commits | 21 | 4mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by mlflow
View all by mlflow →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
git-commits
bonny
Create well-structured git commits in logical chunks following best practices
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.
github-multi-repo
ruvnet
Multi-repository coordination, synchronization, and architecture management with AI swarm orchestration
git-workflow-enforcer
CrazyDubya
Ensures commits follow conventional commits, branch naming conventions, and PR templates. Use when creating commits, branches, or PRs, or when user mentions git workflow.