Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

coderabbit-conversations

БесплатноБез исполняемых скриптовНе проверен

List and resolve all unresolved CodeRabbit review conversations from the current PR

agentuityот agentuity★ 19 звёзд на GitHub

Об этом скилле

CodeRabbit Conversations

List all unresolved CodeRabbit review conversations from the current PR, create a TODO list to address each one, and resolve them all once fixed.

Why GraphQL Instead of REST

The gh pr view --json reviews,comments approach only returns review-level data and misses individual conversation threads. GitHub's GraphQL API exposes the reviewThreads connection which gives us:

  • Per-thread resolution status (isResolved)
  • Whether the comment is outdated/outside diff (isOutdated)
  • The exact file path and line number
  • The full comment body
  • Thread IDs needed for the resolveReviewThread mutation

Workflow

Step 1: Get Current PR Info

PR_JSON=$(gh pr view --json number,url,title --jq '{number,url,title}')
PR_NUMBER=$(echo "$PR_JSON" | jq -r '.number')
PR_TITLE=$(echo "$PR_JSON" | jq -r '.title')
PR_URL=$(echo "$PR_JSON" | jq -r '.url')

Step 2: Get Repository Owner and Name

REPO_JSON=$(gh repo view --json owner,name --jq '{owner: .owner.login, name: .name}')
OWNER=$(echo "$REPO_JSON" | jq -r '.owner')
REPO=$(echo "$REPO_JSON" | jq -r '.name')

Step 3: Fetch All CodeRabbit Review Threads

Fetch all review threads from the PR using GitHub's GraphQL API with cursor-based pagination (PRs may have >100 threads). This collects every conversation thread with its resolution status, outdated status, file path, line number, and comment body into $ALL_THREADS.

ALL_THREADS='[]'
HAS_NEXT=true
CURSOR=""

while [ "$HAS_NEXT" = "true" ]; do
  AFTER_CLAUSE=""
  if [ -n "$CURSOR" ]; then
    AFTER_CLAUSE=", after: \"$CURSOR\""
  fi

  RESPONSE=$(gh api graphql -f query='
  {
    repository(owner: "'"$OWNER"'", name: "'"$REPO"'") {
      pullRequest(number: '"$PR_NUMBER"') {
        reviewThreads(first: 100'"$AFTER_CLAUSE"') {
          totalCount
          pageInfo {
            hasNextPage
            endCursor
          }
          nodes {
            id
            isResolved
            isOutdated
            comments(first: 1) {
              nodes {
                author { login }
                path
                line
                body
              }
            }
          }
        }
      }
    }
  }')

  HAS_NEXT=$(echo "$RESPONSE" | jq -r '.data.repository.pullRequest.reviewThreads.pageInfo.hasNextPage')
  CURSOR=$(echo "$RESPONSE" | jq -r '.data.repository.pullRequest.reviewThreads.pageInfo.endCursor')
  PAGE_NODES=$(echo "$RESPONSE" | jq '.data.repository.pullRequest.reviewThreads.nodes')
  ALL_THREADS=$(echo "$ALL_THREADS" "$PAGE_NODES" | jq -s '.[0] + .[1]')
done

TOTAL=$(echo "$RESPONSE" | jq -r '.data.repository.pullRequest.reviewThreads.totalCount')
echo "Fetched $(echo "$ALL_THREADS" | jq 'length') of $TOTAL total threads"

Step 4: Filter and Format

From the collected $ALL_THREADS array, apply these filters:

  1. Unresolved only: isResolved == false
  2. CodeRabbit only: comments.nodes[0].author.login == "coderabbitai"
  3. In-diff only: isOutdated == false (excludes "outside diff range" comments)

Then format as a flat numbered list using jq:

echo "$ALL_THREADS" | jq -r '
  [.[]
   | select(.isResolved == false)
   | select(.isOutdated == false)
   | select(.comments.nodes[0].author.login == "coderabbitai")
  ] | to_entries[]
  | "\(.key + 1). [\(.value.id)] \(.value.comments.nodes[0].path):\(.value.comments.nodes[0].line // "N/A")\n   \(.value.comments.nodes[0].body | split("\n") | map(select(length > 0)) | join("\n   "))\n"
'

Step 5: Create TODO List

After listing all unresolved conversations, use todo_write to create a TODO item for each one. Each TODO should include:

  • The thread ID (for resolving later)
  • The file path and line number
  • A brief summary of the issue

Then work through each TODO:

  1. Read the relevant file and understand the issue
  2. Make the fix
  3. Mark the TODO as completed
  4. Move to the next one

Step 6: Resolve All Conversations

After all issues have been fixed, resolve every thread by running the resolveReviewThread GraphQL mutation for each thread ID:

gh api graphql -f query='
mutation {
  resolveReviewThread(input: { threadId: "THREAD_ID_HERE" }) {
    thread {
      id
      isResolved
    }
  }
}'

To resolve all unresolved CodeRabbit threads in one go, first collect all thread IDs, then loop:

# Collect all unresolved CodeRabbit thread IDs with cursor-based pagination
ALL_RESOLVE_THREADS='[]'
HAS_NEXT=true
CURSOR=""

while [ "$HAS_NEXT" = "true" ]; do
  AFTER_CLAUSE=""
  if [ -n "$CURSOR" ]; then
    AFTER_CLAUSE=", after: \"$CURSOR\""
  fi

  RESPONSE=$(gh api graphql -f query='
  {
    repository(owner: "'"$OWNER"'", name: "'"$REPO"'") {
      pullRequest(number: '"$PR_NUMBER"') {
        reviewThreads(first: 100'"$AFTER_CLAUSE"') {
          totalCount
          pageInfo {
            hasNextPage
            endCursor
          }
          nodes {
            id
            isResolved
            isOutdate
Полный SKILL.md на GitHub

Установить coderabbit-conversations в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
edit_file
todo_write

FAQ

Что делает скилл coderabbit-conversations?

List and resolve all unresolved CodeRabbit review conversations from the current PR

Как установить скилл coderabbit-conversations?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл coderabbit-conversations запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить coderabbit-conversations с