Agent skill
pr-review-workflow
Orchestrate incremental PR review feedback addressing with systematic triage and verification
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pr-review-workflow
SKILL.md
Skill: pr-review-workflow
What I do
I provide a structured workflow for handling pull request feedback. I guide you through fetching comments, triaging them into actionable tasks, and verifying fixes incrementally. This ensures no feedback is missed and the PR remains stable during updates.
When to use me
- When a reviewer has requested changes on your pull request.
- When you need to address a large number of comments across multiple files.
- When you want to ensure your PR is rebased and verified before final merge.
Core principles
- Triage before action. List every comment before you start changing code. This prevents context switching and missed items.
- Incremental updates. Address one concern at a time. Run tests and checks after each fix.
- Continuous verification. Use language server diagnostics and test suites to confirm each change.
- Individual accountability. Reply to every comment thread on GitHub. A general summary is not enough for reviewers.
- Fresh history. Keep your branch up to date with the target branch through regular rebasing.
Workflow
- Fetch feedback. Use
github-expertto retrieve all inline and general comments. - Triage items. Create a task list using
todowrite. Group related comments if they touch the same logic. - Address concerns. For each item, apply the fix. Use
respond-to-reviewfor the detailed implementation and evidence gathering. - Verify fixes. Run
lsp_diagnosticsand relevant tests. Do not wait until the end to find regressions. - Sync and push. Rebase onto the target branch once all items are addressed. Use
ghto reply to each thread before pushing. - Resolve threads. Resolve each addressed thread via GraphQL API.
- Final check. Run the
pre-mergechecklist to ensure the PR is ready for approval.
Patterns & examples
Fetching comments with github-expert:
# Get inline comments for a specific PR
gh api repos/{owner}/{repo}/pulls/{PR}/comments | jq '.[] | {id: .id, path: .path, line: .line, body: .body}'
Creating a triage list:
todowrite({
todos: [
{ content: "Fix typo in variable name in server.go", priority: "low", status: "pending" },
{ content: "Refactor database connection logic to use pooling", priority: "high", status: "pending" },
{ content: "Add missing unit test for error handling", priority: "medium", status: "pending" }
]
})
Replying to threads:
# Reply to a specific comment ID
gh api repos/{owner}/{repo}/pulls/{PR}/comments -X POST -f body="Addressed by extracting the function for better reuse." -F in_reply_to={comment_id}
Resolving threads via GraphQL:
# Get thread IDs
gh api graphql -f query='{
repository(owner: "OWNER", name: "REPO") {
pullRequest(number: NUM) {
reviewThreads(first: 50) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
databaseId
body
}
}
}
}
}
}
}'
# Resolve thread
gh api graphql -f query='mutation {
resolveReviewThread(input: {threadId: "THREAD_ID"}) {
thread {
isResolved
}
}
}'
Anti-patterns to avoid
- ❌ Bulk fixes. Making dozens of changes before running tests. This makes debugging regressions difficult.
- ❌ General replies. Posting a single "Done" comment at the PR level instead of replying to individual threads.
- ❌ Ignoring feedback. Not addressing or justifying why a requested change was rejected.
- ❌ Stale branches. Addressing feedback on an old version of the branch without rebasing.
- ❌ Replying to comments without resolving the thread. Forgetting to mark addressed threads as resolved.
KB Reference
~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Delivery/PR Review Workflow.md
Related skills
code-reviewer- For understanding the reviewer's perspective and performing your own reviews.respond-to-review- For the specific methodology of implementing and documenting individual feedback items.pre-merge- For final validation once all feedback is addressed.github-expert- For GitHub CLI operations and API queries.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?