skills/gh-address-comments/SKILL.md
Fetch all review comments and threads on the current branch's open GitHub PR using the gh CLI, present a numbered summary, and address the ones the user selects.
npx skillsauth add euxx/claude-skills-for-copilot gh-address-commentsInstall 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.
Fetch all review comments for the current branch's open PR, present a numbered summary, and apply fixes for the comments the user selects.
Verify gh authentication before doing anything else:
gh auth status
If unauthenticated, ask the user to run gh auth login, then stop.
# if the user specified a PR number or URL:
gh pr view <number-or-url> --json number,url,headRefName
# otherwise (current branch):
gh pr view --json number,url,headRefName
Extract owner and repo from the returned url field — PR URLs have the form https://github.com/<owner>/<repo>/pull/<number>, so split on / to get the 4th and 5th segments. These are the base (target) repository coordinates, and are reliable even for cross-fork PRs.
Run the following to get all review threads (inline) and conversation comments:
gh api graphql -f query='
query($owner:String!, $repo:String!, $number:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$number) {
number url title state
comments(first:100) {
nodes { id body author { login } createdAt }
}
reviews(first:100) {
nodes { id state body author { login } submittedAt }
}
reviewThreads(first:100) {
nodes {
id isResolved isOutdated path line
comments(first:100) {
nodes { id body author { login } createdAt }
}
}
}
}
}
}' -F owner=<owner> -F repo=<repo> -F number=<pr-number>
If GraphQL is unavailable, fall back to:
gh pr view <pr-number> -R <owner>/<repo> --json reviews,reviewRequests,comments
Note: the fallback output does not include thread-level isResolved/isOutdated fields. In fallback mode, treat all returned comments as actionable.
List every unresolved comment/thread (or all comments in fallback mode) with a number, author, file/line (if inline), and a one-line description of the requested change. Example:
1. @alice [src/auth.ts:42] — Use bcrypt instead of MD5 for password hashing
2. @bob — Nit: rename `doThing` to `processPayload` for clarity
3. @alice [src/auth.ts:88] — Add input validation before DB query
If the user already provided numbers in the skill argument, proceed with those. Otherwise ask:
Which comments should I address? (e.g. "1 3" or "all")
For each selected comment:
After all fixes, provide a brief summary listing which comments were addressed and any that were skipped (with reason).
testing
Analyzes type design quality by rating encapsulation, invariant expression, usefulness, and enforcement. Helps design types that make invalid states unrepresentable. Use when reviewing new types or data models.
testing
Reviews test coverage quality from a behavioral perspective, identifying critical gaps and test quality issues. Does not check line coverage — checks meaningful scenario coverage. Use after adding or modifying tests.
development
Audits error handling for silent failures, inadequate user feedback, and unjustified fallback behavior. Finds issues in catch blocks, fallbacks, and error paths. Use after modifying error handling code.
development
Repository-grounded threat modeling that enumerates trust boundaries, assets, attacker capabilities, abuse paths, and mitigations, and writes a concise Markdown threat model. Trigger only when the user explicitly asks to threat model a codebase or path, enumerate threats/abuse paths, or perform AppSec threat modeling. Do not trigger for general architecture summaries, code review, or non-security design work.