addressing-pr-feedback
npx machina-cli add skill oryanmoshe/agent-skills/addressing-pr-feedback --openclawAddressing PR Feedback
Overview
Fetch PR review comments, separate bot suggestions from human feedback, present a summary, then let the user select which comments to address.
Workflow
- Identify branch → from user input or
git branch --show-current - Find PR →
gh pr list --head <branch> --json number,title,url --jq '.[0]' - Fetch all comments → review comments, issue comments, review summaries
- Group by reviewer type → human reviewers (high priority) vs bots (suggestions)
- Present summary → counts, timestamps, outdated status
- User selects → checkbox multi-select via AskUserQuestion
- Fix selected → read file, apply fix, optionally reply to comment
Fetching Comments
# Inline review comments (on specific code lines)
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/comments
# General PR comments
gh api repos/{owner}/{repo}/issues/<PR_NUMBER>/comments
# Review summaries
gh api repos/{owner}/{repo}/pulls/<PR_NUMBER>/reviews
Key fields:
created_at— display as relative time ("2 hours ago")position— null means outdated (code changed since comment)in_reply_to_id— reply thread, group with parentpath— file the comment is on
Grouping Comments
| Category | Detection | Priority |
|---|---|---|
| Bot | Username contains [bot], ends with bot, or is a known CI tool | Lower — automated suggestions |
| Human | All other usernames | Higher — requires response |
Presenting Summary
## PR #123: "Add authentication flow"
### Human Reviewers (2 comments) — HIGH PRIORITY
- @alice: 1 comment on src/auth.ts (2 days ago)
- @bob: 1 comment on src/utils.ts (5 hours ago) ⚠️ OUTDATED
### Bot Suggestions (5 comments)
- 3 style/formatting (1 day ago)
- 2 potential improvements (1 day ago) ⚠️ 1 OUTDATED
Mark comments as ⚠️ OUTDATED when position is null (code changed since the comment was posted).
User Selection
Use AskUserQuestion with multiSelect: true:
Which comments do you want me to address?
[ ] @alice: "Consider adding error handling for timeout" (2 days ago)
[ ] @bob: "This function could be simplified" (5h ago) ⚠️ OUTDATED
[ ] bot: "Missing return type annotation" (3 similar, 1 day ago)
Group similar bot comments to reduce noise. Show relative timestamps. Mark outdated comments — the user may skip these.
Anti-Patterns
Dumping all comments raw: Always summarize and group first.
Treating all comments equally: Human comments get priority display over bot suggestions.
Open-ended questions: Use checkbox selection, not "which ones do you want me to fix?"
Fixing without asking: Always let the user select which comments to address.
Source
git clone https://github.com/oryanmoshe/agent-skills/blob/main/skills/addressing-pr-feedback/SKILL.mdView on GitHub Overview
Fetch PR review comments, separate bot suggestions from human feedback, and present a concise summary. Then you can select which items to address and apply fixes or replies directly in the PR.
How This Skill Works
The skill identifies your current branch, finds the related PR, and fetches all feedback (inline comments, general issue comments, and reviews). It then groups comments into Human vs Bot, shows a summary with counts and timestamps, and prompts you to select which items to address using a checkbox interface (AskUserQuestion). Finally, it reads the target files, applies chosen fixes, and can optionally reply to the corresponding comments.
When to Use It
- Review PR comments to understand reviewer feedback before making changes
- Address specific PR feedback and implement fixes in code
- Differentiate bot suggestions from human feedback to prioritize work
- Check what reviewers said across inline, general, and review comments
- Respond to or resolve selected comments in the PR after making changes
Quick Start
- Step 1: Identify your branch and run the skill (e.g., 'review PR' or 'address PR feedback')
- Step 2: The tool finds the PR and fetches all inline, general, and review comments
- Step 3: Select which comments to address, apply fixes, and optionally reply to comments
Best Practices
- Always present a grouped summary (Human vs Bot) before listing details
- Prioritize human reviews over bot suggestions in the initial display
- Use a multi-select checkbox (AskUserQuestion) to choose which comments to fix
- Mark outdated comments (position is null) and let the user decide
- Confirm fixes and optionally post replies to the original comments
Example Use Cases
- PR #123: resolve 2 human comments on src/auth.ts and src/utils.ts after a branch switch
- Bot suggestion to adjust formatting: group with other style comments and decide if action is needed
- Identify outdated review comments after code changes and skip them in the fix set
- PR with multiple reviewers: present human vs bot counts and guide focused fixes
- Apply a fix for a suggested improvement and reply to the bot comment with a short note