| name | read-pr-comments |
| description | Read pull request comments and review feedback from a GitHub PR URL and present unresolved feedback as structured Markdown for planning in relewise-demos-shop-vue. Use when asked to read comments from a PR, summarize review threads, or prepare a response plan for PR feedback. |
Read PR Comments
Goal
Read unresolved PR review feedback and PR conversation comments, then return a structured Markdown report for planning in this repository. This skill is read-only analysis support and must not apply code changes.
Required Input
Require a GitHub PR URL.
If the initial prompt does not include a PR URL, ask for it before running commands.
Core Command
Run the bundled script from repository root:
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL>"
Optional pagination cap:
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL>" -MaxPages 50
Branch Safety Rules
The script enforces:
- PR access validation through
git.
- Local branch must match PR head branch.
- Local branch must be up to date with
origin/<head-branch>.
If branch mismatch or local branch is behind:
- Ask user permission before syncing branch.
- Re-run with:
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL>" -AllowBranchSync
If syncing is unsafe, for example a dirty worktree and sync is needed, explain and abort.
This skill requires a Git version that supports git switch.
When sync is required and not approved, retrieval is intentionally skipped and the output includes retrieval_skipped_reason: branch_sync_required.
Output Contract
Default output is structured Markdown with these sections:
PR Metadata
Unresolved Review Threads grouped by file
PR Conversation Comments
Totals
Warnings only when relevant
Each comment entry includes:
- Author
- File Reference when available
- Outdated flag for review-thread comments
- Created At in UTC
- Comment URL
- Comment text
Pagination behavior:
- Review threads and PR conversation comments are fetched with cursor pagination.
-MaxPages limits pagination loops and emits warnings if the cap is reached.
- Per-thread comments are fetched up to 100 comments per thread, with a warning when truncated.
JSON Mode
For machine-readable output:
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL>" -OutputFormat json
Script Validation Commands
Use these commands to verify script behavior during skill maintenance:
# Missing URL must fail with a clear prompt for PR URL
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1
# Happy path
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL>"
# Sync needed, no sync permission
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL_WITH_DIFFERENT_HEAD_BRANCH>"
# Sync requested but unsafe dirty worktree
pwsh .agents/skills/read-pr-comments/scripts/read_pr_comments.ps1 -PrUrl "<PR_URL_WITH_DIFFERENT_HEAD_BRANCH>" -AllowBranchSync
Record Shapes
ReviewCommentRecord
comment_type: unresolved_review_thread
author
file_path nullable
line nullable
is_outdated
created_at_utc
created_at_raw nullable, set when timestamp parsing fails
comment_url
body
PrConversationRecord
comment_type: pr_conversation
author
file_path: null
line: null
created_at_utc
created_at_raw nullable, set when timestamp parsing fails
comment_url
body
ExecutionStatus
needs_sync
sync_reason
safe_to_sync
retrieval_skipped_reason
error
Notes
- This skill reads data and structures it for planning.
- This skill does not resolve comments, edit files, or push commits.