← All recipes
EngineeringB2B SaaSReview latency

First-pass PR review

Give every pull request an instant first pass: style and test-coverage checks, a list of concrete questions for the author, and a risk flag when the diff touches sensitive paths. A reviewer opens the PR with a head start.

Claude CodeGitHubLinear

Trigger

A pull request is opened or updated.

Required tools & APIs

GitHub API for diffs and checks · Claude Code for the review pass · Repo conventions file for the rules

Built for

B2B SaaS

Time-to-value (typical)

About 1 day

Build size

Quick win

How the agents hand off work

Each step names the agent, what it does, and where the work goes next.

  1. Collector

    Gather the diff, the linked issue, and the repo conventions file.

    Hands the review packet to the Reviewer.

  2. Reviewer

    Check the diff against conventions, flag missing tests for changed behavior, and write concrete questions.

    Hands findings to the Commenter.

  3. Risk flagger

    Mark diffs touching auth, payments, migrations or data deletion for a required human review.

    Sets the required-reviewer flag on the PR.

  4. Commenter

    Post one structured review comment with findings, questions and the risk flag.

    Author and reviewer work from the posted first pass.

Copy the recipe

The SKILL.md runs as-is in Claude Code, OpenCode or Cursor. The workflow JSON is a portable spec that maps onto n8n, Make or Zapier style tools.

---
name: first-pass-pr-review
description: Run an instant first pass on a pull request: convention checks, missing-test questions, and risk flags on sensitive paths. Use on PR open or update.
---

# First-Pass PR Review

## When to use
- PRs wait hours for a first human look.
- Review quality varies with who picks the PR up.

## Inputs
- Pull request diff and linked issue (required).
- Repo conventions file: naming, structure, testing expectations (required).
- Sensitive path rules: auth, payments, migrations, destructive operations (required, stored per repo).

## Process
1. Collect the diff, the linked issue and the conventions file.
2. Check the diff against the conventions. Quote the violated line, not a vague impression.
3. For every behavior change, ask what test covers it. Missing coverage becomes a question for the author.
4. Flag sensitive paths for mandatory human review.
5. Post one structured comment: findings, questions, risk flag, and an explicit note that this is a first pass, not an approval.

## Outputs
- One GitHub review comment: findings, questions, risk flag.
- Required-reviewer flag when sensitive paths are touched.

## Tools and integrations
- GitHub API: diff, comments, review requests.
- Claude Code: the review pass itself.
- Linear: link back to the issue being implemented.

## Guardrails
- Never approve or request changes programmatically. Comment only.
- Every finding quotes the exact line or file it refers to.
- Never suggest deleting security checks or tests to make a build pass.

## Examples
- "PR #412 touches the billing migration." -> first pass posted, mandatory human reviewer flagged.
- "Small UI PR." -> conventions check plus test questions, no ceremony.

Locked: the deeper blueprint

Architecture, guardrails, metrics worth watching and the failure modes that break first. Unlock it with your email and we will send the blueprint with the recipe link.

One email per unlock. Unsubscribe by replying to any message.

Want this built for real?

This recipe shows the shape of the work. Turning it into a running system with your data, your tools and review gates is what we build. If this bottleneck is one you live with, book a call and we will scope it.