plugins/review/skills/review/SKILL.md
Use when user invokes /review to review code changes. Also triggers on "review my code", "check this PR", "look at my changes". Accepts a PR number (e.g. /review 123), a path filter (e.g. /review src/auth/), or no argument (reviews current branch vs base). Produces structured per-file review with severity labels, cross-file analysis, and an overall verdict. Do NOT use for explaining what code does — use /explain instead.
npx skillsauth add harnessprotocol/harness-kit reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce structured code reviews for local branch changes, open PRs, or scoped paths. Designed to give concrete, actionable feedback — not a vague summary.
Core principles:
/review # review current branch vs base branch
/review 123 # review PR #123 via gh pr diff
/review src/auth/ # review changes scoped to a path
/review main...HEAD # review with explicit git range
You MUST follow this order. No skipping steps.
Classify the argument:
| Input | Detection | Action |
|-------|-----------|--------|
| No argument | Empty / bare /review | Review current branch vs base using git diff main...HEAD |
| PR number | Numeric string (e.g. 123) | Fetch diff with gh pr diff 123 |
| Path filter | Looks like a file or directory path | Scope git diff main...HEAD -- <path> to that path |
| Git range | Contains ... or .. | Use directly as the git range |
If gh CLI is not available and user provided a PR number: say "gh CLI not found — run brew install gh and authenticate with gh auth login to review PRs by number. For local branch review, run /review without arguments." Then stop.
Run the appropriate command to get the diff:
git diff main...HEAD (or git diff $(git merge-base HEAD main)..HEAD if the first fails)gh pr diff <number>git diff main...HEAD -- <path>If the diff is empty: say "No changes detected in [scope]. Make sure you're on a feature branch with committed changes." Then stop.
Parse the diff to identify:
Categorize each changed file:
| Category | Examples |
|----------|---------|
| New logic | New functions, classes, services, handlers |
| Refactor | Moving/renaming code, changing interfaces |
| Test | *_test.*, *.spec.*, test/**, __tests__/** |
| Config | *.json, *.yaml, *.toml, Makefile, Dockerfile |
| Docs | *.md, *.txt, docs/** |
| Schema | Migrations, GraphQL schemas, Protobuf |
State the classification in the output — it tells the reader what kind of review to expect.
For each changed file, produce a structured review block:
### <file path> (<category>)
**Summary:** One sentence: what changed and why (inferred from the diff).
**Concerns:**
- [BLOCKER] <specific issue with line reference> — <why this breaks things, suggested fix>
- [WARNING] <issue> — <why this matters>
- [NIT] <style/naming issue> — <suggested fix>
**Questions:**
- <anything unclear about the intent that a human author should clarify>
**Praise:** <one sentence max, only if genuinely noteworthy. Omit entirely if nothing stands out.>
Severity definitions:
If a file has no concerns: write "No concerns." and move on. Don't invent issues.
After reviewing individual files, look across the whole changeset:
Missing test coverage: Are there new logic files with no corresponding test changes? Call them out specifically: "No test changes for src/auth/validator.ts — the new validation path is untested."
Inconsistencies: Do related files contradict each other? (e.g. an interface updated in one file but not in its implementor, a constant renamed in one place but not another)
API contract changes: Did any public interface, exported function signature, or API endpoint change? If yes, flag whether callers were updated.
Unjustified dependencies: Were any new packages added (package.json, go.mod, requirements.txt, etc.)? If yes, note them and ask why — each new dependency is a surface area and maintenance burden.
If nothing notable across files: write "No cross-file concerns."
Output the complete review to the conversation in this order:
Overall verdict must be one of:
Example verdict block:
---
**Verdict: Request Changes**
Blockers:
- `src/payment/processor.ts:47` — integer overflow on amounts > 2^31 (see above)
| Mistake | Fix | |---------|-----| | Vague concerns without line numbers | Always include file path. Include line number when visible in the diff. | | Reviewing every file the same depth | Skim config/docs changes; focus depth on new logic and schema changes. | | Inflating every issue to a blocker | Reserve BLOCKER for things that will actually break production. | | Adding praise when there's nothing to say | Omit the Praise field entirely if nothing genuinely stands out. | | Posting comments or modifying files | This skill is read-only. Output to conversation only. | | Stopping because gh CLI is missing | Fall back to local diff mode. Only fail if user explicitly requested a PR number. |
tools
Harness Kit documentation — installation, plugin catalog, creating plugins, cross-harness setup, architecture, and FAQ. Use when working with or configuring harness-kit plugins, understanding the plugin/skill system, installing slash commands, setting up AI coding tool configuration, answering questions about the plugin marketplace, writing SKILL.md files, using harness.yaml, or integrating with Copilot, Cursor, or Codex. Do NOT use for general Claude Code questions unrelated to harness-kit.
development
Use when user invokes /stats or asks about Claude Code usage, token consumption, session history, model distribution, or activity patterns. Generates an interactive HTML dashboard with charts and tables, auto-opens in browser. Also triggers on "how much have I used Claude", "show my usage", "token usage", "session stats", "usage report", "usage dashboard". Do NOT use for API billing or cost estimation — token counts are not costs.
testing
Use when user invokes /research command with any source — URL, GitHub repo, YouTube video, podcast, Reddit post, academic paper, documentation page, product site, local file, or empty. Processes and indexes research materials with raw source preservation and topic-level synthesis coalescing. Do NOT use for quick factual questions — use /explain instead.
development
Use when user invokes /refresh-research to re-fetch refreshable research sources, detect meaningful changes, and update synthesis files. Supports specific files, categories, staleness thresholds, backfill of source_type, and audit-only dry runs.