Skip to content
Back to skills

Code Review

ASecurity

Review the current diff, or a PR number/branch/path target, for correctness bugs (plus broken CLAUDE.md rules and cleanups where the model''s recipe covers them; see /simplify) at the effort level given first, before any target (low|medium|high|xhigh|max: from few high-confidence findings to many, some uncertain; ultra: deep multi-agent review in the cloud); with no level given, it reuses the level you typed last. Pass --comment to post findings as inline PR comments, or --fix to apply them t...

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
ai-agentsgobashcode-reviewgitapi

Works with

  • api

Security analysis

A100/100

Scanned December 6, 2026

npx -y skills add tomorrow-dev/tomorrow-code --skill code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Review?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tomorrow-dev-code-review/badge)](https://www.skillsdirectory.com/skills/tomorrow-dev-code-review)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-review
allowed-tools: Bash(git diff *), Bash(git status *), Bash(git log *), Bash(git show *), Bash(git merge-base *), Bash(git rev-parse *), Bash(gh pr *), Read, Glob, Grep, LS, Task, ReportFindings
description: 'Review the current diff, or a PR number/branch/path target, for correctness bugs (plus broken CLAUDE.md rules and cleanups where the model''s recipe covers them; see /simplify) at the effort level given first, before any target (low|medium|high|xhigh|max: from few high-confidence findings to many, some uncertain; ultra: deep multi-agent review in the cloud); with no level given, it reuses the level you typed last. Pass --comment to post findings as inline PR comments, or --fix to apply them to the working tree after the review. Pass --max-findings <n> to report up to n findings, or --max-findings all for every finding. The choice stays until you pass --max-findings default.'
menu-description: 'Review the diff or a PR for correctness bugs'
argument-hint: '[low|medium|high|xhigh|max|ultra] [<target>] [--fix] [--comment] [--max-findings <n>|all|default]'
---

`/code-review → reviewers in parallel → verify → ReportFindings`

Arguments: `$ARGUMENTS`

## Arguments

- **Level**: the first word, one of `low`, `medium`, `high`, `xhigh`, `max`. It sets how many
  reviewers run and how sure a finding must be: `low` keeps few, high-confidence findings; `max`
  keeps many, some uncertain. With no level, reuse the one of the last call in this conversation,
  `medium` when there was none.
- **`ultra`**: do not review. Answer exactly: `ultra runs a deep multi-agent review in the cloud;
  it is not available here. Use max for the deepest local review.` and stop.
- **Target**: what follows the level. A PR number (`gh pr diff <n>`), a branch (`git diff
  <branch>...HEAD` against its merge base), a path (the changes under it), or nothing for the
  current diff.
- **`--fix`**: after the review, apply the fixes to the working tree, then report again with each
  finding's `outcome` (`fixed`, `skipped`, `no_change_needed`).
- **`--comment`**: post each finding as an inline comment on the PR with `gh api` (needs a PR
  target or the PR of the current branch); say so and skip when there is none.
- **`--max-findings <n>|all|default`**: report at most `n` findings, all of them, or the level's
  default. The choice stays for the next calls of this conversation until `default` is passed.

## Phase 0 — Gather the diff

With no target: `git diff @{upstream}...HEAD`, or `git diff main...HEAD` / `git diff HEAD~1` when
there is no upstream. If the working tree has uncommitted changes, or that range is empty, add
`git diff HEAD`. With a target, take its diff instead. This diff is the review scope. Read the
`CLAUDE.md` files that govern the changed paths.

## Phase 1 — Review

Launch the reviewers with the Task tool, **all in a single message**, so they share the warm
prompt prefix and run concurrently. Give each the diff and one angle:

1. **Logic**: wrong conditions, off-by-one, inverted checks, unhandled states, broken invariants.
2. **Edge cases**: empty, missing, concurrent or oversized input; error paths; resource cleanup.
3. **Contracts**: callers and callees of the changed code (Grep them): changed signatures, types,
   semantics, tests that now lie.
4. **Rules**: the changed lines against the instructions of `CLAUDE.md`.

Number of reviewers by level: `low` 1 (logic and edge cases together), `medium` 2, `high` 3,
`xhigh` and `max` 4, with `max` adding a second pass over the files with the most findings.
Each returns `file`, `line`, a one-line `summary`, and a `failure_scenario`: concrete input or
state, then the wrong output or crash.

## Phase 2 — Verify

For each candidate, read the surrounding code and try to refute it. Drop what you cannot make
fail with a concrete scenario (at `max`, keep it as uncertain). Merge duplicates. Do not report
style, naming, or what the diff did not change.

## Phase 3 — Report

Call `ReportFindings` once with the verified findings, most severe first (an empty array when none
survived), the `level` the review ran at, and `severity` where the schema allows it. Do not also
print them as text. Cap the list at the `--max-findings` choice.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.