Loading...
Loading...
Respond to PR review comments with critical evaluation. Use when addressing code review feedback, responding to bot review comments (Gemini Code Assist, CodeRabbit, etc.), or handling PR suggestions. Fetches comments, evaluates each against project context, applies valid fixes, declines invalid suggestions with reasoning, and posts responses.
npx skill4agent add ideoshi/skills pr-review-response/pr-review-response 42
/pr-review-response# If PR number given as argument, use it. Otherwise detect from branch:
BRANCH=$(git branch --show-current)
PR_NUMBER=$(gh pr list --head "$BRANCH" --json number --jq '.[0].number')
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')gh api "repos/${REPO}/pulls/${PR_NUMBER}/comments" --paginategh api "repos/${REPO}/pulls/${PR_NUMBER}/reviews" --paginateidpathlineoriginal_linebodydiff_hunkuser.loginin_reply_to_idAGENTS.mdCLAUDE.mdREADME.mdPR #42 — 3 review comments from gemini-code-assist[bot]
| # | File | Comment (summary) | Verdict | Reason |
|---|------------------|--------------------------------|---------|-------------------------------------------|
| 1 | package.json | module field wrong path | ACCEPT | Genuine bug — entry point is src/index.ts |
| 2 | tsconfig.json | Enable noUnusedLocals/Params | DECLINE | Intentionally relaxed for development |
| 3 | .gitignore | Commit bun.lock | ACCEPT | Correct — lockfiles should be committed |
Planned actions:
- Fix package.json module field
- Fix .gitignore to stop ignoring bun.lock
- Commit and push changes
- Post PR comment with responses to all 3 comments
Proceed? (changes will be committed and pushed)git add -A && git commit -m "address PR review: accept N, decline M comments"git pushBODY=$(cat <<'COMMENT'
## Review Response
### package.json — module field path ✅
Accepted. Fixed `module` from `index.ts` to `src/index.ts`. Good catch — the entry point was incorrect.
### tsconfig.json — strict unused checks ❌
Declined. `noUnusedLocals` and `noUnusedParameters` are intentionally disabled. During active development, unused variables are common as code evolves. This is a deliberate choice documented in project conventions, not an oversight.
### .gitignore — commit bun.lock ✅
Accepted. Removed `bun.lock` from `.gitignore`. Lockfiles should be committed for reproducible builds.
---
*2 accepted, 1 declined*
COMMENT
)
gh pr comment "$PR_NUMBER" --body "$BODY"# Reply to a specific review comment
gh api "repos/${REPO}/pulls/${PR_NUMBER}/comments/${COMMENT_ID}/replies" \
-f body="Accepted. Fixed in latest push — changed module field to \`src/index.ts\`."./skills/pr-review-response/scripts/watch-pr.sh 42
# or auto-detect:
./skills/pr-review-response/scripts/watch-pr.shscripts/watch-pr.sh