mz-pr-review

Reviews local branch diffs against Materialize coding standards and test requirements.

6.4k|512|Updated Feb 22, 2019
One-click install
npx skills add https://github.com/MaterializeInc/materialize --skill mz-pr-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mz-pr-review
Source: https://github.com/MaterializeInc/materialize/tree/main/.agents/skills/mz-pr-review
Command: npx skills add https://github.com/MaterializeInc/materialize --skill mz-pr-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing pull requests against a large project's style guides, testing conventions, and architecture rules is time-consuming and easy to get inconsistent. This Skill automates a local code review of your current branch's changes against Materialize's documented standards before you merge.

Core Features & Use Cases

  • Diff-based review: Fetches changes via gh pr diff, git diff, or jj diff depending on what tooling is available, then reviews them read-only.
  • Standards checklists: Validates tests (sqllogictest, pgtest, Rust unit tests), Rust and SQL code style, error message conventions, sensitive data handling with SecureString/Zeroizing, and architecture rules.
  • Structured findings: Organizes results into Blocking, Strong suggestions, and Nits, with explanations of the reasoning behind each suggestion.
  • Use Case: Before merging a branch that changes SQL planning behavior, run the review to confirm a matching .slt test exists, error messages follow conventions, and no leftover dbg! or FIXME markers remain.

Quick Start

Ask the assistant to review my changes on this branch against the Materialize standards before I open a pull request.

Frequently Asked Questions about mz-pr-review

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

FAQPage Schema
How do I review my code changes before opening a pull request?

Run the review on your current branch and it fetches the diff using git, jj, or the GitHub CLI, then checks it against Materialize's checklists. Findings are grouped into Blocking, Strong suggestions, and Nits.

How do I review a GitHub PR by number locally?

Pass the PR number as the argument and the review fetches the diff with `gh pr diff <number>`. It then applies the same standards checklists used for local branch reviews.

What test conventions does the Materialize code review check?

SQL behavior changes should include `.slt` files in test/sqllogictest, wire protocol changes need `.pt` files in test/pgtest, and Rust logic changes need unit tests run with cargo test. A behavior change with no test changes is flagged.

Does the code review modify my files?

No, the review is strictly read-only. It only inspects the diff and reports findings; it never edits, formats, or commits any changes to your working tree.

Can I use this review with jj instead of git?

Yes, if jj is available the review uses `jj diff` against the trunk revset to obtain changes. It falls back between gh, git, and jj depending on which tools are present.