用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill github-pr-respond命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | github-pr-respond |
| description | View and respond to PR review comments Use when this capability is needed. |
| metadata | {"author":"dtsong"} |
owner/repo format with alphanumeric characters and hyphens only.View and respond to review comments on a pull request.
/gh-pr-respond # Show comments on current PR
/gh-pr-respond 123 # Show comments on PR #123
/gh-pr-respond --unresolved # Show only unresolved threads
/gh-pr-respond --mine # Show comments requiring my response
# Get PR for current branch
PR_NUM=$(gh pr view --json number -q '.number' 2>/dev/null)
# Get review comments
gh api repos/{owner}/{repo}/pulls/$PR_NUM/comments
# Get reviews with comments
gh pr view $PR_NUM --json reviews,reviewThreads
Using GitHub MCP:
mcp__github__get_pull_request_comments(owner, repo, pr_number)
mcp__github__get_pull_request_reviews(owner, repo, pr_number)
Organize by:
For each comment:
Review Comments for PR #123
4 comments total, 2 unresolved
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
UNRESOLVED (2)
[1] src/components/Theme.tsx:45 - @reviewer1 (1 day ago)
Status: Unresolved | Type: Suggestion
Code:
│ 44 const theme = useTheme();
│ 45 const colors = getColors(theme);
│ 46 const styles = createStyles(colors);
Comment:
"Consider memoizing this with useMemo to prevent
recalculation on every render."
Suggested response:
A) Apply fix: Add useMemo wrapper
B) Reply: Explain why memoization isn't needed
C) Reply: Ask for clarification
[Apply Fix] [Reply] [Resolve]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[2] src/hooks/useTheme.ts:12 - @reviewer2 (6 hours ago)
Status: Unresolved | Type: Bug
Code:
│ 11 useEffect(() => {
│ 12 const listener = window.matchMedia('...').addEventListener(...);
│ 13 }, []);
Comment:
"This event listener is never cleaned up, which will
cause a memory leak. Add a cleanup function."
Suggested fix:
```typescript
useEffect(() => {
const mql = window.matchMedia('...');
const handler = (e) => { ... };
mql.addEventListener('change', handler);
return () => mql.removeEventListener('change', handler);
}, []);
```
[Apply Fix] [Reply] [Resolve]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
RESOLVED (2)
[3] src/styles/theme.css:23 - @reviewer1
"Consider using CSS custom properties"
✓ Resolved by @you: "Applied - using CSS variables now"
[4] README.md:45 - @reviewer2
"Update documentation for dark mode"
✓ Resolved by @you: Fixed in commit abc1234
When choosing to apply a fix:
Applying fix for comment [2]...
File: src/hooks/useTheme.ts
Changes:
- Added cleanup function to useEffect
- Event listener properly removed on unmount
Modified code:
│ 11 useEffect(() => {
│ 12 const mql = window.matchMedia('(prefers-color-scheme: dark)');
│ 13 const handler = (e: MediaQueryListEvent) => setTheme(e.matches ? 'dark' : 'light');
│ 14 mql.addEventListener('change', handler);
│ 15 return () => mql.removeEventListener('change', handler);
│ 16 }, []);
Next steps:
1. Review the change
2. /commit to commit the fix
3. /git-push to update PR
4. Reply to the comment (optional)
Reply to @reviewer2's comment:
Original comment:
"This event listener is never cleaned up..."
Your reply:
> Good catch! I've added a cleanup function in the latest commit (abc1234).
> Let me know if there's anything else.
[Send Reply] [Edit] [Cancel]
Respond to all unresolved comments:
Summary of changes made:
[1] Added useMemo for theme calculation
[2] Added useEffect cleanup function
Would you like to:
A) Commit all fixes together
B) Reply to each comment individually
C) Resolve all as "addressed in latest commit"
| Comment Type | Suggested Response |
|---|---|
| Bug/Error | Fix the code, commit, reference commit |
| Suggestion | Apply if good, or explain why not |
| Question | Answer clearly, add context |
| Nitpick | Apply or discuss |
| Blocking | Must address before merge |
When committing fixes:
git commit -m "Address review feedback
- Add useMemo for theme calculation (comment #1)
- Add useEffect cleanup function (comment #2)
Co-Authored-By: Claude <noreply@anthropic.com>"
/gh-pr-status to see overall PR status/commit to commit fixes/git-push to update PR/gh-pr-merge when all comments resolvedConverted and distributed by TomeVault — claim your Tome and manage your conversions.