High-quality code reviews require verifying not just static code diffs, but also the dynamic correctness of the changes. This skill automates the process of comparing changes against a base branch, identifying and running tests, compiling/building the application locally, and generating a detailed review report.
Automated Execution
To run the automated PR review script, execute it from the root of the workspace:
Where <pr_number> is the identifier of the PR (used to name the output file pr-[pr_number].md), and [base_branch] is the target branch of the PR (defaults to main if not specified).
Script Behavior
Diff Analysis: The script determines the merge-base between the current branch and the base branch, listing all modified files.
Test Detection & Execution: It scans the changes for test files (e.g., *_test.go, *.test.js, test_*.py) and executes the workspace's test suite, capturing the outcome.
Build/Dev Verification: If configured, the script attempts to compile/build the project to ensure no build regressions are introduced.
Report Generation: It outputs a markdown report pr-[pr_number].md in the workspace root with execution logs and a skeleton for the detailed review.
Agent Analysis & Review Duties
After running the script, the AI agent must edit the generated pr-[pr_number].md to provide a professional, deep-dive code review under ## 4. Detailed Code Review. The review must analyze:
Performance: Suboptimal time/space complexity, unnecessary allocations, or blocking calls in synchronous paths.
Style & Maintainability: Compliance with idiomatic language patterns, clear naming conventions, and proper documentation/comments.
Verification Checklist
Prior to completing the PR review task, verify that:
Report Created:pr-[pr_number].md exists in the workspace root.
Tests Executed: The test execution section lists actual commands and status output.
Build Verified: Build/dev verification status is explicitly captured.
Code Review Populated: The detailed review section contains specific, actionable feedback on code quality.
Verdict Rendered: A clear recommendation (Approved / Request Changes) is provided at the bottom of the report.
1---2name: pr-review3description: Performs a detailed review of PR changes against a base branch, checks and runs tests, and runs local dev to verify stability.4license: MIT5---67# Pull Request Review & Verification89## Overview1011High-quality code reviews require verifying not just static code diffs, but also the dynamic correctness of the changes. This skill automates the process of comparing changes against a base branch, identifying and running tests, compiling/building the application locally, and generating a detailed review report.1213---1415## Automated Execution1617To run the automated PR review script, execute it from the root of the workspace:1819```bash20./pr-review/pr-review.sh <pr_number> [base_branch]21```2223Where `<pr_number>` is the identifier of the PR (used to name the output file `pr-[pr_number].md`), and `[base_branch]` is the target branch of the PR (defaults to `main` if not specified).2425---2627## Script Behavior2829* **Diff Analysis:** The script determines the merge-base between the current branch and the base branch, listing all modified files.30* **Test Detection & Execution:** It scans the changes for test files (e.g., `*_test.go`, `*.test.js`, `test_*.py`) and executes the workspace's test suite, capturing the outcome.31* **Build/Dev Verification:** If configured, the script attempts to compile/build the project to ensure no build regressions are introduced.32* **Report Generation:** It outputs a markdown report `pr-[pr_number].md` in the workspace root with execution logs and a skeleton for the detailed review.3334---3536## Agent Analysis & Review Duties3738After running the script, the AI agent must edit the generated `pr-[pr_number].md` to provide a professional, deep-dive code review under **## 4. Detailed Code Review**. The review must analyze:39401. **Logic & Correctness:** Potential edge cases, off-by-one errors, resource leaks, or race conditions.412. **Safety & Security:** SQL injection risks, unsafe pointer usage, unvalidated inputs, or insecure configuration.423. **Performance:** Suboptimal time/space complexity, unnecessary allocations, or blocking calls in synchronous paths.434. **Style & Maintainability:** Compliance with idiomatic language patterns, clear naming conventions, and proper documentation/comments.4445---4647## Verification Checklist4849Prior to completing the PR review task, verify that:50511. [ ] **Report Created:** `pr-[pr_number].md` exists in the workspace root.522. [ ] **Tests Executed:** The test execution section lists actual commands and status output.533. [ ] **Build Verified:** Build/dev verification status is explicitly captured.544. [ ] **Code Review Populated:** The detailed review section contains specific, actionable feedback on code quality.555. [ ] **Verdict Rendered:** A clear recommendation (Approved / Request Changes) is provided at the bottom of the report.
Run npx skillmds@latest add victoriacheng15/pr-review in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Performs a detailed review of PR changes against a base branch, checks and runs tests, and runs local dev to verify stability. It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free. This skill is licensed under MIT.
victoriacheng15 (@victoriacheng15) published this skill. Their other Agent Skills are listed on their SkillMD profile.