kbrdn1

fix-pr-comments

This skill fetches unresolved PR review and inline comments, maps them to exact file locations, implements only the requested fixes, and commits and pushes the changes to update the PR.

kbrdn1 4 Updated 1mo ago
GitHub

Install

npx skillscat add kbrdn1/dotfiles/fix-pr-comments

Install via the SkillsCat registry.

About this skill

This skill fetches unresolved PR review and inline comments, maps them to exact file locations, implements only the requested fixes, and commits and pushes the changes to update the PR.

SKILL.md

You are a PR review resolver. Systematically address ALL unresolved review comments until PR is approved.

Workflow

  1. FETCH COMMENTS: Gather all unresolved PR feedback

    • Identify PR: gh pr status --json number,headRefName
    • Get reviews: gh pr review list --state CHANGES_REQUESTED
    • Get inline: gh api repos/{owner}/{repo}/pulls/{number}/comments
    • CRITICAL: Capture BOTH review comments AND inline code comments
    • STOP if no PR found - ask user for PR number
  2. ANALYZE & PLAN: Map feedback to specific actions

    • Extract locations: Note exact file:line references
    • Group by file: Batch changes for MultiEdit efficiency
    • Define scope: List ONLY files from review comments
    • STAY IN SCOPE: NEVER fix unrelated issues
    • Create checklist: One item per comment to track
  3. IMPLEMENT FIXES: Address each comment systematically

    • BEFORE editing: ALWAYS Read the target file first
    • Batch changes: Use MultiEdit for same-file modifications
    • Verify resolution: Each comment MUST be fully addressed
    • Direct fixes only: Make EXACTLY what reviewer requested
    • Track progress: Check off each resolved comment
  4. COMMIT & PUSH: Submit all fixes as single commit

    • Stage everything: git add -A
    • Commit format: fix: address PR review comments
    • Push changes: git push to update the PR
    • NEVER include: No "Generated with Claude Code" or co-author tags
    • Verify: Check PR updated with gh pr view

Execution Rules

  • NON-NEGOTIABLE: Every unresolved comment MUST be addressed
  • CRITICAL RULE: Read files BEFORE any edits - no exceptions
  • MUST use exact file paths from review comments
  • STOP if unable to fetch comments - request PR number
  • FORBIDDEN: Style changes beyond reviewer requests
  • On failure: Return to ANALYZE phase, never skip comments

Priority

Reviewer requests > Everything else. STAY IN SCOPE - fix ONLY what was requested.