addressing-pr-review-comments
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue) comments. Use when a PR has reviewer feedback to address, including code changes, style fixes, and documentation updates.
About this skill
This AI agent skill dramatically streamlines the Pull Request (PR) review process for contributors to the `streamlit/streamlit` open-source project. Designed specifically for Claude, it automates the tedious task of identifying, categorizing, and addressing feedback from reviewers. The skill intelligently processes both inline code comments and general PR discussion comments, offering options to generate and apply necessary code changes, style corrections, or documentation updates. By leveraging the `gh` (GitHub CLI), it ensures seamless and authenticated interaction with the GitHub repository, significantly accelerating the iteration cycle and helping maintain high code quality within the Streamlit framework.
Best use case
Developers contributing to the `streamlit/streamlit` repository who need an efficient way to manage and resolve feedback received on their open Pull Requests. It helps systematically address reviewer comments, generate code fixes, and draft replies, reducing manual effort during the PR review cycle.
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue) comments. Use when a PR has reviewer feedback to address, including code changes, style fixes, and documentation updates.
A clear, categorized summary of all actionable review comments on the PR for the current branch. Proposed solutions or executed code changes, style fixes, and documentation updates based on selected comments. The option to draft and post replies to comments directly from the agent. A more efficient and thoroughly addressed Pull Request, ready for re-review or merging, with reduced manual intervention.
Practical example
Example input
Hey Claude, can you help me address the review comments on my current PR in the `streamlit/streamlit` repo?
Example output
{"Agent": "I'm ready to help you address comments on your current PR for the `streamlit/streamlit` repository.", "status": "Checking GitHub authentication...", "authentication_status": "Success. Logged in as `your_github_username`.", "pr_status": "Fetching PR details for your current branch...", "pr_found": true, "pr_number": "12345", "pr_title": "Fix: Improve error handling in data upload", "comment_analysis": [{"id": "comment_1", "type": "Code Change (Suggested)", "location": "src/utils.py:L78", "summary": "Refactor `load_data` to handle empty file input more gracefully.", "actionable": true, "suggested_fix_action": "I can propose a `try-except` block modification."}, {"id": "comment_2", "type": "Style Fix", "location": "src/main.py:L12", "summary": "Remove trailing whitespace on line.", "actionable": true, "suggested_fix_action": "I can automatically apply this fix."}, {"id": "comment_3", "type": "Documentation Update", "location": "README.md", "summary": "Add a note about new configuration parameter `enable_cache`.", "actionable": true, "suggested_fix_action": "I can draft a documentation update for you."}, {"id": "comment_4", "type": "Question", "location": "General PR comment", "summary": "Could you elaborate on the performance implications of this change?", "actionable": true, "suggested_response_action": "I can help draft a detailed reply."}], "next_steps_prompt": "I have identified 4 actionable comments. Which ones would you like me to address? You can specify by ID (e.g., '1, 3'), type (e.g., 'all code changes'), or ask me to draft replies for specific questions."}When to use this skill
- When your Pull Request in `streamlit/streamlit` has received review comments (code suggestions, style feedback, documentation updates, or general questions).
- When you want to quickly identify, categorize, and prioritize all actionable feedback from reviewers.
- When you need an AI to assist in generating code changes, applying fixes directly, or drafting replies to comments.
- To streamline the iteration process on a PR, ensuring all reviewer concerns are addressed efficiently before re-review or merging.
When not to use this skill
- When the PR is not within the `streamlit/streamlit` GitHub repository.
- When the PR has no active review comments to address.
- When the AI agent lacks the necessary `gh` CLI authentication or permissions to interact with the repository.
- For tasks unrelated to PR review comment resolution, such as initial feature development, project setup, or complex architectural design decisions.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/addressing-pr-review-comments/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How addressing-pr-review-comments Compares
| Feature / Agent | addressing-pr-review-comments | Standard Approach |
|---|---|---|
| Platform Support | Claude | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | easy | N/A |
Frequently Asked Questions
What does this skill do?
Address all valid review comments on a PR for the current branch in the streamlit/streamlit repo. Covers both inline review comments and general PR (issue) comments. Use when a PR has reviewer feedback to address, including code changes, style fixes, and documentation updates.
Which AI agents support this skill?
This skill is designed for Claude.
How difficult is it to install?
The installation complexity is rated as easy. You can find the installation instructions above.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
Top AI Agents for Productivity
See the top AI agent skills for productivity, workflow automation, operational systems, documentation, and everyday task execution.
SKILL.md Source
# Address PR Comments
Address actionable review comments on the PR for the current branch using `gh` CLI.
## Workflow checklist
Copy and track progress:
```
- [ ] 1. Verify auth: gh auth status
- [ ] 2. Fetch PR data and comments
- [ ] 3. Analyze and categorize comments
- [ ] 4. Present options to user
- [ ] 5. Apply selected fixes
- [ ] 6. Show summary, next steps, and offer to post replies
```
### 1. Verify authentication
```bash
gh auth status
```
If auth fails, prompt user to run `gh auth login`.
### 2. Fetch PR data
You must fetch both inline review comments and general PR (issue) comments. Use both when building the list of feedback to address. General comments have no file or line. Treat them as PR-level feedback.
```bash
# PR details for current branch (extract PR number from here)
gh pr view --json number,title,url,state,author,headRefName,baseRefName,reviewDecision,reviews,comments
# Inline review comments with file/line info (--paginate fetches all pages)
gh api --paginate repos/streamlit/streamlit/pulls/{PR_NUMBER}/comments
# General PR discussion comments (--paginate fetches all pages)
gh api --paginate repos/streamlit/streamlit/issues/{PR_NUMBER}/comments
```
Get unresolved review threads via GraphQL (inline only; used for file/path/line). The query returns the first comment of each thread for display when listing threads; full comment bodies are already fetched via the REST `pulls/{PR_NUMBER}/comments` and `issues/{PR_NUMBER}/comments` APIs above. Note: `reviewThreads(first: 100)` returns at most 100 threads; for PRs with more unresolved threads, use cursor-based pagination (`pageInfo.hasNextPage` / `endCursor`) or rely on the REST comments list.
```bash
gh api graphql -f query="
{
repository(owner: \"streamlit\", name: \"streamlit\") {
pullRequest(number: {PR_NUMBER}) {
reviewThreads(first: 100) {
nodes {
isResolved
path
line
comments(first: 1) {
nodes { author { login } body }
}
}
}
}
}
}" --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)]'
```
Issue comments (from `issues/{PR_NUMBER}/comments`) do not have a "resolved" flag. Consider all issue comments when building the actionable list, including the PR author's. Author comments can add useful context.
**Tip:** Save outputs for later reference if the data falls out of context: `work-tmp/reviews/pr-{PR_NUMBER}-review-threads.json` for inline threads, and `work-tmp/reviews/pr-{PR_NUMBER}-issue-comments.json` for general PR comments.
### 3. Analyze comments
**Include:** Unresolved threads (inline), general PR comments from `issues/{PR}/comments`, `issue`/`todo`/`chore` comments, maintainer feedback, `CHANGES_REQUESTED` reviews. Include the PR author's comments when present. They can help clarify the problem space.
**Exclude:** Resolved threads, `praise`/`thought`/`note` comments
**Skip status-only automated comments.** Ignore comments that are only status or check notifications with no actionable feedback. Examples: Snyk ("Snyk checks have passed. No issues have been found so far.") and comments from `.github/workflows/pr-preview.yml` that only say the PR is building or the preview is ready.
**Include substantive bot feedback.** Include automated comments that contain actual review feedback. For example, AI review comments from the `github-actions` bot. Treat them like other review comments and validate before acting. Bot suggestions can be false positives.
**General PR comments:** Analyze general PR comments (from `issues/{PR}/comments`) the same way as inline comments. Same include/exclude rules and conventional-comment types (`issue` / `todo` / `chore` / `suggestion` / etc.).
**Critical analysis:** Before categorizing a comment or suggesting a response, thoroughly investigate the code and context:
- **Read the code:** Carefully read the relevant code sections mentioned in the comment, including surrounding logic.
- **Challenge assumptions:** Do not take the reviewer's comment or the original code's correctness for granted. Question both.
- **Seek the truth:** Determine the most correct outcome—whether that means siding with the reviewer, defending the code, or proposing a new solution.
- **Verify bot comments:** Bot suggestions may be false positives. Always validate the issue exists before acting.
- **General comments without file/line:** If a comment does not reference a file or line, infer scope from the text (e.g. "add a test" points to a test file, "update the doc" to docs). If scope is unclear, list possible locations when presenting options.
**Action types** (per [conventional comments](https://conventionalcomments.org)): `issue` / `todo` / `chore` (must fix) · `suggestion` (consider) · `nitpick` (optional) · `question` (clarify) · `praise` / `thought` / `note` (skip)
### 4. Present options
The list below combines actionable inline comments and general PR comments. For general comments use "(general)" or "PR-level" instead of `{file_path}:{line}`.
```
Found {N} actionable comments ({X} inline, {Y} general) on PR #{NUMBER}: {TITLE}
Review Decision: {APPROVED|CHANGES_REQUESTED|REVIEW_REQUIRED}
Actionable Items:
─────────────────────────────────────────────────────────
1. [issue] {file_path}:{line}
@{reviewer}: "{comment text}"
Action: {what will be done}
2. [todo] (general)
@{reviewer}: "{comment text}"
Action: {what will be done}
3. [chore] (general)
@{reviewer}: "{comment text}"
Action: {what will be done}
4. [suggestion] {file_path}:{line}
@{reviewer}: "{comment text}"
Action: {what will be done} (optional)
5. [nitpick] {file_path}:{line}
@{reviewer}: "{comment text}"
Action: {what will be done} (optional)
6. [question] (general)
@{reviewer}: "{comment text}"
Action: Clarify with user
Skipped: {N} items (praise/thought/note)
─────────────────────────────────────────────────────────
Which items should I address?
Recommended: "1,2,3" (required items)
Options: "1-5" | "all" | "1,2,3" | "skip 4,5"
```
### 5. Apply fixes
For each selected item:
1. Read the affected file (for general comments, infer from comment content; see below)
2. Assess complexity - flag high-complexity fixes to user instead of applying
3. Apply minimal fix
4. Prepare brief reply text for the PR comment
For general (non-inline) comments there is no path or line on the comment. Infer the affected file from the comment content, or treat as PR-level (e.g. "update README", "add a test"). If the target is unclear, list options and let the user choose before applying.
**High-complexity fixes:** If a fix requires large refactors, new abstractions, or risky changes disproportionate to the comment, stop and present the trade-off to the user. Let them decide whether to proceed, push back, or find a simpler approach.
### 6. Summary
```bash
git status --short
git diff --stat
```
Report:
- Changes per comment with suggested reply text
- Remaining unaddressed comments
- Skipped items (questions, bot false positives)
- Next steps: `git add`, `git commit -m "fix: address PR review comments"`, `git push`
**Example summary:**
```
─────────────────────────────────────────────────────────
Summary of Changes
─────────────────────────────────────────────────────────
Addressed 4 of 6 comments:
✅ #1 [issue]: Fixed null check in utils.py
Reply: "Added null check as suggested. Good catch!"
✅ #2 [chore] (general): Updated README as requested
Reply: "Done, README updated."
✅ #3 [nitpick]: Renamed variable to snake_case
Reply: "Fixed, thanks for the consistency note."
✅ #4 [todo]: Added docstring to function
Reply: "Added comprehensive docstring."
⏭️ #5 [question]: Skipped - requires your input
Question: "Should this handle the edge case of empty lists?"
🤖 #6 [suggestion] (bot): Skipped - false positive
Bot suggested: "Variable may be undefined"
Reason: Variable is always initialized in the preceding block
─────────────────────────────────────────────────────────
Files modified:
lib/streamlit/utils.py | 15 +++++++++------
Next steps:
git add -A
git commit -m "fix: address PR review comments"
git push
─────────────────────────────────────────────────────────
Post Replies to PR Comments? (optional, after push)
Options: "all" | "bots" (skip humans) | "1,2,3" | "skip"
```
To post a reply to a review comment:
```bash
# For inline review comments (use the comment ID from the API response)
gh api repos/streamlit/streamlit/pulls/{PR_NUMBER}/comments/{COMMENT_ID}/replies \
-f body="Your reply text here"
# For general PR discussion comments
gh api repos/streamlit/streamlit/issues/{PR_NUMBER}/comments \
-f body="@{reviewer} Re: {brief context} - {reply text}"
```
## Rules
- **Both sources**: Consider both inline review comments and general PR comments when building the list of feedback to address.
- **Minimal fixes**: Address exactly what was requested
- **Flag complexity**: If a fix requires significant refactoring, flag it to user first
- **Verify bot comments**: Always validate before acting
- **Preserve intent**: Don't change unrelated code
- **Reply suggestions**: Provide brief, professional reply text for each addressed comment
- **Skip**: Resolved threads, info-only comments, praise, incorrect bot suggestions, and status-only automated comments (e.g. Snyk "checks passed", pr-preview build status).
## Error handling
| Issue | Solution |
|-------|----------|
| Auth failed | `gh auth login` |
| No PR for branch | `gh pr list --head $(git branch --show-current)` |
| No comments | "No actionable comments found" |
| File not found | Comment may reference deleted/moved file |
| Rate limited | Wait and retry |
| Uncommitted changes | Warn user first |Related Skills
fixing-streamlit-ci
Analyze and fix failed GitHub Actions CI jobs for the current branch/PR. Use when CI checks fail, PR checks show failures, or you need to diagnose lint/type/test errors and verify fixes locally.
fixing-flaky-e2e-tests
Diagnose and fix flaky Playwright e2e tests. Use when tests fail intermittently, show timeout errors, have snapshot mismatches, or exhibit browser-specific failures.
finalizing-pr
Finalizes branch changes for merging by simplifying code, running checks, reviewing changes, and creating a PR if needed. Use when ready to merge changes into the target branch.
discovering-make-commands
Lists available make commands for Streamlit development. Use for build, test, lint, or format tasks.
debugging-streamlit
Debug Streamlit frontend and backend changes using make debug with hot-reload. Use when testing code changes, investigating bugs, checking UI behavior, or needing screenshots of the running app.
creating-pull-requests
Creates a draft pull request on GitHub with proper labels, branch naming, and description formatting. Use when changes are ready to be submitted as a PR to the streamlit/streamlit repository.
checking-changes
Validates all code changes before committing by running format, lint, type, and unit test checks. Use after making backend (Python) or frontend (TypeScript) changes, before committing or finishing a work session.
assessing-external-test-risk
Assesses whether branch or PR changes are high-risk for externally hosted or embedded Streamlit usage and recommends whether external e2e coverage with `@pytest.mark.external_test` is needed. Use during code review, PR triage, or test planning when changes touch routing, auth, websocket/session behavior, embedding, assets, cross-origin behavior, SiS/Snowflake runtime, storage, or security headers.
gh-review-requests
Fetch unread GitHub notifications for open PRs where review is requested from a specified team or opened by a team member. Use when asked to "find PRs I need to review", "show my review requests", "what needs my review", "fetch GitHub review requests", or "check team review queue".
code-reviewer
Elite code review expert specializing in modern AI-powered code
ui-demo
Record polished UI demo videos using Playwright. Use when the user asks to create a demo, walkthrough, screen recording, or tutorial video of a web application. Produces WebM videos with visible cursor, natural pacing, and professional feel.
microsoft-docs
Query official Microsoft documentation to find concepts, tutorials, and code examples across Azure, .NET, Agent Framework, Aspire, VS Code, GitHub, and more. Uses Microsoft Learn MCP as the default, with Context7 and Aspire MCP for content that lives outside learn.microsoft.com.