tmaru-eng/strategy-bricks

resolve-ai-pr-reviews

Resolve PR review feedback from CodeRabbit and Gemini using the gh CLI. Use when asked to fetch AI review comments, summarize unresolved items in Japanese, implement fixes, manually resolve Gemini review threads, push changes, and request a new Gemini review with /gemini review.

First seen Jan 27, 2026

Installation

$ npx skills add tmaru-eng/strategy-bricks --skill resolve-ai-pr-reviews

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 tmaru-eng/strategy-bricks.

npx skills add tmaru-eng/strategy-bricks

Browse all from tmaru-eng/strategy-bricks

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 Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,405 B
  • docs SUMMARY.md 308 B

History

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

SKILL.md

Resolve AI PR Reviews

Overview

Triage AI PR feedback, fix code, close Gemini threads, and re-request review.

Workflow

1) Gather context

  • Identify repo owner/name and PR number.
  • Ask for direction when a comment conflicts with current policy or implementation.

2) Collect AI comments

  • Fetch both review comments and issue comments.
  • Filter authors matching coderabbitai or gemini (case-insensitive).
  • Track unresolved items only.
OWNER=$(gh repo view --json owner --jq .owner.login)
REPO=$(gh repo view --json name --jq .name)
PR=$(gh pr view --json number --jq .number) # or set PR explicitly

gh api repos/$OWNER/$REPO/pulls/$PR/comments --paginate --jq \
  '.[] | select(.user.login | test("coderabbitai|gemini"; "i")) |
   {id, user: .user.login, path, line, body, url: .html_url}'

gh api repos/$OWNER/$REPO/issues/$PR/comments --paginate --jq \
  '.[] | select(.user.login | test("coderabbitai|gemini"; "i")) |
   {id, user: .user.login, body, url: .html_url}'

3) Summarize and confirm decisions

  • Respond in Japanese.
  • Provide a concise update with these sections:

- Current status (AI comments scanned + unresolved count) - Unresolved list (file/path + action) - Commands executed - Decision request (if policy choice is needed)

4) Apply fixes and validate

  • Implement changes with minimal diffs and follow project conventions.
  • Run relevant tests/lint when feasible; state if skipped.

5) Resolve Gemini review threads

  • Do not resolve CodeRabbit threads (it auto-closes).
  • Resolve Gemini review threads manually after fixes are complete.
  • Before resolving a Gemini thread, add a short reply comment noting what was fixed

(e.g., "対応しました。: <summary>").

  • For Gemini feedback, always leave a reply comment and then resolve the thread.
THREAD_IDS=$(gh api graphql -f query='
query($owner:String!, $repo:String!, $number:Int!) {
  repository(owner:$owner, name:$repo) {
    pullRequest(number:$number) {
      reviewThreads(first:100) {
        nodes {
          id
          isResolved
          comments(first:50) {
            nodes { author { login } }
          }
        }
      }
    }
  }
}' -F owner=$OWNER -F repo=$REPO -F number=$PR --jq \
  '.data.repository.pullRequest.reviewThreads.nodes[] |
   select(.isResolved == false) |
   select([.comments.nodes[].author.login] | any(test("gemini"; "i"))) |
   .id')

for id in $THREAD_IDS; do
  gh api graphql -f query='
mutation($id:ID!) {
  resolveReviewThread(input: {threadId: $id}) {
    thread { isResolved }
  }
}' -F id=$id
done

6) Push and request re-review

  • Commit and push if appropriate for the repo workflow.
  • Post /gemini review on the PR after push.
  • /gemini review の後は時間がかかるため、ユーザーが確認してから再度スキルを実行する。
gh pr comment $PR --body "/gemini review"

7) Report back

  • Confirm fixes applied, tests run, Gemini threads resolved, and re-review requested.
  • List any remaining unresolved items or decisions.