code-review

Reviews code scopes or GitHub pull requests and generates ranked markdown issue reports.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/PeteRichardson/skills --skill code-review-peterichardson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/PeteRichardson/skills/tree/main/code-review
Command: npx skills add https://github.com/PeteRichardson/skills --skill code-review-peterichardson

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing a codebase or pull request manually is slow and inconsistent, and findings get lost between sessions. This Skill produces a prioritized, categorized report of code issues saved as a markdown snapshot, so you can work through problems one at a time across multiple sessions. ## Core Features & Use Cases - Scope and PR review modes: Analyze a folder, file, or glob in the working tree, or review a GitHub pull request by number or URL using gh without touching the working tree. - Severity-ranked findings: Issues are categorized as HIGH (security, memory, crashes), IDIOM (language best practices with three-dimension scoring), MEDIUM (inefficiencies), and LOW (style), with all HIGH issues shown plus the top-scoring IDIOM and MEDIUM findings. - Persistent reports: Reports are saved as gitignored markdown files in docs/reviews/ with frontmatter metadata, letting you reference issues by name days later and refresh line numbers after fixes. - Use Case: Before merging a pull request, run a review of PR 68 to get a report limited to the lines the PR changed, fix the findings on the branch, and file anything non-blocking as GitHub issues. ## Quick Start Ask the assistant to run a code review on the src folder or on pull request 68 and show the prioritized report.

Frequently Asked Questions about code-review

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

FAQPage Schema
How do I review a GitHub pull request before merging?

Run the review with the PR number, such as /code-review 68 or a full PR URL. The skill uses gh to fetch the PR diff and head commit, analyzes only added or modified lines, and writes a dated markdown report without checking out any branch.

How do I review only security issues in a codebase?

Use the focus flag with the high category, for example /code-review src/ --focus high. This filters the report to HIGH severity findings only, covering security vulnerabilities, memory safety problems, crashes, and severe correctness bugs.

Does the code review work on pull requests from forks?

Yes. The skill fetches the PR head via git fetch origin pull/<n>/head, which works for fork PRs, and reads files with git show against that sha. It requires gh to be authenticated and never modifies the working tree.

Why do old review report line numbers not match my code?

Line numbers drift as you edit files after a report is generated. Run the review again with --refresh to produce a new dated report with current line numbers, since each date gets its own snapshot file.

What are the limitations of automated code review on large repos?

The skill asks for confirmation when a scope exceeds 30 code files, and very large analyses can exceed token budgets. Narrow the scope to a folder or file, or filter by language, to keep reviews manageable.