Review CLI
Use the local CLI in this repository to inspect GitHub PR review threads/comments.
When to use this skill
Use this skill when the user wants any of the following:
- review threads or comments for a PR
- unresolved review feedback for the current PR
- resolved threads included with a flag
- filtering review comments by one or more GitHub users
- JSON output for further processing or scripting
- AI review services like CodeRabbit where the user mostly wants the actionable review body, not the PR metadata wrapper
This skill is specifically for the CLI implemented in this repo. Prefer using the CLI instead of rebuilding the gh queries yourself.
Working style
Prefer structured output first.
For agent workflows, default to running the CLI with --json --just-reviews so you get stable machine-readable review data without extra PR wrapper fields. Only skip --json if the user explicitly asks to see the CLI's human-readable terminal output exactly as rendered. Only skip --just-reviews when the user clearly needs PR metadata such as the title, branches, state, repository, or PR URL.
Command patterns
Run commands from the repository root:
bunx review-cli --json --just-reviews
Current PR with reviewer filtering:
bunx review-cli --json --just-reviews --user monalisa --user hubot
Specific PR number:
bunx review-cli 123 --json --just-reviews
Include resolved threads:
bunx review-cli 123 --include-resolved --json --just-reviews
Human-readable mode, review-only by default:
bunx review-cli 123 --include-resolved --just-reviews
Include PR metadata only when the user asks for it:
bunx review-cli 123 --include-resolved --json
Expected behavior
- If no PR number is passed, the CLI resolves the current PR from the branch context using
gh. - By default, only unresolved review threads are returned.
- Repeating
--usermatches comments from any of those GitHub logins. --jsonreturns the normalized result object. With--just-reviews, the JSON omitspullRequestand returns review data only.--just-reviewsis usually the right default for AI agents because they typically care about actionable review findings, not PR metadata.
Recommended agent flow
- Run the CLI with
--json --just-reviewsunless the user explicitly wants raw terminal formatting or specifically needs PR metadata. - Inspect
filters,threadCount,commentCount, andthreads. Only inspectpullRequestwhen you deliberately omitted--just-reviews. - Summarize the actionable items for the user:
- unresolved threads first
- file/line location
- commenter
- key comment text
- If the command fails because the directory is not a GitHub checkout or
ghis not configured, explain that clearly and suggest running it from a real repo checkout or providing the PR number where appropriate.
Output notes
The JSON shape is suitable for downstream scripting. Prefer citing exact fields rather than re-parsing terminal text.
Useful fields include:
filters.includeResolvedfilters.justReviewsfilters.usersthreadCountcommentCountthreads[].paththreads[].linethreads[].isResolvedthreads[].comments[].authorthreads[].comments[].bodyTextthreads[].comments[].url
If PR metadata is intentionally included, useful extra fields include:
pullRequest.numberpullRequest.titlepullRequest.url
Example interpretation
If the user asks, "What unresolved feedback is left on my PR?", run:
bunx review-cli --json --just-reviews
Then summarize the returned unresolved threads in plain English instead of pasting raw JSON unless they asked for the JSON itself.