github-pr-resolver
Resolve GitHub PR review comments and fix failing CI checks. Creates a team with teammates to process threads in parallel, tracks ALL threads across ALL pages, processes each with individual commits, marks each resolved immediately, and verifies all resolved + CI passing before completion.
What this skill does
# GitHub PR Resolver
Process **ALL** PR review comments, make fixes, resolve threads immediately, and ensure CI passes.
## 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. **Resolve immediately** - Mark each thread resolved on GitHub RIGHT AFTER fixing it, not at the end
5. **CI must pass** - Task is NOT complete until all CI checks are green. Fix failures and retry.
6. **USE TEAMMATES (MANDATORY)** - You MUST create a team with `TeamCreate`, spawn teammates with the `Task` tool using `team_name`, and coordinate via the shared task list. Teammates work in parallel automatically. Do NOT use `run_in_background` agents.
## API Access
**Prefer GitHub MCP when available**, fall back to `gh` CLI.
| Operation | MCP Tool | CLI Fallback |
| -------------- | ---------------------------------------- | ------------------------- |
| Read PR | `mcp__github__pull_request_read` | `gh pr view` |
| Resolve thread | `mcp__github__pull_request_review_write` | `gh api graphql` mutation |
| Check status | Included in PR read | `gh 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):**
```bash
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 Team and Task List
**First, create a team:**
```
TeamCreate:
team_name: "pr-resolver-<prNumber>"
description: "Resolve PR #<prNumber> review threads"
```
**Then, for each unresolved thread (`isResolved: false`), create a task in the team's task list:**
```
TaskCreate:
subject: "[#] <path>:<line> - <summary> (@<author>)"
description: |
Thread ID: <id>
Author: @<author>
Link: https://github.com/<owner>/<repo>/pull/<prNumber>#discussion_r<commentId>
Comment: <body>
Repository: <owner>/<repo>
PR Number: <prNumber>
Branch: <branch>
File: <path>
Line: <line>
activeForm: "Resolving <path>:<line> (@<author>)"
```
**Building the comment link:**
- Extract `commentId` from the first comment's `id` field (the numeric portion after the last `/` or the `databaseId`)
- Format: `https://github.com/<owner>/<repo>/pull/<prNumber>#discussion_r<commentId>`
**GraphQL to get comment IDs:**
```bash
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: 1) {
nodes {
databaseId
body
author { login }
}
}
}
}
}
}
}' -f owner=OWNER -f repo=REPO -F prNumber=NUMBER
```
Verify with `TaskList` - count must match total unresolved from Step 1.
### Step 3: Spawn Teammates to Process Threads in Parallel
> **CRITICAL: USE TEAMMATES FOR PARALLEL PROCESSING**
>
> You MUST spawn teammates using the `Task` tool with the `team_name` parameter.
> Teammates automatically work in parallel, pick up tasks from the shared task list,
> and send you messages when they complete or need help.
**Workflow:**
```
1. Group threads by file (threads in the same file go to one teammate)
2. Spawn one teammate per file group using Task tool with team_name
3. Each teammate independently:
a. Claims and starts task: TaskUpdate(taskId, owner: "<teammate-name>", status: "in_progress")
b. Reads file, makes fix
d. git add [file] && git commit -m "[type]([scope]): [description]"
e. Resolves thread on GitHub immediately
f. Verifies isResolved: true
g. Marks completed: TaskUpdate(taskId, status: "completed")
h. Checks TaskList for more unassigned tasks
i. Sends message to team lead when all assigned tasks are done
4. Receive automatic messages from teammates as they complete
5. Handle any failures by messaging the teammate or spawning a new one
```
**Spawning teammates (ALL in a SINGLE message for parallel execution):**
When you have 3 files to fix, spawn THREE teammates in ONE message:
```
YOUR SINGLE RESPONSE MUST CONTAIN:
+--------------------------------------------------------------+
| Task #1: subagent_type="general-purpose" |
| team_name="pr-resolver-<prNumber>" |
| name="resolver-utils" |
| description="Fix PR threads in src/utils.ts" |
| prompt="[teammate instructions for file 1]" |
+--------------------------------------------------------------+
| Task #2: subagent_type="general-purpose" |
| team_name="pr-resolver-<prNumber>" |
| name="resolver-api" |
| description="Fix PR threads in src/api.ts" |
| prompt="[teammate instructions for file 2]" |
+--------------------------------------------------------------+
| Task #3: subagent_type="general-purpose" |
| team_name="pr-resolver-<prNumber>" |
| name="resolver-models" |
| description="Fix PR threads in src/models.ts" |
| prompt="[teammate instructions for file 3]" |
+--------------------------------------------------------------+
```
**Teammate prompt template:**
> **IMPORTANT:** Before spawning teammates, read the team config file at
> `~/.claude/teams/pr-resolver-<prNumber>/config.json` to get your own leader name.
> Inject that name into the prompt template below as `[leaderName]`.
```
You are a teammate on the "pr-resolver-<prNumber>" team.
Your job is to fix PR review threads and resolve them.
Repository: [owner]/[repo]
PR Number: [prNumber]
Branch: [branch]
Team Lead: [leaderName]
Your assigned threads (all in the same file):
Thread 1:
- Task ID: [taskId]
- Thread ID: [threadId]
- File: [path]
- Line: [line]
- Comment: [body]
- Author: @[author]
[...repeat for each thread in this file...]
Instructions for EACH thread:
1. Claim task: TaskUpdate(taskId: "[taskId]", owner: "<your-name>", status: "in_progress")
2. Read the file and understand the context
3. Make the fix requested in the comment
4. Commit: git add [path] && git commit -m "[type]([scope]): [description]"
5. Resolve thread on GitHub using gh CLI:
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "[threadId]"}) { thread { isResolved } } }'
6. Verify resolution succeeded
7. Mark completed: TaskUpdate(taskId: "[taskId]", status: "completed")
After all threads are done:
8. Check TaskList for any remaining unassigned tasks you can pick up
9. Send a message to the team lead reporting completion:
SendMessage(type: "message", recipient: "[leaderName]", content: "All threads resolved for [path]", summary: "Completed [path] threads")
```
**Parallelization rulesRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.