mit einem Klick
gh-pr-flow
// GitHub PR review workflow using GraphQL. Prefer over raw gh CLI or GitHub MCP tools when working with PR review comments and threads.
// GitHub PR review workflow using GraphQL. Prefer over raw gh CLI or GitHub MCP tools when working with PR review comments and threads.
Review PR or branch changes with Cursor CLI using a different model (gemini-3-pro).
View GitHub Actions job logs from a URL with noise filtered out
Write in flowing, professional prose inspired by Anthropic's communication style. Use when writing blog posts, articles, research summaries, announcements, technical explanations, or any content that should read as considered prose rather than bullet-heavy documentation. Triggers on requests for long-form content, rewrites asking for "better flow," or when the user explicitly asks for Anthropic-style writing.
Parse various file formats (PDF, Office docs, images, audio, HTML) to markdown using the markitdown library
Download web pages using curl and convert them to markdown using the markitdown-parser skill
| name | gh-pr-flow |
| description | GitHub PR review workflow using GraphQL. Prefer over raw gh CLI or GitHub MCP tools when working with PR review comments and threads. |
Supports standalone operations or full workflow. Ask user what they need. Default to full workflow if they share a PR URL without specifics.
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
line
path
comments(first: 1) {
nodes { id body author { login } }
}
}
}
}
}
}' --jq '
["thread_id","resolved","path","line","body"],
(.data.repository.pullRequest.reviewThreads.nodes[] | [
.id,
.isResolved,
.path,
.line,
(.comments.nodes[0].body | gsub("\n";" ")[0:150])
]) | @csv'
Add select(.isResolved == false) to filter unresolved only.
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "PRRT_xxx"}) { thread { isResolved } } }'
gh api graphql -f query='mutation { unresolveReviewThread(input: {threadId: "PRRT_xxx"}) { thread { isResolved } } }'
gh api graphql -f query='{ node(id: "PRRT_xxx") { ... on PullRequestReviewThread { comments(first: 10) { nodes { body author { login } } } } } }'
Extract owner and repo from:
github.com/owner/repo/pull/123)git remote get-url originStore as variables for all subsequent calls:
OWNER=<extracted-owner>
REPO=<extracted-repo>
PR_NUMBER=<extracted-number>
Infer from context:
Hands-on (default): User wants to review changes, says "help me", "walk through", "let's look at". Confirm before executing, show diffs before commit.
Hands-off: User says "just fix", "handle it", "address all comments". Process autonomously, commit and resolve when done.
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
line
path
comments(first: 1) {
nodes { id body author { login } }
}
}
}
}
}
}' --jq '
["thread_id","resolved","path","line","body"],
(.data.repository.pullRequest.reviewThreads.nodes[] | [
.id,
.isResolved,
.path,
.line,
(.comments.nodes[0].body | gsub("\n";" ")[0:150])
]) | @csv'
Ask user: "Show only unresolved threads, or include resolved ones too?"
For unresolved only, add to jq: select(.isResolved == false)
Show threads in a clear table format:
For each unresolved thread, categorize:
If truncated preview is insufficient, fetch full body:
gh api graphql -f query='{
node(id: "THREAD_ID") {
... on PullRequestReviewThread {
comments(first: 10) {
nodes { body author { login } createdAt }
}
}
}
}'
For each actionable thread, determine:
If hands-on: Present the plan and ask for confirmation before proceeding.
Show:
Use TodoWrite to track each thread as a task. For example:
- [ ] Fix: path/to/file.py:42 - datetime.utcnow() deprecation
- [ ] Fix: path/to/other.py:118 - error message improvement
- [ ] Respond: question about API design
For each code-change thread:
For question/clarification threads:
If hands-on mode: After each significant change, show diff and ask for approval.
git add -A
git status
git diff --staged
Create descriptive commit message summarizing the PR feedback addressed.
If hands-on: Show commit message and ask for confirmation.
git commit -m "Address PR review feedback: <summary>"
git push
If hands-on: Ask before pushing.
For each thread where code was fixed:
gh api graphql -f query='mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread { id isResolved }
}
}'
Report which threads were resolved and which remain open.
If any threads required clarification responses:
gh api graphql -f query='mutation {
addPullRequestReviewComment(input: {
pullRequestReviewId: "REVIEW_ID",
body: "Response text here",
inReplyTo: "COMMENT_ID"
}) {
comment { id }
}
}'
Or simpler via REST:
gh api repos/OWNER/REPO/pulls/PR_NUMBER/comments/COMMENT_ID/replies -f body="Response"
If user wants to add custom responses, ask what they want to say for each thread requiring a response.