Post inline comments on GitHub PRs via gh api
72
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillValidation for skill structure
gh pr reviewgh pr review doesn't support inline comments on specific lines. Use gh api instead.
Use --input - with heredoc JSON (not -f 'comments=[...]' which gets stringified):
gh api repos/{owner}/{repo}/pulls/{pr_number}/reviews \
--method POST \
--input - << 'EOF'
{
"event": "REQUEST_CHANGES",
"comments": [
{"path":"file.rb","line":10,"body":"Comment text"},
{"path":"other.rb","line":25,"body":"Another comment"}
]
}
EOFCOMMENT - Neutral feedbackAPPROVE - Approve the PRREQUEST_CHANGES - Block merge until addressedFor comments spanning lines, add start_line:
{"path":"file.rb","start_line":5,"line":10,"body":"This block..."}gh api repos/{owner}/{repo}/pulls/comments/{id} --method DELETEbody field to skip summary commentpath, line, body31daf20
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.