# Review Branch

> Review a local PETSc branch's changes against its target branch (origin/main or origin/release). Use when the user asks to "review this branch", "review my changes", "check what I've done before pushing", or runs `make branch-review`.

- Skill: `petsc/review-branch` (Agent Skill)
- Install (CLI): `npx skillmds@latest add petsc/review-branch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/petsc/review-branch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: petsc (https://skillmd.com/u/petsc)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/petsc/review-branch

---


Adhere to @AGENTS.md.

`SRC` is `$ARGUMENTS` if given, else `HEAD`. Reject anything that isn't a single ref matching `^[A-Za-z0-9._/@][A-Za-z0-9._/@~^-]*$`.

Run `python3 lib/petsc/bin/maint/ai_review_fetch.py branch <SRC>` (path relative to the repository root) as a single shell command with no shell metacharacters. Stop and report if it exits non-zero.

It writes `branch-review.txt`, and prints `SRC`, `SRC_SHA`, `DEST`, `SHORTSTAT`, `DIFF_FILE`, `FILES`, and `LINES`. State `DEST` and `SHORTSTAT`.

Then follow @../review-mr/review-procedure.md (Sections 3–5) to read the diff, classify findings, verify each one, compose report. Report to stdout only.

