# Understand PR

Review a PR the way a seasoned maintainer would, build an independent model before...

- Repository: https://github.com/mastra-ai/mastra (29259 stars)
- Category: Git and review
- License: see repository
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add mastra-ai/mastra --skill understand-pr -g -a claude-code -y`
Codex: `npx skills add mastra-ai/mastra --skill understand-pr -g -a codex -y`
Cursor: `npx skills add mastra-ai/mastra --skill understand-pr -g -a cursor -y`
Gemini CLI: `npx skills add mastra-ai/mastra --skill understand-pr -g -a gemini-cli -y`

## Description

Review a PR the way a seasoned maintainer would, build an independent model before seeing the diff, investigate the implementation and history, verify material claims, and return a concise briefing. Use for any PR review, self-review, or re-review.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Understand PR

Review the PR as a maintainer deciding whether the change belongs in the codebase. Help the human understand it without turning the review into a walkthrough. Run uninterrupted to a concise front page. For draft PRs authored by the user or a confirmed user-owned bot, follow `gh-review`'s autonomous posting exception and finish the review without an approval checkpoint; otherwise stay available inside the goal until the human says the review is finished.

The PR follows `ARGUMENTS:` at the end of the objective. If absent, infer it from the conversation or checked-out branch.

## What matters

1. **Your design before theirs.** Establish the required outcome and real constraints from the problem and base branch, then choose the simplest design that satisfies them, not a restatement of the author's proposal. Compare the PR against that reasoning. Agreement is valid when independently justified; disagreement needs evidence, not merely a different preference.
2. **Depth proportional to risk.** Blast radius, irreversibility, uncertainty, and public-contract impact determine how hard to look, not a fixed checklist.
3. **Verify material claims.** Read code deeply and run the smallest useful probes. Findings need real evidence and pointers; process compliance is not evidence.
4. **Judgment over coverage theater.** Find the core decision, root cause, and meaningful risks. Do not manufacture findings or run work merely to look thorough.
5. **Complete, not padded.** Every request you have evidence for is in the review; length follows from findings, never the other way around. Lead with what matters most and cut narration, not requests. Preserve supporting detail in one review file for follow-up questions.

## Review record

Use one ignored file: `.mastracode/scratch/reviews/<owner>-<repo>-<pr>.md`. Never stage or commit it.

Before reading the diff, write a short **Pre-diff model** containing:

The rest: https://github.com/mastra-ai/mastra/blob/HEAD/.mastracode/skills/understand-pr/SKILL.md
