code-review
Review the current diff, or a PR number/branch/path target, for correctness bugs (plus reuse/simplification/efficiency cleanups where the model's review…
Skill by HMBSbige
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/hmbsbige-code-review
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documents, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/code-review
What's inside
- Skill name
code-review- Description
- Review the current diff, or a PR number/branch/path target, for correctness bugs (plus reuse/simplification/efficiency cleanups where the model's review recipe covers them) at the given effort level (low/medium: fewer, high-confidence findings; high→max: broader coverage, may include uncertain findings); with no level given, it reuses the level you typed last. Pass --fix to apply the findings 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.
- License
- MIT
- Instructions
- 202 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Code Review
`code-review [low|medium|high|xhigh|max] [--fix] [<pr#>|<branch>|<path>] [--max-findings <n>|all]`
## Arguments and routing
Use the requested effort level (`med` means `medium`). If omitted, reuse the last explicitly selected level in this conversation; otherwise use the current session effort, falling back to `medium` when unavailable or `high` when unsupported. Review the supplied target, or the current diff if none is given. Use the matching review section and its no-subagent fallback when needed.
`--max-findings N` overrides the report limit; `all` removes it. Remember this choice for subsequent reviews; `default` restores the selected level's default. Ignore invalid values. This affects only the report limit, not candidate budgets or verification.
Apply the findings to the working tree only when `--fix` is passed.
## Shared review scope
## Phase 0 — Gather the diff
Run `git diff @{upstream}...HEAD` (or `git diff main...HEAD` / `git diff HEAD~1` if there's no upstream) to get the unified diff under review. If there are uncommitted changes, or the range diff is empty, also run `git diff HEAD` and include the working-tree changes in scope — the review often runs before the commit. If a PR number, branch name, or file path was passed as an argument, review that target instead. Treat this diff as the review scope.
## Correctness angles
### Angle A — line-by-line diff scan
Read every hunk in the diff, line by line. Then read the enclosing function for each hunk — bugs in unchanged lines of a touched function are in scope (the PR re-exposes or fails to fix them). For every line ask: what input, state, timing, or platform makes this line wrong? Look for inverted/wrong conditions, off-by-one, null/undefined deref, missing `await`, falsy-zero checks, wrong-variable copy-paste, error swallowed in catch, unescaped regex metachars.
### Angle B — removed-behavior auditor
For every line the diff DELETES or replaces, name the invariant or behavior it enforced, then search the new code for where that invariant is re-established. If you can't find it, that's a candidate: a removed guard, a dropped error path, a narrowed validation, a deleted test that was covering a real case.
### Angle C — cross-file tracer
For each function the diff changes, find its callers (search for the symbol) and check whether the change breaks any call site: a new precondition, a changed return shape, a new exception, a timing/ordering dependency. Also check callees: does a parallel change in the same PR make a call unsafe?
### Angle D — language-pitfall specialist
Scan for the classic pitfalls of the diff's language/framework — for example: JS falsy-zero, `==` coercion, closure-captured loop var; Python mutable default args, late-binding closures; Go nil-map write, range-var capture; SQL injection; timezone/DST drift; float equality. Flag any instance the diff introduces.
### Angle E — wrapper/proxy correctness
When the PR adds or modifies a type that wraps another (cache, proxy, decorator, adapter): check that every method routes to the wrapped instance and not back through a registry/session/global — e.g. a caching provider holding a `delegate` field that resolves IDs via `session.get(...)` instead of `delegate.get(...)` will re-enter the cache or recurse. Also check that the wrapper forwards all the methods the callers actually use.
## Cleanup angles
### Reuse
The angles above hunt for bugs; this one and the next two hunt for cleanup in the changed code. Flag new code that re-implements something the codebase already has — search shared/utility modules and files adjacent to the change, and name the existing helper to call instead.
### Simplification
Flag unnecessary complexity the diff adds: redundant or derivable state, copy-paste with slight variation, deep nesting, dead code left behind. Name the simpler form that does the same job.
### Efficiency
Flag wasted work the diff introduces: redundant computation or repeated I/O, independent operations run sequentially, blocking work added to startup or hot paths. Also flag long-lived objects built from closures or captured environments — they keep the entire enclosing scope alive for the object's lifetime (a memory leak when that scope holds large values); prefer a class/struct that copies only the fields it needs. Name the cheaper alternative.
### Altitude
Check that each change fixes the root cause at the right depth rather than patching a symptom with a fragile bandaid. Special cases layered on shared infrastructure are a sign the fix isn't deep enough — prefer the simpler, more general change to the underlying mechanism over adding special cases, and name that change.
### Conventions (agent instructions)
Find the agent instruction files that govern the changed code: user-level instructions when available, the repository-root instruction file, plus any instruction file in a directory that is an ancestor of a changed file (a directory's instructions only apply to files at or below it). Read each one that exists, then check the diff for clear violations of the rules they state.
Only flag a violation when you can quote the exact rule and the exact line that breaks it — no style preferences, no vague "spirit of the doc" inferences. In the finding, name the instruction-file path and quote the rule so the report can cite it. If no instruction file applies, return nothing for this angle.
Cleanup, altitude, and conventions candidates use the same `file`/`line`/`summary` shape; in `failure_scenario`, state the concrete cost (what is duplicated, wasted, harder to maintain, or which instruction rule is broken) instead of a crash. Correctness bugs always outrank cleanup, altitude, and conventions findings when the output cap forces a cut.
## Verdicts
- **CONFIRMED** — can name the inputs/state that trigger it and the wrong output or crash. Quote the line.
- **PLAUSIBLE** — mechanism is real, trigger is uncertain (timing, env, config). State what would confirm it.
- **REFUTED** — factually wrong (code doesn't say that) or guarded elsewhere. Quote the line that proves it.
For recall-biased verification, use **PLAUSIBLE by default** — do not refute a candidate for being "speculative" or "depends on runtime state" when the state is realistic: concurrency races, nil/undefined on a rare-but-reachable path (error handler, cold cache, missing optional field), falsy-zero treated as missing, off-by-one on a boundary the code does not exclude, retry storms / partial failures, regex/allowlist that lost an anchor. These are PLAUSIBLE.
**REFUTED** only when constructible from the code: factually wrong (quote the actual line); provably impossible (type/constant/invariant — show it); already handled in this diff (cite the guard); or pure style with no observable effect.
## Inline cells
### Minimal
`minimal prompt → single careful diff pass → ≤15 findings`
Gather the diff exactly as Phase 0 describes.
Review every hunk as a careful senior engineer. Open surrounding files for context as needed using available file-reading and search capabilities plus `git log`, `git blame`, and `git show`. Hunt for correctness issues — wrong or inverted conditions, off-by-one errors, null/undefined dereferences, missing `await`, dropped error handling, removed guards or validations, broken callers of changed functions, and races. Prefer real failure modes over style; every finding needs a concrete scenario in which the code misbehaves.
Return at most 15 findings, most-severe first, as Markdown once. Under `## Findings`, write one bullet per finding as ``- `path/to/file.ext:123` — **<severity>** — <issue and concrete failure scenario>``. If nothing qualifies, return `## Findings` followed by `(none)`.
### Low
`low effort → 1 diff pass → no verify → ≤4 findings`
## Turn 1 — read
One tool call: read the unified diff (`git diff @{upstream}...HEAD; git diff HEAD` to cover both committed and uncommitted changes, or `git diff main...HEAD` / the target passed as an argument). Skip test/fixture hunks (`test/`, `spec/`, `__tests__/`, `*_test.*`, `*.test.*`, `fixtures/`, `testdata/`) — test-file changes are not reviewed at this level. No subagents, no full-file reads.
## Turn 2 — findings
Flag runtime-correctness bugs visible from the hunk alone: inverted/wrong condition, off-by-one, null/undefined deref where adjacent lines show the value can be absent, removed guard, falsy-zero check, missing `await`, wrong-variable copy-paste, error swallowed in a catch that should propagate. Also flag — still from the hunk alone — new code that duplicates an existing helper visible in the diff context, and dead code the diff leaves behind.
Do **not** flag style, naming, perf, missing tests, or anything outside the hunk.
Output at most **4 findings**, most-severe first, one line each: `path/to/file.ext:123 — what's wrong and the concrete failure`. If nothing qualifies, output exactly `(none)`.
### Medium
`medium effort → 3+5 angles × 6 candidates → 1-vote verify → ≤8 findings`
You are reviewing for **precision** at medium effort: every finding you surface should be one a maintainer would act on.
Run **8 independent finder angles** via the available subagent mechanism. Each surfaces **up to 6 candidate findings** with `file`, `line`, a one-line `summary`, and a concrete `failure_scenario`. If the subagent mechanism is not available in your current tool set, do not error — perform each angle (and each verification) yourself, sequentially, in this context.
Use correctness angles A-C and all five cleanup angles. Pass every candidate with a nameable failure scenario through — finders that silently drop half-believed candidates bypass the verify step and are the dominant cause of misses.
Dedup candidates that point at the same line/mechanism, keeping the one with the most concrete failure scenario. For each remaining candidate, run **one verifier** via the available subagent mechanism: give it the diff, the relevant file(s), and the candidate, and have it return exactly one of CONFIRMED, PLAUSIBLE, or REFUTED.
Keep candidates where the vote is CONFIRMED or PLAUSIBLE.
### HighFrom HMBSbige/skills, MIT.
More from HMBSbige/skills
- 0.587score
dotnet-cpu-hot-paths
HMBSbige
Use when implementing, optimizing, or reviewing performance-critical C#/.NET scalar or SIMD hot paths whose throughput depends on RyuJIT code generation
SkillAFreshness: A★ 1Claude Code +9 - 0.586score
wsl-pwsh
HMBSbige
在 Windows 的 pwsh 中调用 WSL 程序,或执行需要 Bash 管道、变量、重定向或多行脚本的 WSL 命令时
SkillAFreshness: A★ 1Claude Code +9 - 0.541score
csharp-style
HMBSbige
Use when writing, editing, reviewing, or refactoring C#/.NET code
SkillBFreshness: B★ 1Claude Code +9 - 0.497score
systematic-debugging
HMBSbige
Use when diagnosing a bug, test or build failure, performance regression, intermittent fault, or other unexpected technical behavior.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
verification-before-completion
HMBSbige
Use immediately before claiming that implementation, a bug fix, refactor, review remediation, build, test state, or generated artifact is complete, correct…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
git-conventions
HMBSbige
Use when creating, editing, reviewing, or suggesting Git commit messages
SkillCFreshness: C★ 1Claude Code +9 - 0.467score
testing-strategy
HMBSbige
Use when a code change needs a testing approach chosen or revised, or when writing or changing nontrivial tests whose falsifiability, boundary, doubles, or…
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 3, 2026 (26 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/HMBSbige/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from HMBSbige
- 0.587score
dotnet-cpu-hot-paths
HMBSbige
Use when implementing, optimizing, or reviewing performance-critical C#/.NET scalar or SIMD hot paths whose throughput depends on RyuJIT code generation
SkillAFreshness: A★ 1Claude Code +9 - 0.586score
wsl-pwsh
HMBSbige
在 Windows 的 pwsh 中调用 WSL 程序,或执行需要 Bash 管道、变量、重定向或多行脚本的 WSL 命令时
SkillAFreshness: A★ 1Claude Code +9 - 0.541score
csharp-style
HMBSbige
Use when writing, editing, reviewing, or refactoring C#/.NET code
SkillBFreshness: B★ 1Claude Code +9 - 0.497score
systematic-debugging
HMBSbige
Use when diagnosing a bug, test or build failure, performance regression, intermittent fault, or other unexpected technical behavior.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
verification-before-completion
HMBSbige
Use immediately before claiming that implementation, a bug fix, refactor, review remediation, build, test state, or generated artifact is complete, correct…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
git-conventions
HMBSbige
Use when creating, editing, reviewing, or suggesting Git commit messages
SkillCFreshness: C★ 1Claude Code +9
Cite this page
code-review skill. Agent Mart. https://agentmart.dev/skills/hmbsbige-code-review (last updated 2026-10-24)