Fetch PR Comments for LLM Consumption
Fetch active (unresolved) comments from a GitHub Pull Request and format them for LLM processing. Use --include-resolved to also include resolved threads.
Arguments
$ARGUMENTS(optional): The PR URL (e.g.,https://github.com/owner/repo/pull/123) or PR reference (e.g.,owner/repo#123or just123if in a repo). If not provided, automatically detects the PR from the current git branch.--include-resolved(optional): Include resolved threads in the output. By default, only active (unresolved) threads are exported.
Instructions
- Run the comments.sh script to gather and format the comments. The script is located next to this SKILL.md file:
bash "$(find ~/.claude -path '*/personal/skills/comments/comments.sh' 2>/dev/null | head -1)" $ARGUMENTS
The script outputs the path to the generated markdown file on stdout. Capture this path and read the file contents.
Summarize for the user:
- How many comments were fetched (active vs resolved, and how many are shown)
- The main themes/issues raised in the active comments
For each one of the open comments:
- Reflect if the comment is pertinent
- Think about what will be your reply. If there are multiple alternatives or it involves some deep design or coding decision, confirm first with the user
- Update the markdown file you received with your draft reply and, if needed, what code changes need to happen. Do not publish the comments.
- Present them to the user and debate with the user if replies and code changes are accurate.
Once you reach agreement with the user
- Make any code changes you agreed to
- Commit and push them
- Send the replies to the comments in GitHub, use the gh command available in the markdown file
- Ask the user if they agree to resolve the open threads, if so, execute the resolve thread command
Converted and distributed by TomeVault — claim your Tome and manage your conversions.