From tp-git
Add line-specific review comments on pull requests — single comments and batched multi-file reviews.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tp-git:git-reviewWhen to use
Use when the user says 'review PR', 'inline comment', 'add comment to PR', 'comment on PR', 'review comment', 'leave feedback on PR', or 'GitHub review'. IMMEDIATELY when the user asks to 'add a comment on line X', 'review this pull request', 'post review comments', or 'add inline feedback'. BEFORE merging any PR — use when the user wants to provide specific line-by-line feedback.
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
IF a single comment on one line is needed → use the single comment endpoint with the commit SHA
IF a single comment on one line is needed → use the single comment endpoint with the commit SHA IF multiple comments across files are needed → batch them as one review via the reviews endpoint IF a pending review already exists for this user → submit it first, or use individual comments IF MCP inline comment tools are available → prefer them over the gh API
Place line-specific comments on pull request diffs. Supports individual comments and batched multi-file reviews. Use MCP inline comment tools when available; fall back to the GitHub REST API via gh api.
Every inline comment must reference a specific line, file, and commit. Group related comments into a single review to reduce notification noise.
| Goal | Method |
|---|---|
| Single inline comment | gh api repos/{owner}/{repo}/pulls/{pr}/comments -f body='...' -f commit_id='<sha>' -f path='<file>' -F line=<n> -f side='RIGHT' |
| Multi-comment review | echo '{ "event": "COMMENT", "body": "...", "comments": [...] }' | gh api repos/{owner}/{repo}/pulls/{pr}/reviews --input - |
| Get latest commit SHA | gh api repos/{owner}/{repo}/pulls/{pr} --jq '.head.sha' |
| List changed files | gh api repos/{owner}/{repo}/pulls/{pr}/files --jq '.[] | {filename, additions, deletions}' |
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
-f body='Your observation or suggestion' \
-f commit_id='<sha>' \
-f path='path/to/file.ts' \
-F line=<line-number> \
-f side='RIGHT'
For multi-line comments, add -F start_line=<start> and -f start_side='RIGHT'.
echo '{
"event": "COMMENT",
"body": "Overall review summary (optional)",
"comments": [
{"path": "file1.ts", "body": "Comment", "side": "RIGHT", "line": 15},
{"path": "file2.ts", "body": "Comment", "side": "RIGHT", "line": 30}
]
}' | gh api repos/{owner}/{repo}/pulls/{pr}/reviews --input -
Review events: COMMENT (feedback), APPROVE (approve), REQUEST_CHANGES (block).
| Issue | Cause | Fix |
|---|---|---|
user_id can only have one pending review | Existing unsubmitted review blocks new ones | Submit pending review, or use individual comment endpoint |
line must be part of the diff | Line number not in the diff | Verify line in the "Files changed" tab |
commit_sha is not part of the pull request | Wrong commit SHA | Get .head.sha from PR: gh api .../pulls/{pr} --jq '.head.sha' |
A single review with multiple comments generates one notification instead of N. This matches the GitHub UI behavior of "Start a review" followed by "Finish review" for coherent review sessions.
Operates during the review stage. Consumes diffs from open PRs and produces inline feedback that the PR author addresses.
npx claudepluginhub git-fg/taches-principled --plugin tp-gitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.