gh-pr-review-responder
Original:🇺🇸 English
Translated
2 scriptsChecked / no sensitive code detected
GitHub PR review threads—KEEP/DISCARD triage, replies, KEEP-only code changes, lint/test/push. Open PRs only; not for creating PRs (create-pr-jp).
19installs
Sourcenoblejasper/agent-skills
Added on
NPX Install
npx skill4agent add noblejasper/agent-skills gh-pr-review-responderTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →GitHub PR Review Responder
Purpose
- Evaluate each review thread with KEEP vs DISCARD first (references/keep-discard-rubric.md) so low-value or out-of-scope feedback gets a clear, respectful reply without unnecessary code churn.
- Only KEEP items may lead to implementation work; DISCARD threads get a reply that states the decision and criteria, then resolve when appropriate.
- After KEEP code changes, verify and push per ADR 0002 (when defined).
pnpm lint && pnpm test - SKILL.md stays in English; GitHub replies match reviewer language (references/reply-templates.md).
When to Use
- "PR レビュー対応", "review comments", "address feedback", , triage with KEEP/DISCARD.
gh-pr-review-responder
Do Not Use When
- Opening or editing PR metadata only—use create-pr-jp.
- Commit/push only without review—use commit-jp / push.
- Branch behind base—use pull first.
Related Skills
- push: Publish commits after KEEP fixes.
- pull: Sync before push when needed.
- commit-jp: Japanese commits for fix commits if required.
- create-pr-jp: Does not apply to review threads; PR must already exist.
Prerequisites
- authenticated; Python 3 for scripts; open PR for current branch.
gh
Workflow
Run bundled scripts from the skill root (directory containing this ): and . From this repo’s git root, prefix with . If commands are not found, see references/skill-root-resolution.md.
SKILL.mdpython3 scripts/fetch_review_threads.py …python3 scripts/reply_review_thread.py …skills/gh-pr-review-responder/-
Auth:; stop if unauthenticated.
gh auth status -
Collect threads:
python3 scripts/fetch_review_threads.py --format markdown
(Optional:,--include-resolved,--include-outdated.)--pr NUMBER -
KEEP vs DISCARD (mandatory for each pending thread):
Use references/keep-discard-rubric.md. For each comment:- Factual accuracy — read the actual code; note misunderstandings.
- Severity — CRITICAL / IMPORTANT / LOW.
- Diff relevance — does it target this PR’s changed lines (use or equivalent; align with repo base branch).
git diff <base>...HEAD - Actionability — specific fix vs vague “consider…”.
-
Decision:
- DISCARD if the rubric says so (LOW, wrong fact, out-of-diff, linter-only, vague, oscillation risk, etc.).
→ Reply only using the DISCARD templates in references/reply-templates.md; do not change product code for this thread. Resolve thread when suitable. - KEEP if CRITICAL/IMPORTANT, accurate, diff-relevant, and actionable (or KEEP with explanation if already fixed).
→ Sub-triage:- — implement fix, then step 6.
needs_code_change - — explanation or “already in this PR”; no further code (templates §1–2).
keep_replied - — KEEP but cannot act without reviewer input (template §3).
needs_clarification
- DISCARD if the rubric says so (LOW, wrong fact, out-of-diff, linter-only, vague, oscillation risk, etc.).
-
Post replies:
python3 scripts/reply_review_thread.py --thread-id <ID> --body-file ...
IncludeorDecision: KEEPand reasoning in the body (see the §0 structure blocks in references/reply-templates.md). Top-level comments:Decision: DISCARD.gh pr commentwhen the thread is complete.--resolve -
Checks + push — run only if at least one KEEP thread required:
needs_code_change- when defined; else AGENTS.md / README /
pnpm lint && pnpm test.package.json - Fix until green; commit (commit-jp if required); .
git push
-
Post failures: report command, stderr, draft text.
-
Final report: Counts KEEP / DISCARD; per thread/
implemented/discard-replied/keep-replied-no-code/clarification; files changed; checks; push result.blocked
Present Results to User
- KEEP vs DISCARD summary table or counts.
- Explicit statement: no code was written solely for DISCARD threads.
Reply Quality Rules
- DISCARD replies must name which criterion failed (severity, fact, diff, actionability)—see rubric.
- KEEP replies tie to evidence: paths, commits, tests.
- Match reviewer language.
Troubleshooting
| Situation | Action |
|---|---|
| Scripts not found | skill-root-resolution.md |
| Unsure KEEP vs DISCARD | Re-read rubric; if still ambiguous, needs_clarification (not DISCARD by default) |
| See stderr; retry once |
Resources
- references/keep-discard-rubric.md — KEEP/DISCARD criteria (source of truth).
- references/reply-templates.md — structures + EN/JP templates including DISCARD.
- references/skill-root-resolution.md — path resolution if fails.
scripts/... - scripts/fetch_review_threads.py
- scripts/reply_review_thread.py