Validate code and generate comprehensive pull request summaries automatically.
Install
mkdir -p .claude/skills/review-pr-zoraxl && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12547" && unzip -o skill.zip -d .claude/skills/review-pr-zoraxl && rm skill.zipInstalls to .claude/skills/review-pr-zoraxl
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run pre-PR validation (lint/format/typecheck/UI), detect linked issues, generate the PR package (title, description, change breakdown, score), and apply it to GitHub. Works with a PR number or the current branch's committed changes vs its base. Invokable from any repo. Use when the user says "/review-pr", "review my pr", "write a pr", "summarize a pr", "score my pr", "prepare a pr for submission".Key capabilities
- →Run pre-PR validation checks like lint, format, and typecheck.
- →Detect linked issues from branch names, commit messages, or PR bodies.
- →Generate a PR package including title, description, and change breakdown.
- →Apply the generated PR package to GitHub.
- →Score the PR based on predefined categories and effort levels.
- →Determine the diff source from a PR number or current branch changes.
How it works
The skill determines the diff source, runs validation checks against the current working tree, detects linked issues and lifecycle plans, generates a PR package with a change breakdown and effort score, and then applies it to GitHub.
Inputs & outputs
When to use review-pr
- →Reviewing pull request diffs
- →Generating PR descriptions
- →Pre-flight checks before merging
About this skill
Review PR
Validate, package, and apply a PR. Owns lint / format / typecheck / UI checks. Does not detect ADR drift — ADRs are created or updated post-merge by /wiki-sync. Does not check code against the plan — that is /evaluate's responsibility (run before this skill).
Workflow position:
/brainstorm → /planning → /implement → /evaluate → /review-pr → merge → /wiki-sync
Invokable from any repo. The skill resolves repo paths via repos.yaml at the wiki repo root when needed.
Step 1 — Determine the diff source
Option A — PR number/URL provided:
gh pr view <number> --json title,body,baseRefName,headRefName,files,labels,state,closingIssuesReferences
gh pr diff <number>
Option B — No PR number (use current branch):
BASE=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's|refs/remotes/origin/||')
git branch --show-current
git log --oneline origin/$BASE..HEAD
git diff origin/$BASE...HEAD
Read every file in the diff before continuing.
Step 2 — Run validation
Validation runs against the current working tree before the PR is created or updated. If validation fails, stop — fix and re-run.
Skip Step 2 when the user only wants a read-only summary of an existing PR (Option A, no apply step). Note in the output that local validation was not run.
Choosing commands
Run the implementation repo's standard validation. Always check the repo's CLAUDE.md, AGENTS.md, or README.md first for the canonical validation commands.
| Repo type | Default commands |
|---|---|
| TypeScript / Node monorepo | pnpm lint, pnpm format, pnpm typecheck (or turbo typecheck) |
| Python service | Run the local Makefile targets (make lint, make typecheck, make test) |
| Docker / Compose service | Repo-root validation per the local README; typically a compose config check |
| Wiki / markdown-only (this repo) | No automated validation; skip Step 2 |
The table is a fallback, not the source of truth.
UI changes
For UI changes, start the dev server and verify the feature in a browser. Test the golden path and key edge cases. Watch for regressions in nearby features. Type checking and tests verify code correctness, not feature correctness — if you can't test the UI, say so explicitly in the PR description rather than claiming success.
On failure
If any check fails:
- Stop. Do not proceed to Step 3.
- Summarize the failure for the user (which command, which file/line, what error).
- Recommend running
/evaluateif the failure looks like a planning gap, or fixing directly otherwise. - Re-run
/review-prafter the user fixes.
Step 3 — Detect linked issue
Auto-detect first. Look for an issue number reference in this order:
- Head branch name — patterns like
fix-123-...,issue-123-...,123-foo-bar. - Commit messages on the branch — search for
#NNNreferences. - Existing PR body — look for
Closes #NNN,Fixes #NNN,Resolves #NNN.
If a closing reference is found, carry it through into the new PR body unchanged.
If nothing is detected:
gh issue list --state open --limit 10 --json number,title,labels
Show the list and ask:
Does this PR resolve any of these issues? Reply with the issue number, a comma-separated list of numbers, or
none.
For each chosen number, add Closes #N to the Summary block of the PR description. If none, skip — no closing reference is added.
GitHub auto-closes the linked issue when the PR merges; do not comment on or label the issue from this skill.
Step 3.5 — Detect lifecycle plan
For implementation or workflow work that came from /planning, resolve the lifecycle links before generating the PR package:
-
Find the plan path from the branch, commits, changed files, or user-provided context. Expected shapes:
plans/<namespace>/<feature>/<phase>.mdfor a single phase orplans/<namespace>/<feature>/for a full linked plan folder. -
If a folder is named, list its phase files and determine whether the PR intentionally submits the full folder or only specific phases. Use the diff,
/evaluateoutput, user-provided context, and plan frontmatter. If phase scope is ambiguous, ask before stamping. -
Read the plan frontmatter and resolve
source_dump. -
Resolve the source idea from plan
source_dumpfirst, then a source idea whoserelated_planpoints to the plan path/folder, then user confirmation. -
If no plan path is found, ask the user for the plan path or
none. -
If no source idea exists, record
Source idea: none; do not invent one. -
Classify the PR lifecycle type before stamping:
implementation— the PR submits the actual code, workflow, wiki behavior, skill behavior, or repo metadata deliverable described by the plan.artifact— the PR only lands brainstorms, plans, strategy docs, source material, or planning cleanup. It does not implement the linked deliverable.mixed— the PR both implements a deliverable and lands source artifacts.
Use the diff, PR title/body, changed paths,
/evaluateoutput, and user context. Brain-native workflow changes in the brain repo can be implementation PRs when the plan is about workflow/skill/wiki behavior. A PR that only commits brainstorms, plan specs, lifecycle metadata, or other source artifacts isartifacteven when those files reference implementation work. If there is no clear implemented deliverable in the diff, default toartifact; if the lifecycle type is still ambiguous, ask the user to chooseartifact,implementation, ormixedbefore stamping.
Carry these values into the PR body so /wiki-sync can follow the merged PR back to its source material:
## Lifecycle
- Plan: `{plan_path_or_none}`
- Source idea: `{source_idea_path_or_none}`
- Lifecycle scope: `{single phase | full linked plan folder | none}`
- Implementation scope: `{phase/file/folder implemented | none}`
- Artifact scope: `{brainstorm/plan/strategy/source artifacts submitted | none}`
- Lifecycle metadata: `{stamped | not stamped - <reason>}`
Lifecycle status contract:
ready to shipmeans a plan phase was reviewed and can be implemented.implemented-pending-prmeans implementation/evaluation found the phase complete before PR submission.pr-openis written by/review-pronly for implementation or workflow-deliverable PRs after the PR URL can be stamped intorelated_pr.artifact_pris written for PRs that only land brainstorms, plans, strategy docs, source artifacts, or planning cleanup; it must not advance source ideas or plan phases topr-open.- Never set
status: pr-openmerely because the plan or source file itself is included in the PR. Plans/source files included without an implemented deliverable keep their existing work-state status and receive onlyartifact_pr. - Source ideas should move to PR state only when an implementation PR covers the full linked idea/plan chain; partial phase PRs and artifact PRs keep the source idea active.
- Preserve existing
related_planandsource_dumplinks. Do not rewrite them opportunistically during PR prep. /review-prdoes not archive source or plan files./wiki-syncowns post-merge archive.
After the PR URL exists, update lifecycle frontmatter before finalizing the PR body:
- For an
implementationormixedPR, set each implemented/submitted plan phase:status: pr-open related_pr: <PR URL> - For an
artifactPR, do not change the work-statestatus; setartifact_pr: <PR URL>on submitted source/plan files instead. - For a
mixedPR, stamprelated_pronly on the implemented lifecycle scope and stampartifact_pron artifact-only source/plan files. - For a source idea, set
status: pr-openandrelated_pr: <PR URL>only when an implementation PR submits the full linked idea/plan chain. If this is a partial phase PR or artifact-only PR, leave the source idea active and note that inLifecycle metadata. - If an artifact-only PR would otherwise be the only evidence behind an existing
status: pr-open, treat that as a lifecycle metadata error: do not reinforce it. Correct the file back towiporready to shipwhen the prior intended status is clear from the plan/review context; otherwise stop and ask the user which active status to restore. - Preserve
related_plan,source_dump,artifact_pr,related_pr,wiki_log, and archive fields that already exist unless the lifecycle classification says to update one of the PR fields. - Do not stamp sibling phases merely because they share a folder.
If there are no lifecycle files to update, set Lifecycle metadata: not stamped - <reason> in the PR body. Do not archive or update wiki pages from this skill; /wiki-sync owns that after merge.
Step 4 — Analyze the diff
Read every file in the diff. Understand:
- What changed (new features, refactors, bug fixes, wiki updates, etc.)
- Why it changed (motivation, gap being addressed)
- How it was done (structure, key patterns, cross-links)
Group changes into logical items for the change breakdown table in Step 5.
Step 5 — Generate the PR package
Produce exactly two copy-pasteable blocks:
- PR Title — single-line code block.
- PR Description — fenced code block with the full PR body.
PR Title Rules
- Maximum 72 characters.
- Imperative mood ("Add …", "Fix …", "Update …", "Clarify …").
- Specific — mention the feature, area, or component.
- No trailing period.
- No generic titles like "Update docs" or "Fix stuff".
PR Description Template
## PR Details
### Summary
**Summary:** <!-- 1-2 sentences high level -->
{summary}
{closes_reference_if_any}
**Motivation:** <!-- Why is this change needed? -->
{motivation}
**Approach:** <!-- How was it implemented? Key decisions and trade-offs. -->
{approach}
**Impact:** <!-- Effect on users, decisions, or cross-repo understandin
---
*Content truncated.*
When not to use it
- →When the user only wants to detect ADR drift.
- →When the user wants to check code against a plan.
- →When validation fails and the user needs to fix issues.
Limitations
- →It does not detect ADR drift.
- →It does not check code against the plan.
- →It stops if validation fails.
How it compares
This workflow automates the entire PR creation and validation process, including scoring and issue linking, which is typically a manual and multi-step process.
Compared to similar skills
review-pr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| review-pr (this skill) | 0 | 2mo | Review | Intermediate |
| verify | 6 | 6mo | No flags | Beginner |
| code-change-verification | 4 | 4mo | Review | Beginner |
| springboot-verification | 4 | 4mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by zoraxl
View all by zoraxl →You might also like
verify
Use when you want to validate changes before committing, or when you need to check all React contribution requirements.
code-change-verification
openai
Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.
springboot-verification
affaan-m
Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.
moai-workflow-testing
modu-ai
Comprehensive development workflow specialist combining DDD testing, debugging, performance optimization, code review, PR review, and quality assurance into unified development workflows
resolve-checks
flowglad
Resolve all failing CI checks and address PR review feedback on the current branch's PR. Runs tests locally, fixes failures, incorporates valid review comments, and resolves addressed feedback. Use when CI is red, after receiving PR feedback, or before merging.
verification-quality-assurance
ruvnet
Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.