一键导入
pr-comments
Address, fix, and resolve PR review comments. Auto-fixes "claude fix" comments, handles actionable feedback, summarizes discussions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Address, fix, and resolve PR review comments. Auto-fixes "claude fix" comments, handles actionable feedback, summarizes discussions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run a discovery interview to gather requirements before planning a feature
Stages and commits changes while checking for repo location and branch safety.
Run all code quality checks for the current project including linting, formatting, and type checking. Supports Node.js, Python, Go, and Rust.
Ship changes by committing, pushing, and creating a PR to main.
Comprehensive UI design system and principles for building polished, professional interfaces. Use this skill whenever building or styling frontend components, pages, layouts, dashboards, forms, cards, navigation, tables, modals, buttons, or any user-facing HTML/CSS/React/Tailwind. Triggers include: creating new UI, reviewing or improving existing UI, choosing colors, spacing, typography, shadows, or layout strategies, fixing designs that look "off", and building design systems or component libraries. Apply these principles by default when generating any frontend code.
| name | pr-comments |
| description | Address, fix, and resolve PR review comments. Auto-fixes "claude fix" comments, handles actionable feedback, summarizes discussions. |
| disable-model-invocation | true |
| user-invocable | true |
| argument-hint | [PR# | owner/repo#PR | URL | empty for current branch] |
| allowed-tools | Bash, Read, Edit, Write, Grep, Glob, AskUserQuestion |
You are addressing review comments on a pull request. Your job is to:
After EVERY action, print a clear status update:
FIXED & RESOLVED: [file:line] - brief descriptionSKIPPED: [file:line] - reasonREPLIED: [file:line] - summaryREVIEWING: [file:line] - comment previewParse $ARGUMENTS to determine the PR. Supported formats:
123 → PR number in current repoowner/repo#123 → PR in specific repoowner/repo 123 → PR in specific repohttps://github.com/owner/repo/pull/123 → full URLIf arguments provided:
# For full URL - extract owner, repo, number from URL
# For owner/repo#123 - parse and use: gh pr view 123 --repo owner/repo
# For just number - use current repo: gh pr view 123
If no arguments:
gh pr view --json number,title,url,headRefName,baseRefName 2>/dev/null
If no PR found: Ask user to provide PR number or URL.
Get full PR info and repository context:
# Get repo info
gh repo view --json owner,name --jq '"\(.owner.login)/\(.name)"'
# Get PR details
gh pr view {number} --repo {owner/repo} --json number,title,url,headRefName,baseRefName,author,state
IMMEDIATELY show the user which PR you're working on:
PR IDENTIFIED
Repository: {owner}/{repo}
PR #: {number}
Title: {title}
Author: @{author}
Branch: {head} → {base}
Status: {state}
URL: {url}
Wait for this to display before proceeding. This confirms to the user exactly which PR will be modified.
Get review comments (comments on specific code lines):
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '.[] | {id, path, line: (.line // .original_line), body, user: .user.login, in_reply_to_id, pull_request_review_id, created_at, html_url}'
Get review threads to find thread IDs for resolving:
gh pr view {number} --json reviewDecision,reviews,comments
Also get pending review threads with their resolution status:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
isOutdated
path
line
comments(first: 10) {
nodes {
id
body
author { login }
createdAt
}
}
}
}
}
}
}' -f owner="{owner}" -f repo="{repo}" -F pr={number}
After fetching comments, show what you found:
COMMENTS FOUND: {total} unresolved threads
Found {total} unresolved comment threads:
AUTO-FIX ({count}) - Will address automatically
Comments containing "claude fix", "cf:", "@claude fix"
ACTIONABLE ({count}) - Need your decision
Direct code feedback and suggestions
DISCUSSION ({count}) - Informational only
Questions, praise, general conversation
Match comments containing (case-insensitive):
claude fixclaude: fix@claude fixcf: (shorthand at start of comment)claude,? (please)? fixComments that:
Comments that:
For each "claude fix" comment:
Print: REVIEWING: [{path}:{line}] - "{first 50 chars of comment}..."
Read the file and understand the context (read 20 lines around the comment)
Understand what fix is needed from the comment
Make the fix using Edit tool
Resolve the thread:
gh api graphql -f query='
mutation($threadId: ID!) {
resolveReviewThread(input: {threadId: $threadId}) {
thread { isResolved }
}
}' -f threadId="{thread_id}"
FIXED & RESOLVED: [{path}:{line}] - {what you fixed}For each actionable comment, present it clearly:
ACTIONABLE [{n}/{total}]
{path}:{line}
@{reviewer}
{full comment text}
Then use AskUserQuestion to ask:
Based on choice:
FIXED & RESOLVEDSKIPPED: [{path}:{line}] - User chose to skipgh api repos/{owner}/{repo}/pulls/{number}/comments/{comment_id}/replies -f body="{reply}"
Print REPLIED: [{path}:{line}]Print a summary of discussion comments (no action needed):
DISCUSSION COMMENTS (no action needed)
[{path}] @{user}: "{preview}..."
[General] @{user}: "LGTM!"
Ask if user wants to reply to any of these.
Print comprehensive summary:
FINAL SUMMARY - PR #{number}
FIXED & RESOLVED ({count})
[{path}:{line}] {description}
SKIPPED ({count})
[{path}:{line}] {reason if given}
REPLIED ({count})
[{path}:{line}]
DISCUSSION ({count}) - No action needed
NEXT STEPS:
{If changes were made:}
1. Review changes: git diff
2. Commit: git add . && git commit -m "address PR review comments"
3. Push: git push
{If no changes:}
All comments have been addressed or skipped. No code changes made.
gh is not authenticated: Tell user to run gh auth login$ARGUMENTS