Skip to content
Agent Orchestration
Command

/pr-comments

Fix PR review comments: PR # $ARGUMENTS

BOOST
From plugin
claude-task-master
28k49 skills3 agents49 commands1 MCP
Install
> /plugin marketplace add eyaltoledano/claude-task-master
> /plugin install taskmaster@taskmaster

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/pr-comments

Context preview

What this command does when you run it.

Fix PR review comments: PR # $ARGUMENTS

Command definition

pr-comments.md

Fix PR review comments: PR # $ARGUMENTS

This command collects all review comments from a GitHub PR (including CodeRabbit, human reviewers, and other bots), consolidates them by author and severity, shows them to you for approval, then implements the approved fixes.

Steps:

1. **Collect PR comments**

  • Run: `gh pr view $ARGUMENTS --comments` to get ALL comments (no truncation)
  • Parse and extract all review comments from:
  • PR review comments (file-level)
  • General comments
  • Review threads
  • Include author information for each comment
  • IMPORTANT: Do NOT use `head`, `tail`, or any truncation - we need complete comment history

2. **Consolidate comments**

  • Group comments by:
  • Author (CodeRabbit, human reviewers, other bots)
  • Severity (๐Ÿšจ Critical, โš ๏ธ Important, ๐Ÿ’ก Suggestion, โ„น๏ธ Info)
  • Category (Security, Performance, Best Practices, Style, etc.)
  • Remove duplicates and group similar issues
  • Present in a clear, numbered list format showing author for each

3. **Show consolidated issues for approval**

  • Display the organized list with:
  • Issue number for reference
  • Severity indicator
  • File location
  • Description
  • Suggested fix
  • Ask: "Which issues would you like me to fix? (Enter numbers separated by commas, or 'all' for everything)"
  • Wait for user confirmation

4. **Implement approved fixes**

  • For each approved issue:
  • Read the relevant file(s)
  • Implement the suggested fix
  • Log what was changed

5. **Validate changes**

  • Run: `pnpm typecheck`
  • If fails: review errors, fix them, retry
  • Run: `pnpm lint`
  • If fails: review errors, fix them, retry
  • Continue until both pass

6. **Commit and push**

  • Stage changes: `git add .`
  • Create commit: `git commit -m "fix: address review comments from PR #$ARGUMENTS"`
  • Push: `git push`
  • Confirm completion with summary of fixes applied

Notes:

  • If no review comments found, inform user and exit
  • If typecheck/lint fails after fixes, show errors and ask for guidance
  • Keep fixes focused on reviewers' specific suggestions
  • Preserve existing code style and patterns
  • Group related fixes in the commit message if many changes
  • Treat all reviewers equally - human and bot feedback both matter

You previously got all the PR comments in a temporary JSON file and then ran something like this;

cat > /tmp/parse_comments.js << 'EOF' const fs = require('fs'); const comments = JSON.parse(fs.readFileSync('/tmp/all-pr-comments.json', 'utf8'));

const byFile = {}; const bySeverity = { critical: [], important: [], suggestion: [], info: [] };

comments.forEach((c, idx) => { const file = c.path; const author = c.user.login; const line = c.line || c.original_line || 'N/A'; const body = c.body;

if (!byFile[file]) byFile[file] = [];

const comment = { num: idx + 1, author, line, body: body.substring(0, 200) + (body.length > 200 ? '...' : ''), fullBody: body };

byFile[file].push(comment);

// Categorize by severity const lower = body.toLowerCase(); if (lower.includes('critical') || lower.includes('security') || lower.includes('bug:')) { bySeverity.critical.push({...comment, file}); } else if (lower.includes('important') || lower.includes('error') || lower.includes('fail')) { bySeverity.important.push({...comment, file}); } else if (lower.includes('suggestion') || lower.includes('consider') || lower.includes('recommend')) { bySeverity.suggestion.push({...comment, file}); } else { bySeverity.info.push({...comment, file}); } });

console.log('\n=== SUMMARY BY SEVERITY ===\n'); console.log(`๐Ÿšจ Critical: ${bySeverity.critical.length}`); console.log(`โš ๏ธ Important: ${bySeverity.important.length}`); console.log(`๐Ÿ’ก Suggestion: ${bySeverity.suggestion.length}`); console.log(`โ„น๏ธ Info: ${bySeverity.info.length}`);

console.log('\n=== SUMMARY BY FILE ===\n'); Object.entries(byFile) .sort((a, b) => b[1].length - a[1].length) .forEach(([file, comments]) => { console.log(`${file}: ${comments.length} comments`); });

console.log('\n=== CRITICAL ISSUES ===\n'); bySeverity.critical.forEach(c => { console.log(`\n#${c.num} [${c.author}] ${c.file}:${c.line}`); console.log(c.body); });

console.log('\n=== IMPORTANT ISSUES ===\n'); bySeverity.important.slice(0, 10).forEach(c => { console.log(`\n#${c.num} [${c.author}] ${c.file}:${c.line}`); console.log(c.body); }); EOF node /tmp/parse_comments.js

And got a nice report you could act on.

Read more
Ships withclaude-task-master

An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.

Get the whole plugin

Other commands on claude-task-master.