Back to list
BillChirico

github-pr-resolver

by BillChirico

Collection of custom Claude skills

2🍴 0📅 Jan 24, 2026

SKILL.md


name: github-pr-resolver description: "Resolve GitHub PR review comments and fix failing CI checks. Creates todo list to track ALL threads across ALL pages, processes each with individual commits, and verifies zero unresolved remain."

GitHub PR Resolver

Process ALL PR review comments, make fixes, resolve threads, and fix CI failures.

Critical Rules

  1. Fetch ALL pages - GitHub returns max 100 items per request. Always paginate until hasNextPage: false
  2. Track with todos - Create a TaskCreate item for each unresolved thread before processing
  3. One commit per thread - Never batch fixes into a single commit
  4. Verify after push - Re-fetch ALL pages to confirm zero unresolved threads remain

API Access

Prefer GitHub MCP when available, fall back to gh CLI.

OperationMCP ToolCLI Fallback
Read PRmcp__github__pull_request_readgh pr view
Resolve threadmcp__github__pull_request_review_writegh api graphql mutation
Check statusIncluded in PR readgh pr checks

Workflow

Step 1: Fetch ALL Threads (with Pagination)

1. Fetch PR details and review threads
2. Check hasNextPage - if true, fetch next page with cursor
3. Repeat until hasNextPage is false
4. Count total unresolved threads across ALL pages

MCP:

mcp__github__pull_request_read(owner, repo, pullNumber)
→ Check response for pagination, fetch additional pages if needed

CLI (GraphQL):

gh api graphql -f query='
query($owner: String!, $repo: String!, $prNumber: Int!, $cursor: String) {
  repository(owner: $owner, name: $repo) {
    pullRequest(number: $prNumber) {
      reviewThreads(first: 100, after: $cursor) {
        pageInfo { hasNextPage, endCursor }
        nodes {
          id, isResolved, path, line
          comments(first: 10) { nodes { body, author { login } } }
        }
      }
    }
  }
}' -f owner=OWNER -f repo=REPO -F prNumber=NUMBER

Step 2: Create Todo List

For each unresolved thread (isResolved: false), create a tracking item:

TaskCreate:
  subject: "<path>:<line> - <summary>"
  description: "Thread ID: <id>\nAuthor: <author>\nComment: <body>"
  activeForm: "Resolving <path>:<line>"

Verify with TaskList - count must match total unresolved from Step 1.

Step 3: Process Each Thread

For each todo item:

1. TaskUpdate(taskId, status: "in_progress")
2. Read file, make the fix
3. git add <file> && git commit -m "<type>(<scope>): <description>"
4. Resolve thread on GitHub (MCP or GraphQL mutation)
5. TaskUpdate(taskId, status: "completed")

Resolve thread (MCP):

mcp__github__pull_request_review_write(owner, repo, pullNumber, threadId, action: "RESOLVE")

Resolve thread (CLI):

gh api graphql -f query='
mutation($threadId: ID!) {
  resolveReviewThread(input: {threadId: $threadId}) {
    thread { id, isResolved }
  }
}' -f threadId="<THREAD_ID>"

Step 4: Fix CI Failures

For each failing check, fix and commit separately:

# Lint
npm run lint -- --fix && git add . && git commit -m "fix(lint): resolve linting errors"

# Tests
# Fix failing tests
git add . && git commit -m "fix(tests): update failing assertions"

# Build/Types
# Fix errors
git add . && git commit -m "fix(build): resolve build errors"

Step 5: Push

git push origin $(gh pr view <PR> --json headRefName -q '.headRefName')

Step 6: Verify

Re-fetch ALL pages (same as Step 1) and confirm:

  • Zero unresolved threads across ALL pages
  • TaskList shows all items completed
  • CI checks are running

If any threads remain unresolved, go back to Step 3.

Commit Convention

Comment PatternCommit Type
Bug fix, null check, validationfix
Add, implement, missingfeat
Rename, refactor, change X to Yrefactor
Documentation, commentsdocs
Performanceperf
Style, formattingstyle

Scope: Extract from path - src/services/User.tsservices

Completion Checklist

  • Fetched ALL pages (paginated until hasNextPage: false)
  • Created todo for each unresolved thread
  • All todos show completed
  • Each thread has its own commit
  • Changes pushed
  • Re-verified: zero unresolved across ALL pages

Score

Total Score

55/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon