Analyze PR review comments and generate fix summary for another Claude instance
Analyzes PR review comments and generates actionable fix summary for another Claude instance.
/plugin marketplace add Shavakan/claude-marketplace/plugin install mcp-github@shavakanFetch GitHub PR review comments, categorize by severity, generate actionable fix summary for another Claude Code instance.
You MUST consider the user input in $ARGUMENTS: PR URL or number.
If empty, abort: "Usage: /pr-review-analyze <PR_URL or PR_NUMBER>"
Blocking: Security vulnerabilities, data corruption risks, breaking API changes, critical logic errors
High Priority: Performance bugs, race conditions, incomplete error handling, correctness issues
Medium Priority: Code quality improvements, refactoring opportunities, minor optimizations
Low Priority: Style suggestions, documentation improvements, code deduplication
Phase 1: Parse Input
Parse PR identifier from $ARGUMENTS
Gate: Confirm PR identifier. Proceed to fetch data? (y/n)
Phase 2: Fetch Data
Fetch PR data (prefer GitHub MCP, fallback to gh CLI if unavailable):
path (file path), line (specific line number), body (comment text)outdated flag (code changed) and thread isResolved status (manually resolved)Phase 3: Report Outdated Bot Comments
Report outdated bot comments (already fixed by code changes):
outdated: true AND isResolved: false, list them separatelyPhase 4: Categorize
Categorize active unresolved comments:
outdated: false AND isResolved: falseGate: Found N comments (X blocking, Y high priority). Generate summary? (y/n)
Phase 5: Generate Summary
Generate summary with blocking issues first, lower priority after
Critical: Every issue MUST include exact file location in **file:line** format:
path and line from comment metadata (captured in Phase 2)**{path}:{line}** (e.g., **auth.py:127**)**{path}** only## Context
PR: https://github.com/org/repo/pull/42
Branch: fix/auth-validation
## Outdated Comments (Already Fixed)
N bot comments are outdated (code changed) but not manually resolved. No action needed.
## Blocking Issues
1. **auth.py:127** - SQL injection vulnerability
- Problem: User input in f-string query
- Risk: Arbitrary SQL execution
- Fix: Use parameterized query with $1, $2 placeholders
2. **session.py:89** - API key logged in exception handler
- Problem: Exception traceback includes API key from config dict
- Risk: Credentials exposed in error logs
- Fix: Redact api_key before client initialization
## High Priority
1. **cache.py:203** - Redis KEYS blocks event loop [Copilot]
- Problem: KEYS is O(n) and blocks Redis
- Risk: Performance degradation on large keyspaces
- Fix: Replace `redis.keys(pattern)` with `redis.scan_iter(match=pattern)`
## Instructions
1. Fix all blocking issues
2. Run test suite to verify no regressions
3. Commit: "fix: address security and performance review findings"
4. Push to same branch