Bismillah! I'll retrieve and analyze the PR/MR review feedback to help you improve your code based on the reviewer's suggestions.
Arguments: [PR_NUMBER_OR_URL] [--github|--gitlab]
Platform Selection
Flags:
--github- Fetch PR review from GitHub usingghCLI (default)--gitlab- Fetch MR review from GitLab usingglabCLI
Auto-Detection (default):
- URLs containing
github.com→ GitHub - URLs containing
gitlab.com→ GitLab - Plain numbers → GitHub (default)
Platform Detection Logic
# Parse platform flag or auto-detect from URL
ARGS="<PR number or URL and platform flags supplied when invoking this skill>"
if [[ "$ARGS" == *"--gitlab"* ]]; then
PLATFORM="gitlab"
CLI_TOOL="glab"
REVIEW_TYPE="merge request"
elif [[ "$ARGS" == *"--github"* ]]; then
PLATFORM="github"
CLI_TOOL="gh"
REVIEW_TYPE="pull request"
elif [[ "$ARGS" == *"gitlab.com"* ]]; then
PLATFORM="gitlab"
CLI_TOOL="glab"
REVIEW_TYPE="merge request"
elif [[ "$ARGS" == *"github.com"* ]]; then
PLATFORM="github"
CLI_TOOL="gh"
REVIEW_TYPE="pull request"
else
# Default to GitHub for plain numbers
PLATFORM="github"
CLI_TOOL="gh"
REVIEW_TYPE="pull request"
fi
echo "📌 Platform: $PLATFORM ($REVIEW_TYPE review)"
Using with Extended Reasoning
If an extended-reasoning mode is available in your environment, use it for this task. When running with extended reasoning, I will perform an exceptionally deep and comprehensive analysis:
Advanced Review Analysis
- Deep Context Understanding: Analyze the entire codebase context, not just the PR changes
- Cross-Reference Analysis: Connect reviewer feedback to broader architectural patterns and project conventions
- Hidden Issue Detection: Identify potential issues that reviewers might have missed
- Performance Impact Assessment: Evaluate performance implications of suggested changes
- Security Review: Conduct security analysis beyond basic review comments
- Maintainability Evaluation: Assess long-term code maintainability implications
Reviewer Psychology & Communication
- Intent Interpretation: Deeply analyze the underlying intent behind each reviewer comment
- Communication Style Analysis: Understand reviewer preferences and communication patterns
- Priority Inference: Determine true urgency levels beyond surface-level feedback
- Relationship Dynamics: Consider team dynamics and reviewer expertise areas
Strategic Implementation Planning
- Multi-Level Solution Analysis: Explore multiple approaches for each piece of feedback
- Dependency Mapping: Create detailed dependency graphs for implementation order
- Risk Assessment Matrix: Evaluate risks and benefits of each potential change
- Future-Proofing: Consider how changes will affect future development and scalability
Advanced Code Quality Enhancement
- Pattern Recognition: Identify recurring patterns in feedback for systematic improvements
- Best Practice Synthesis: Combine reviewer suggestions with industry best practices
- Optimization Opportunities: Find performance and efficiency improvements beyond the review scope
- Technical Debt Analysis: Evaluate and address technical debt highlighted by review feedback
This intensive analysis ensures not just addressing review feedback, but elevating the entire codebase quality and team collaboration effectiveness.
Let me:
Identify and fetch the PR/MR review
- Parse PR/MR number or URL from arguments or detect current branch's PR/MR
- Use appropriate CLI based on platform:
- GitHub:
gh pr view <number> --json reviews,comments - GitLab:
glab mr view <number>andglab apifor discussions
- GitHub:
- Retrieve all review threads, suggestions, and approval status
Analyze the review feedback comprehensively
- Identify automated/bot reviews vs. human reviews for specialized handling
- Categorize feedback by type (bugs, improvements, style, architecture, security)
- Distinguish between critical issues that must be addressed vs. suggestions
- Extract specific code locations and recommended changes with line numbers
- Assess overall review sentiment and approval likelihood
- Parse the automated reviewer's structured feedback format and recommendations
Create actionable improvement plan
- Prioritize feedback items by impact and effort required
- Generate specific code changes needed for each comment
- Suggest commit organization for addressing feedback
- Identify any breaking changes or architectural considerations
Provide clear recommendations
- If review is positive: Highlight what's working well, celebrate good practices, note minor improvements
- If the automated reviewer found the code satisfactory: Summarize positive aspects and readiness for merge
- If review needs work: Create step-by-step action items with specific code examples
- For automated-reviewer feedback: Interpret AI suggestions in context of best practices
- Suggest response strategy for reviewer comments and how to address concerns
- Estimate time and complexity for implementing each change
- Recommend whether to request re-review after changes
Generate implementation roadmap
- Break down changes into logical, atomic commits with clear messages
- Suggest order of implementation to minimize conflicts and build failures
- Identify dependencies between different feedback items
- Provide templates for updating PR description with changes made
- Include testing strategy for validating fixes
- Suggest documentation updates if needed
Execute and verify improvements
- Apply high-priority fixes immediately where possible
- Run existing tests to ensure no regressions
- Validate that feedback has been properly addressed
- Prepare summary of changes made for reviewer response
Commit and push improvements
- Stage all implemented changes with
git add . - Create descriptive commit message summarizing the addressed feedback
- Use format: "address PR feedback: [specific changes made]"
- Push changes to remote branch to update the PR
- Ensure all improvements are visible to reviewers before requesting re-review
- Stage all implemented changes with
Conditional re-review request (SMART EXECUTION)
IF changes were made AND
$REVIEWER_BOTis set (a GitHub/GitLab user or app that reviews PRs):- Post re-review request comment using appropriate CLI
- Use exact format: "@$REVIEWER_BOT I've addressed the review feedback. Please re-review the changes:"
- Include specific changes made with file:line references
- List all modified files
- End with "Ready for re-review ✅"
- Verify comment was posted successfully
IF changes were made but
$REVIEWER_BOTis NOT set:- Report completion to the user only - NO PR/MR comment needed
- Provide a summary of the changes made
IF NO changes were made:
- Report to user only - NO PR/MR comment needed
- Provide summary: "Analysis complete: No improvements required"
- Explain why no changes were needed (already implemented, meets standards, etc.)
- Confirm PR/MR is ready for merge
- Note: "No re-review request posted (no changes made)"
Implementation Logic:
# Track if any changes were made during the process CHANGES_MADE=false # After each improvement attempt, check for actual changes if ! git diff --quiet HEAD~1 HEAD; then CHANGES_MADE=true fi # Final decision - only post a re-review comment if changes exist AND a reviewer bot is configured if [ "$CHANGES_MADE" = true ] && [ -n "${REVIEWER_BOT:-}" ]; then if [ "$PLATFORM" = "github" ]; then gh pr comment $PR_NUMBER --body "@$REVIEWER_BOT I've addressed the review feedback..." else glab mr note $MR_NUMBER --message "@$REVIEWER_BOT I've addressed the review feedback..." fi else echo "✅ Analysis complete - reporting to user only" fiProvide suggested improvements
- Based on deep analysis, present additional code quality improvements beyond the review feedback
- Suggest architectural enhancements, performance optimizations, or maintainability improvements
- Recommend best practices that could elevate the code further
- Offer insights on patterns, testing strategies, or documentation that could benefit the codebase
Usage Examples
# Get GitHub PR review (default)
Invoke with: git-tools-get-pr-review 42
# Get GitHub PR review (explicit)
Invoke with: git-tools-get-pr-review 123 --github
# Get GitLab MR review
Invoke with: git-tools-get-pr-review 45 --gitlab
# Auto-detect from GitHub URL
Invoke with: git-tools-get-pr-review https://github.com/owner/repo/pull/15
# Auto-detect from GitLab URL
Invoke with: git-tools-get-pr-review https://gitlab.com/owner/repo/-/merge_requests/45
Alhamdulillah, let me fetch and analyze the review feedback to help you create an excellent PR/MR!