skills/github-workflow/skills/gh-pr-respond/SKILL.md
Use when viewing and responding to pull request review comments thread by thread.
npx skillsauth add dtsong/my-claude-setup gh-pr-respondInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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 <[email protected]>"
/gh-pr-status to see overall PR status/commit to commit fixes/git-push to update PR/gh-pr-merge when all comments resolvedtesting
Use to convert a Word .docx file to PDF and/or verify its page count. Triggers on: converting docx to pdf, rendering a document, checking how many pages a docx produces, or asserting a page-count constraint (e.g. a resume must stay 2 pages). Wraps LibreOffice headless conversion.
development
Security audit checklist for web applications. Use when reviewing, auditing, or hardening a web app's security posture. Covers rate limiting, auth headers, IP blocking, CORS, security middleware, input validation, file upload limits, ORM usage, and password hashing. Triggers on requests like "review security", "harden this app", "security audit", "check for vulnerabilities", or when building/reviewing API endpoints.
development
Interactive wizard to craft effective prompts using Claude Code best practices
tools
Use when batch labeling, prioritizing, and assigning GitHub issues during triage sessions.