laststance/skills

coderabbit-resolver

CodeRabbit PR loop

First seen Feb 13, 2026

Installation

$ npx skills add laststance/skills --skill coderabbit-resolver

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from laststance/skills · top by installs.

npx skills add laststance/skills

Browse all from laststance/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Declared
Codex Declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
License LICENSE
Default branch main
Open issues 3
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code cursor codex

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 7,777 B
  • docs SUMMARY.md 45 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 51 installs

SKILL.md

Codex Compatibility

When running this skill in Codex, translate Claude Code-only primitives before acting: AskUserQuestion -> chat/requestuserinput, TodoWrite -> updateplan, Task/TaskCreate/TeamCreate/SendMessage -> spawnagent/sendinput/waitagent when available and allowed, and EnterPlanMode/ExitPlanMode -> a concise chat plan plus explicit approval. Resolve Read/Write/Edit/Bash/WebSearch/WebFetch to Codex file/shell/web tools, and map ~/.claude/... paths to ~/.agents/... or ~/.codex/... unless the task explicitly targets Claude Code.

Cursor Compatibility

When running this skill in Cursor Agent, translate Claude Code-only primitives before acting: AskUserQuestion -> AskQuestion; TodoWrite -> Cursor TodoWrite or an equivalent checklist; Task/TaskCreate/TeamCreate/SendMessage/multi-agent flows -> Cursor Task (subagents), parallel Tasks, or runinbackground when allowed (TeamCreate/SendMessage may have no exact match); EnterPlanMode/ExitPlanMode -> Plan mode (SwitchMode / CreatePlan) plus explicit user approval. Resolve Read/Write/Edit/StrReplace/Bash/web/search/MCP via Cursor Composer or Agent equivalents. MCP names written as mcpservertool typically map to callmcptool with configured server identifiers. Map ~/.claude/... to ~/.cursor/skills/, .cursor/skills/, and .cursor/rules/ unless the task explicitly targets Claude Code.

<essential_principles>

How This Skill Works

Automates the iterative CodeRabbit review loop on a GitHub PR until all review comments are resolved and CI is green, then merges and cleans up.

Principle 1: GraphQL-Only Thread Resolution

GitHub has NO REST API for resolving review threads. You MUST use the GraphQL resolveReviewThread mutation with PRRT_-prefixed thread IDs. The mutation is idempotent — safe to call on already-resolved threads.

Outside-diff findings live in review bodies and have no resolvable thread ID. Track their disposition and evidence in the audit table; zero unresolved inline threads does not prove these findings are addressed.

Principle 2: Iterative Loop Until Clean

The workflow runs in a loop:

  1. Extract unresolved CodeRabbit inline threads AND all CodeRabbit review bodies, including older outside-diff findings
  2. Verify each finding against current code; fix issues or record why already fixed/skipped, and resolve applicable inline threads
  3. Commit → Push → Wait for CI + CodeRabbit re-review
  4. Re-fetch both sources after every re-review and before merge. Repeat until: zero unresolved threads AND zero unaudited/unaddressed outside-diff findings AND all CI checks pass AND CodeRabbit check on current HEAD is completed + success

Principle 3: Validation Before Every Push

Run pnpm validate (or project-specific validation) before every commit. Never push broken code.

Principle 4: Safe Merge and Cleanup

Only merge when ALL conditions are met: CI green, no unresolved threads, every outside-diff finding has a current-code disposition with evidence, and CodeRabbit check is completed + success on the current HEAD commit. check-ci-status.sh does not audit outside-diff findings; its exit 0 cannot replace that audit. After merge, delete remote branch and prune local.

Principle 5: Rate Limit Handling — Comment-First, API-Status Second

CodeRabbit may hit API rate limits and post a rate-limit warning comment instead of running a real review. Critically, the GitHub Checks API still reports completed/success for that case — there's no API-only signal to distinguish a real review from a rate-limit response. Trusting the Checks API alone leads to merging unreviewed PRs.

Therefore: every "CodeRabbit success" must be cross-validated against the latest CodeRabbit issue comment. If the latest comment matches a rate-limit pattern (e.g. "Rate limit exceeded", "wait X minutes before requesting another review"), the run is rate-limited regardless of API status.

check-ci-status.sh performs this comment-content check internally and returns exit 3 when a rate-limit notice is detected. The workflow's Step 6a treats exit 3 as "go to rate-limit handling," and Step 8 (Final Verification) treats exit 3 as "do not merge." This makes the rate-limit gate impossible to skip.

When detected, the workflow waits for the rate-limit window to expire (+ 30s buffer), then posts @coderabbitai full review to trigger a complete re-review. Max 3 rate-limit retries per PR to prevent infinite loops.

Principle 6: Long Waits Use ScheduleWakeup, Not sleep

Top-level sleep is blocked by Claude Code's Bash policy and burns the 5-minute prompt cache. **Internal sleep inside scripts/*.sh is fine** — Claude sees the script as a single command. But when YOU (the agent) need to wait between steps without a script wrapper (e.g., letting CodeRabbit post comments after a check completes), use ScheduleWakeup with a continuation prompt that re-enters the workflow. Never write sleep 180; gh api ... as a top-level Bash command. </essential_principles>

<intake> This skill accepts a PR number or --bulk flag as argument. Usage:

/coderabbit-resolver <PR_NUMBER>       # Process single PR
/coderabbit-resolver 17                # Process PR #17
/coderabbit-resolver --bulk            # Process ALL open PRs (oldest first)

If no PR number provided (and no --bulk), detect from current branch:

gh pr view --json number -q .number

After obtaining the PR number, read and follow workflows/review-loop.md. If --bulk is specified, read and follow workflows/bulk-loop.md. </intake>

<routing>

Input Action
PR number provided Read workflows/review-loop.md and execute with that PR
No PR number Auto-detect from current branch, then read workflows/review-loop.md
--bulk flag Read workflows/bulk-loop.md and process all open PRs

After reading the workflow, follow it exactly. </routing>

<reference_index>

References

All in references/:

File Content
github-graphql-api.md GraphQL queries/mutations for thread resolution, CI status checks
coderabbit-commands.md CodeRabbit bot commands and behavior reference

</reference_index>

<workflows_index>

Workflows

All in workflows/:

Workflow Purpose
review-loop.md The main iterative review-fix-resolve-merge loop (single PR)
bulk-loop.md Process all open PRs sequentially (oldest first), merging each

</workflows_index>

<scripts_index>

Scripts

Script Purpose
resolve-threads.sh Resolve all unresolved CodeRabbit threads on a PR
check-ci-status.sh Check CI and CodeRabbit review status for a PR
wait-for-ratelimit.sh Detect CodeRabbit rate limit, wait for expiry, trigger full review

</scripts_index>

<success_criteria> A successful coderabbit-resolver invocation (single PR):

  • All CodeRabbit review threads resolved (zero unresolved)
  • All outside-diff review body findings audited against current HEAD: FIXED with evidence or SKIPPED with a reason; none unaudited or NOT_FIXED
  • All CI checks passing (green), including fixes for unrelated CI failures
  • CodeRabbit review status is complete
  • PR merged successfully
  • Remote branch deleted
  • Local branch cleaned up (switched to main, pruned)

A successful --bulk invocation:

  • All open PRs processed (oldest first)
  • Each PR either MERGED or SKIPPED (with reason)
  • Summary report generated with results table

</success_criteria>