You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
review-pr: skill documents broken gh api flag syntax for review comments #1409
The review-pr skill (Step 4, "Correct — inline suggestion on the line") documents posting multi-comment reviews using gh api with -f 'comments[0][path]=...' flag syntax. This syntax does not work — gh api converts array index notation into object keys, sending {"0": {"path": ...}} instead of [{"path": ...}]. GitHub rejects this with an "Invalid request" error.
The bot then has to recover by switching to a JSON payload with --input, wasting a tool call and tokens on each review that includes inline comments.
Bot constructs review with two inline comments using -f 'comments[0][path]=...' syntax (as documented in skill)
GitHub API returns: "Invalid request. For 'properties/comments', {"0" => {"body" => ...
Bot recovers by building a JSON payload file and using --input
Second attempt succeeds
The skill itself shows this broken syntax at lines 336-344:
gh api "repos/$REPO/pulls/<number>/reviews" \
--method POST \
-f event=COMMENT \
-f body="Summary of suggestions" \
-f 'comments[0][path]=.claude/skills/example/SKILL.md' \
-f 'comments[0][line]=3' \
-f 'comments[0][body]=```suggestion ...'
Fix
Update the skill to use a JSON payload file with --input instead of -f flag syntax for review comments. This is the same approach the bot discovers on its own after the failure, and is consistent with the running-in-ci skill's guidance to use temp files for complex API payloads.
Activity
fix(review-pr): use JSON payload for review comments instead of broke…