| name | explore-request |
| description | Fetch and analyze a request's (PR or MR) diff and metadata, then enter interactive Q&A mode. |
| argument-hint | [request-number] |
| allowed-tools | ["Read","Glob","Grep","Bash"] |
Context
- Current branch: !
git branch --show-current 2>/dev/null
Explore Review
Pull down a review to understand its changes, get context, and ask questions.
Usage
/git:explore-request <number> - Explore review by number
/git:explore-request <url> - Explore review by URL
/git:explore-request - Explore review for current branch (if one exists)
Instructions
-
Parse review identifier from $ARGUMENTS:
- If empty, use current branch's review
- If numeric, treat as review number
- If URL (contains
URL_PATTERN), extract review number from URL
-
Fetch review metadata (run in parallel):
- Fetch Review Details:
!
cat ~/.claude/platform-commands/fetch-review-details.sh 2>/dev/null || echo "UNCONFIGURED: run setup-claude.sh to set up platform-commands"
- Fetch Files Changed:
!
cat ~/.claude/platform-commands/fetch-review-files.sh 2>/dev/null || echo "UNCONFIGURED: run setup-claude.sh to set up platform-commands"
- Fetch Commits:
!
cat ~/.claude/platform-commands/fetch-review-commits.sh 2>/dev/null || echo "UNCONFIGURED: run setup-claude.sh to set up platform-commands"
-
Display review summary (store as REVIEW_CONTEXT):
PR #<number>: <title>
Author: <author>
Branch: <source_branch> → <target_branch>
Status: <state>
Created: <created_at>
## Description
<body>
## Files Changed (<count>)
- <file1>
- <file2>
...
## Commits (<count>)
- <sha1>: <message1>
- <sha2>: <message2>
...
-
Fetch the diff (store as REVIEW_DIFF):
!cat ~/.claude/platform-commands/fetch-review-diff.sh 2>/dev/null || echo "UNCONFIGURED: run setup-claude.sh to set up platform-commands"
If diff is large (>500 lines), summarize by file:
- Show first 50 lines of each file's diff
- Note "... and X more lines" for truncated sections
-
Offer to checkout the review branch (optional):
Ask: "Would you like me to checkout this branch locally? (y/n)"
If yes:
!cat ~/.claude/platform-commands/checkout-review.sh 2>/dev/null || echo "UNCONFIGURED: run setup-claude.sh to set up platform-commands"
-
Enter Q&A mode:
Present to the operator:
I now have full context on PR #<number>. You can ask me:
- What does this PR change?
- Why was <file> modified?
- Are there any potential issues?
- How does <function/class> work now?
- What's the testing strategy?
Ask any questions about this review, or say "done" to exit.
-
Answer questions using REVIEW_CONTEXT and REVIEW_DIFF:
- Reference specific files and line numbers when answering
- Read additional files if needed for context
- If a question requires understanding code not in the diff, use Read tool
Example Output
PR #42: Add user authentication
Author: @developer
Branch: feature/auth → main
Status: OPEN
Created: 2024-01-15
## Description
This PR adds JWT-based authentication with:
- Login/logout endpoints
- Token refresh mechanism
- Protected route middleware
## Files Changed (5)
- src/auth/jwt.py
- src/auth/middleware.py
- src/routes/auth.py
- tests/auth/test_jwt.py
- tests/auth/test_middleware.py
## Commits (3)
- abc1234: Add JWT token generation
- def5678: Add auth middleware
- ghi9012: Add tests
---
I now have full context on PR #42. You can ask me:
- What does this PR change?
- Why was <file> modified?
- Are there any potential issues?
- How does <function/class> work now?
- What's the testing strategy?
Ask any questions about this PR, or say "done" to exit.
Cross-Refs
After exploring a review, you may want to:
| Next Step | Skill |
|---|
| Address review comments | /git:address-request-comments |
| Split a large review | /git:split-request |
| Preview/resolve merge conflicts | /git:resolve-conflicts --preview |
Important Notes
- This skill is for understanding reviews, not modifying them
- For large reviews with many files, focus on the most significant changes first
- If the diff is too large to process, offer to focus on specific files