From davidshaevel-claude-toolkit
Use when a pull request has received code review comments from gemini-code-assist and you need to read the feedback, fix or decline each item, reply in comment threads, and post a summary
How this skill is triggered — by the user, by Claude, or both
Slash command
/davidshaevel-claude-toolkit:resolve-code-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Read code review feedback on a pull request, resolve each item, reply in comment threads, and post a summary comment. Follows the PR conventions in CLAUDE.md.
Read code review feedback on a pull request, resolve each item, reply in comment threads, and post a summary comment. Follows the PR conventions in CLAUDE.md.
Complementary skill: superpowers:receiving-code-review — use it alongside this one to ensure technical rigor when evaluating feedback.
/resolve-code-review [PR_NUMBER]
If no PR number is provided, detect from the current branch with gh pr view --json number -q .number.
digraph resolve_review {
rankdir=TB;
fetch [label="1. Fetch PR comments" shape=box];
read [label="2. Read & categorize each comment" shape=box];
fix [label="3. Implement fixes" shape=box];
reply [label="4. Reply in each comment thread" shape=box];
summary [label="5. Post summary comment" shape=box];
push [label="6. Push fixes" shape=box];
fetch -> read -> fix -> reply -> summary -> push;
}
Detect the repo owner/name from the current git remote (do not hardcode).
Permission compatibility: Always run
ghcommands as standalone statements — never chain with&&or wrap in$()variable assignments in the same Bash call. Claude Code's shell-aware permission matching evaluates each part of a chain independently, soREPO=$(gh repo view ...) && echo "$REPO"won't match aBash(gh repo view *)permission even though theghcommand itself would. Instead, run theghcommand alone and capture the tool result.
gh repo view --json nameWithOwner -q .nameWithOwner
Store the result as REPO for subsequent commands.
Fetch review context:
gh pr view <PR> --repo ${REPO} --comments
gh pr diff <PR> --repo ${REPO}
Fetch ALL inline comments with pagination (default per_page is 30 — PRs with many review rounds will have more):
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | {id, in_reply_to_id, line, path, body, created_at, pull_request_review_id, user: .user.login}]'
If the response has 100 items, there may be more pages. Use --paginate to get all:
gh api "repos/${REPO}/pulls/<PR>/comments" --paginate \
--jq '[.[] | {id, in_reply_to_id, line, path, body, created_at, pull_request_review_id, user: .user.login}]'
Find unreplied comments using two separate queries with positive-match selectors only.
zsh compatibility: Never use
!=in jq expressions passed via--jq— zsh interprets!as history expansion and the command will fail. Always use positive==selectors in separate queries instead.
# Step 1: Get all original Gemini comments (not replies)
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.in_reply_to_id == null) | select(.user.login == "gemini-code-assist[bot]") | {id, path, created_at, body_preview: (.body[0:120])}]'
# Step 2: Get IDs already replied to by dshaevel
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.in_reply_to_id > 0) | select(.user.login == "dshaevel") | .in_reply_to_id]'
# Step 3: Compare — any ID in Step 1 not in Step 2 is unreplied
To fetch the full body of specific unreplied comments by ID:
gh api "repos/${REPO}/pulls/<PR>/comments?per_page=100" \
--jq '[.[] | select(.id == 12345 or .id == 67890) | {id, path, line, body}]'
Alternatively, fetch comments for the latest review specifically:
# Get the latest gemini review ID and summary
gh api "repos/${REPO}/pulls/<PR>/reviews" \
--jq '[.[] | select(.user.login == "gemini-code-assist[bot]")] | last | {id, body, state}'
# Fetch only that review's inline comments
REVIEW_ID=<id-from-above>
gh api "repos/${REPO}/pulls/<PR>/reviews/${REVIEW_ID}/comments" \
--jq '[.[] | {id, line, path, body, created_at}]'
If the review has a top-level summary comment (gemini-code-assist often posts one), read it first to understand the overall assessment.
For each review comment:
Rules:
For each item being fixed:
Group related fixes into a single commit when they address the same concern.
Reply in the comment thread (not top-level). Every reply MUST:
@gemini-code-assist (required for notification)gh api repos/${REPO}/pulls/<PR>/comments/<COMMENT_ID>/replies \
-f body="@gemini-code-assist Fixed. Changed X to Y."
After all items are resolved, post a top-level PR comment:
gh pr comment <PR> --body "$(cat <<'EOF'
@gemini-code-assist Review addressed:
| # | Feedback | Resolution |
|---|----------|------------|
| 1 | Issue X | Fixed in <commit> - Description of fix |
| 2 | Issue Y | Declined - Technical reasoning |
EOF
)"
Resolution column format: Include both the commit reference AND a brief summary.
Push fixes to the PR branch so the reviewer can verify.
git push
npx claudepluginhub davidshaevel-dot-com/davidshaevel-marketplace --plugin davidshaevel-claude-toolkitProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.