understand-pr

Guides interactive pull request review through goal, quality, history, and walkthrough phases.

27.6k|2.7k|Updated Aug 6, 2024
One-click install
npx skills add https://github.com/mastra-ai/mastra --skill understand-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: understand-pr
Source: https://github.com/mastra-ai/mastra/tree/main/.mastracode/skills/understand-pr
Command: npx skills add https://github.com/mastra-ai/mastra --skill understand-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing a pull request without understanding its history and context leads to shallow feedback and missed risks. This Skill walks a maintainer through a structured, interactive review process so they genuinely understand a PR before forming opinions or posting comments.

Core Features & Use Cases

  • Phased Interactive Review: Moves through PR goal, quality gate (CI, tests, changesets), git history research, diff walkthrough, understanding quiz, opinion exchange, and optional review comment drafting.
  • Context Gathering: Uses the GitHub CLI (gh) to fetch PR metadata, diffs, linked issues, author contribution history, and CI status, plus git log and git blame for code archaeology.
  • Use Case: A maintainer receives a community PR fixing a reported bug. The Skill identifies the linked issue, checks the author's contribution history, verifies CI and changesets, traces the changed code's history, and helps the maintainer draft an informed review comment.

Quick Start

Run the understand-pr skill with a PR number, for example: understand-pr 1234, to start an interactive guided review of that pull request.

Frequently Asked Questions about understand-pr

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a GitHub pull request with full context?

Use this Skill with a PR number to run a phased review: it fetches PR metadata and diffs via the gh CLI, reads linked issues, checks CI and changesets, then walks through git history and the diff interactively before drafting a review comment.

How to check if a PR author tested their changes?

The Skill's quality gate phase looks for author verification signals such as 'tested locally' statements, reproduction evidence, screenshots, or test output in the PR description and comments, and flags the absence of any verification.

Does this Skill post review comments automatically?

No. It never posts comments without explicit approval. When you approve a drafted comment, it posts via the GitHub REST API using gh api, and supports patching the comment if the wrong body was posted.

Why does gh output break jq when reviewing PRs?

gh output often contains ANSI color codes that break jq parsing. The Skill avoids this by using gh's built-in --jq flag instead of piping to jq, or by prefixing commands with NO_COLOR=1.

Can I use this Skill as part of a larger automated review workflow?

Yes. Pass a --working-file argument with a path to a handoff file; the Skill reads its instructions, updates that same file with findings, and returns control to the caller instead of producing user-facing output.