home / skills / codyswanngt / lisa / pull-request-review

pull-request-review skill

/.claude/skills/pull-request-review

This skill reviews pull request comments, generates a plan to address unresolved feedback, and bootstraps fixes to meet project standards.

npx playbooks add skill codyswanngt/lisa --skill pull-request-review

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: pull-request-review
description: This skill should be used when checking for code review comments on a pull request and implementing them if required. It fetches PR metadata and comments, generates a brief from unresolved feedback, and bootstraps a project to address the review comments.
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
---

# Review PR Comments

Target PR: $ARGUMENTS

If no argument provided, prompt the user for a PR link or number.

## Step 1: Gather Requirements

1. **Fetch PR metadata and comments** using the GitHub CLI:
   ```bash
   gh pr view $ARGUMENTS --json number,title,body,reviews,comments
   gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
   ```
2. **Extract each unresolved review comment**:
   - Comment ID
   - File path
   - Line number
   - Comment body
   - Author

If no unresolved comments exist, report success and exit.

## Step 2: Create Plan

In plan mode, create a plan that includes the following details:

```markdown
Implement PR review feedback for $ARGUMENTS.

## PR Overview
- Title: [PR title]
- Description: [PR description summary]

## Review Comments to Address (ordered by file)

### 1. [file_path]:[line_number] (Comment ID: [id])
**Reviewer**: [author]
**Comment**: [full comment body]
**Action Required**: [brief description of what needs to change]

### 2. [file_path]:[line_number] (Comment ID: [id])
**Reviewer**: [author]
**Comment**: [full comment body]
**Action Required**: [brief description of what needs to change]

...

## Implementation Guidelines
- Evaluate each comment for validity before implementing
- If a comment is not valid, document the reasoning
- Ensure changes follow project coding standards
- Run relevant tests to verify changes work

## Acceptance Criteria
- All valid review comments addressed
- Tests pass after changes
- `bun run lint` passes

## Verification
Command: `bun run lint && bun run test`
Expected: All checks pass
```

Overview

This skill automates checking and responding to code review comments on a pull request. It fetches PR metadata and review comments, summarizes unresolved feedback into a clear brief, and bootstraps a focused implementation plan to address the feedback. Use it to move a PR from review comments to actionable changes and verification.

How this skill works

The skill retrieves PR metadata and both review and inline comments from the repository using the repository API. It extracts unresolved review comments with context (file, line, author, comment body) and generates a prioritized list of actions ordered by file. In plan mode it produces a concise implementation brief with acceptance criteria and verification commands, and can scaffold the change set required to implement valid feedback.

When to use it

  • A pull request has unresolved review comments that need implementation.
  • You need a concise, ordered plan to apply reviewers' suggestions.
  • Preparing to make multiple related changes across files after review.
  • Validating that tests and linting will pass after addressing feedback.
  • Documenting why specific review comments are not being applied.

Best practices

  • Fetch the latest PR metadata and inline comments before planning to avoid stale data.
  • Evaluate each comment for validity; document rationale for any comments you dispute.
  • Group related comments by file or change set to minimize churn and review rounds.
  • Follow the project coding standards and run lint/tests locally before pushing changes.
  • Include clear acceptance criteria and verification commands for reviewers.

Example use cases

  • Summarize unresolved inline comments on a PR and produce an ordered to-do list for implementation.
  • Bootstrap a change branch with a checklist linking each change to the original review comment ID.
  • Generate an implementation plan when multiple reviewers left feedback across several files.
  • Produce verification steps and commands to share with reviewers after addressing feedback.
  • Document reasons for not applying certain review suggestions and include that in the PR reply.

FAQ

What inputs does the skill need?

A pull request identifier (URL or number) and access to the repository API to fetch PR metadata and comments.

How does it handle comments that are suggestions rather than requirements?

It marks them for evaluation, recommends an action or documents why a suggestion is deferred, and includes that decision in the implementation plan.

What verification does it provide after changes?

It provides verification commands and expected outcomes, typically lint and test commands, and expects all checks to pass before finalizing.