code-review

Reviews a git diff against coding standards and the originating spec using parallel sub-agents.

Updated May 19, 2026
One-click install
npx skills add https://github.com/wenyue/SmartKit --skill code-review-wenyue
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/wenyue/SmartKit/tree/main/skills/code-review
Command: npx skills add https://github.com/wenyue/SmartKit --skill code-review-wenyue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Code reviews often conflate two separate questions — does the code follow the repo's standards, and does it implement what was actually asked for — letting one axis mask failures in the other. This Skill separates them into independent parallel reviews so neither hides the other's findings. ## Core Features & Use Cases - Two-axis review: Runs a Standards review (repo-documented conventions plus a fixed Fowler code-smell baseline) and a Spec review (fidelity to the originating issue or spec) as parallel sub-agents, then reports them side by side without merging or reranking. - Fixed-point diffing: Reviews changes since any commit, branch, tag, or merge-base using git diff <fixed-point>...HEAD, with upfront validation that the ref resolves and the diff is non-empty. - Spec source discovery: Locates the originating spec from issue references in commit messages, a user-provided path, or files under docs/, specs/, or .scratch/. - Use Case: Before merging a feature branch, ask for a review since main — you get a Standards report citing violated conventions and possible code smells, plus a Spec report listing missing requirements and scope creep, each under 400 words. ## Quick Start Ask the assistant to review the changes on this branch since main using the code-review skill.

Frequently Asked Questions about code-review

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

FAQPage Schema
How do I review all changes on a branch since main?▼

Provide the fixed point — a commit SHA, branch name, tag, or expression like HEAD~5 — and the review runs against `git diff <fixed-point>...HEAD` using the merge-base. The ref is validated with `git rev-parse` and the diff is checked to be non-empty before the review starts.

What coding standards does the review check against?▼

It checks files in the repo that document conventions, such as CODING_STANDARDS.md or CONTRIBUTING.md, plus a fixed baseline of Fowler code smells like Duplicated Code, Feature Envy, and Shotgun Surgery. Documented repo standards always override the baseline, and anything tooling already enforces is skipped.

What happens if there is no spec or issue for the changes?▼

The review looks for issue references in commit messages, a user-provided path, or spec files under docs/, specs/, or .scratch/. If none exists and the user confirms there is no spec, the Spec sub-agent is skipped and the final report notes that no spec was available.

Why are standards and spec findings reported separately?▼

A change can pass one axis and fail the other — code can follow every convention but implement the wrong thing, or match the spec while breaking project conventions. Keeping the reports separate prevents one axis from masking failures in the other, so findings are never merged or reranked.

Can I review uncommitted work-in-progress changes?▼

The review is built around a diff between HEAD and a fixed point, so it covers committed work on a branch or since a tag. Uncommitted changes would need to be committed first so they appear in the `git diff <fixed-point>...HEAD` output.