get-pr-comments
Arguments
- PR_URL: GitHub Pull Request URL (preferred)
Use AskQuestion to get PR URL / PR Number / Repository if not provided in prompt.
Variables
Extract following variables from {{PR_URL}}. We'll use them ahead
- REPO: '{{owner}}/{{reponame}}'
- PR_NUMBER: {{number}}
E.g. in PR_URL: https://github.com/saurabhdaware/agent-toolkit/pull/123, REPO=saurabhdaware/agent-toolkit and PR_NUMBER=123
Fetch Comments
You can use this command to fetch details of comments
# to get review comments
gh api repos/{{REPO}}/pulls/{{PR_NUMBER}}/comments --template '
[{{range $i, $c := .}}{{if $i}},{{end}}
{
"diff": "{{$c.diff_hunk}}",
"user": "{{$c.user.login}}",
"comment": "{{$c.body}}",
"link": "{{$c.html_url}}"
}
{{end}}]'
# to get general comments from the PR
gh api repos/{{REPO}}/issues/{{PR_NUMBER}}/comments --template '
[{{range $i, $c := .}}{{if $i}},{{end}}
{
"user": "{{$c.user.login}}",
"comment": "{{$c.body}}",
"link": "{{$c.html_url}}"
}
{{end}}]'
Example
For https://github.com/abelljs/abell/pull/190, the following shell command can be used to fetch comments
gh api repos/abelljs/abell/pulls/190/comments --template '
[{{range $i, $c := .}}{{if $i}},{{end}}
{
"diff": "{{$c.diff_hunk}}",
"user": "{{$c.user.login}}",
"comment": "{{$c.body}}"
}
{{end}}]'
gh api repos/abelljs/abell/issues/190/comments --template '
[{{range $i, $c := .}}{{if $i}},{{end}}
{
"user": "{{$c.user.login}}",
"comment": "{{$c.body}}"
}
{{end}}]'
Output Format
Respond in the following format
1. By {{ user }}
Diff (if applicable):
{{ diff }}
Comment: {{ comment }} Link: {{ link }} (Clickable link)
. . . For N number of comments
More from saurabhdaware/agent-toolkit
yolo
Bypass plan-and-execute; on /yolo run, execute directly with minimal questions.
16review-ci
Review the CI status of a GitHub Pull Request using GitHub CLI (`gh`). Use when the user asks to check CI status, investigate failing checks, or understand why a PR pipeline is failing.
10review-ui
Review a web UI flow by running `agent-browser` against a provided URL and scenario. Use when the user asks to test a UI, reproduce steps, validate UX, or verify a web flow on a URL.
10plan-and-execute
Important skill that enforces a plan-then-execute workflow for all user queries except when /yolo skill is used; first present a "## Plan" section with high-level steps and illustrative code snippets, then request explicit approval before making code changes.
8review-pr
End-to-end PR review orchestrator. Fetches GitHub PR diffs via .diff URLs to summarize code changes, triggers CI review using the review-ci skill, and, when CI exposes a preview URL, runs review-ui against that URL and relevant scenarios. Use when the user wants a holistic review of a GitHub Pull Request including code, CI pipelines, and (if possible) the deployed UI.
6brainstorm
Facilitate open-ended idea generation, structured brainstorming, and exploratory discussion without making any code or file edits. Use when the user wants to explore approaches, generate ideas, or think through problems collaboratively before implementation.
5