بنقرة واحدة
review-comments
Interact with GitHub PR review comments and threads - fetch, analyze, reply, and resolve.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Interact with GitHub PR review comments and threads - fetch, analyze, reply, and resolve.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | review-comments |
| description | Interact with GitHub PR review comments and threads - fetch, analyze, reply, and resolve. |
| user-invocable | true |
Comprehensive toolkit for interacting with GitHub Pull Request review comments and threads using gh CLI and GraphQL API.
# Invoke this skill
/review-comments [PR_NUMBER]
# Fetch all review comments for current PR
gh pr view --json reviews,comments
# Fetch CodeRabbit review from PR
gh pr view PR_NUMBER --json body,comments --jq '.body, .comments[].body' | grep -A 1000 "coderabbitai"
Fetch all review threads with unresolved status:
OWNER="owner-name"
REPO="repo-name"
PR_NUMBER=123
gh api graphql -f query="
{
repository(owner: \"$OWNER\", name: \"$REPO\") {
pullRequest(number: $PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
comments(first: 100) {
nodes {
id
body
path
line
author { login }
createdAt
}
}
}
}
}
}
}"
Get unresolved threads with file paths and line numbers:
gh api graphql -f query="
{
repository(owner: \"$OWNER\", name: \"$REPO\") {
pullRequest(number: $PR_NUMBER) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
path
line
body
author { login }
}
}
}
}
}
}
}" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
Add a reply to an existing review thread:
THREAD_ID="PRRT_kwDO..." # From thread listing
REPLY_TEXT="Fixed in commit abc123"
gh api graphql -f query="
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: \"$THREAD_ID\"
body: \"$REPLY_TEXT\"
}) {
comment {
id
body
}
}
}"
Mark a thread as resolved:
THREAD_ID="PRRT_kwDO..."
gh api graphql -f query="
mutation {
resolveReviewThread(input: {
threadId: \"$THREAD_ID\"
}) {
thread {
id
isResolved
}
}
}"
Reopen a resolved thread:
gh api graphql -f query="
mutation {
unresolveReviewThread(input: {
threadId: \"$THREAD_ID\"
}) {
thread {
id
isResolved
}
}
}"
CodeRabbit posts reviews as PR comments. Here's how to extract and parse them:
# Get CodeRabbit's review summary
gh pr view $PR_NUMBER --json comments --jq '
.comments[] |
select(.author.login == "coderabbitai") |
.body
'
CodeRabbit comments on specific files with markdown formatting:
# Extract file-specific feedback
gh pr view $PR_NUMBER --json comments --jq '
.comments[] |
select(.author.login == "coderabbitai" and .path != null) |
{
file: .path,
line: .line,
body: .body,
id: .id
}
'
CodeRabbit often categorizes comments:
# Count comment types
gh pr view $PR_NUMBER --json comments --jq '
[.comments[] |
select(.author.login == "coderabbitai")] |
{
total: length,
actionable: [.[] | select(.body | contains("actionable"))] | length,
nitpicks: [.[] | select(.body | contains("nitpick"))] | length
}
'
Fetch unresolved threads:
gh api graphql -f query=... | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
Address each comment (make code changes)
Reply to thread:
gh api graphql -f query='mutation { addPullRequestReviewThreadReply(...) }'
Resolve thread:
gh api graphql -f query='mutation { resolveReviewThread(...) }'
Commit and push:
git add .
git commit -m "fix: address review comment in file.rs:123"
git push
Add these to your shell or skill scripts:
# Get repository info from current directory
get_repo_info() {
gh repo view --json owner,name --jq '{owner: .owner.login, name: .name}'
}
# Get current PR number
get_current_pr() {
gh pr view --json number --jq '.number'
}
# List all unresolved threads for current PR
list_unresolved() {
local pr_num=$(get_current_pr)
local repo_info=$(get_repo_info)
local owner=$(echo $repo_info | jq -r '.owner')
local repo=$(echo $repo_info | jq -r '.name')
gh api graphql -f query="
{
repository(owner: \"$owner\", name: \"$repo\") {
pullRequest(number: $pr_num) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes { path line body author { login } }
}
}
}
}
}
}" | jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)'
}
# Resolve thread with reply
resolve_with_reply() {
local thread_id="$1"
local message="$2"
# Add reply
gh api graphql -f query="
mutation {
addPullRequestReviewThreadReply(input: {
pullRequestReviewThreadId: \"$thread_id\"
body: \"$message\"
}) {
comment { id }
}
}"
# Resolve thread
gh api graphql -f query="
mutation {
resolveReviewThread(input: {
threadId: \"$thread_id\"
}) {
thread { id isResolved }
}
}"
}
--jq '.' to see full response structureCommon issues and solutions:
PRRT_kwDO--jq '.errors' to check for rate limit errorsExample GitHub Actions workflow step:
- name: Auto-resolve fixed review threads
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get PR number
PR_NUM=$(gh pr view --json number -q .number)
# List unresolved threads
THREADS=$(gh api graphql -f query='...' | jq -r '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false) | .id')
# Check if fixes exist in recent commits
for thread_id in $THREADS; do
# Logic to determine if thread is fixed
# Then resolve it
gh api graphql -f query="mutation { resolveReviewThread(input: {threadId: \"$thread_id\"}) { thread { id } } }"
done
SignalDB Tempo API compatibility - implemented/stub endpoints, query flow, admin API, Grafana native plugin, and built-in Tempo datasource support. Use when working with HTTP API, Grafana integration, or query endpoints.
SignalDB architecture reference - FDAP stack, write/query data flow, service components, deployment models, and dual catalog system. Use when understanding how components fit together, data flow, or system design.
SignalDB crate map - workspace members, module locations within common/writer/querier/router crates, and key root files. Use when navigating the codebase, finding where code lives, or understanding module boundaries.
SignalDB multi-tenancy and authentication - tenant model, auth flow, isolation layers, slug-based naming, API keys, admin API, and CLI. Use when working with tenant isolation, authentication, API keys, or dataset management.
SignalDB configuration reference - all TOML sections, environment variables, database/discovery/storage/WAL/schema/auth/queue settings, and service ports. Use when working with configuration, environment variables, or TOML settings.
Step-by-step guide for adding a new signal type or table to SignalDB - schema definition, Flight schema, OTLP conversion, WAL operation, acceptor/writer/querier/router updates, and testing. Use when adding new signal types, metric types, or tables.