code-review

Reviews git diffs against coding standards and spec requirements using parallel sub-agents.

1|2|Updated Nov 25, 2017
One-click install
npx skills add https://github.com/asarchami/dotfiles --skill code-review-asarchami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-review
Source: https://github.com/asarchami/dotfiles/tree/main/dot_config/opencode/skills/code-review
Command: npx skills add https://github.com/asarchami/dotfiles --skill code-review-asarchami

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reviewing a branch or PR requires checking two separate things — whether the code follows the project's standards and whether it actually implements what was asked — and doing both in one pass often means one concern pollutes the other or gets skipped entirely. ## Core Features & Use Cases - Two-axis review: Runs a Standards axis (repo-documented standards plus a fixed Fowler code-smell baseline) and a Spec axis (does the diff match the originating issue or PRD) 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 three-dot git diff, with upfront validation that the ref resolves and the diff is non-empty. - Spec discovery: Automatically locates the originating spec from issue references in commit messages (via gh), user-provided paths, or spec files under spec/, docs/, or specs/. - Use Case: Before merging a feature branch, ask for a review since main and receive separate Standards and Spec reports, each citing the violated rule or spec line, with hard violations distinguished from judgement calls. ## Quick Start Ask the assistant to review the changes since main using the code-review skill and point it to the relevant issue or spec file.

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 since a specific commit or branch?

Provide a fixed point such as a commit SHA, branch name, tag, or HEAD~5, and the skill diffs it against HEAD using three-dot syntax so the comparison runs against the merge-base. It validates the ref and confirms the diff is non-empty before reviewing.

How does the code review check against coding standards?

The Standards axis reads any documented standards in the repo, such as CODING_STANDARDS.md or CONTRIBUTING.md, and adds a fixed baseline of Fowler code smells like Duplicated Code, Feature Envy, and Shotgun Surgery. Documented repo standards always override the baseline.

Can the review verify code against an issue or spec?

Yes, the Spec axis locates the originating spec from issue references in commit messages (fetched via gh when available), a user-provided path, or spec files under spec/, docs/, or specs/. It reports missing requirements, scope creep, and incorrect implementations with quoted spec lines.

What happens if there is no spec for the changes being reviewed?

If no spec is found and the user confirms none exists, the Spec sub-agent skips and reports that no spec is available. The Standards review still runs normally, and the missing spec is noted in the final report.

Why does the review run standards and spec checks separately?

A change can pass one axis and fail the other: code may follow every standard but implement the wrong thing, or match the spec while breaking project conventions. Keeping the axes separate prevents findings from being merged or reranked across concerns.