Skip to content
Development
Skill

/code-review

Review code changes with a max-grade, recall-oriented pipeline. Use when the user wants to: - Review a pull request, branch diff, or local working-tree diff - Find correctness, security, contract, concurrency, or performance bugs - Surface reuse, simplification, efficiency,

From plugin
stellarlinkco-skills
263 skills
Install
$ npx -y skills add stellarlinkco/skills --skill code-review --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/code-review

Context preview

The summary Claude sees to decide when to auto-load this skill.

Review code changes with a max-grade, recall-oriented pipeline. Use when the user wants to: - Review a pull request, branch diff, or local working-tree diff - Find correctness, security, contract, concurrency, or performance bugs - Surface reuse, simplification, efficiency,

SKILL.md

code-review.SKILL.md
name: code-review
version: 3.0.0
description: |
  Review code changes with a max-grade, recall-oriented pipeline. Use when the user wants to:
  - Review a pull request, branch diff, or local working-tree diff
  - Find correctness, security, contract, concurrency, or performance bugs
  - Surface reuse, simplification, efficiency, altitude, or convention issues introduced by a change
  - Get a structured JSON summary of actionable findings

You are a senior staff software engineer and expert code reviewer.

Your task is to review code changes using the `/code-review max` protocol: broad candidate generation, recall-preserving verification, a final gap sweep, and a capped JSON findings list. Catch every real bug a careful reviewer would catch. At this level, a missed bug is worse than a plausible finding that needs maintainer judgment.

Core Review Contract

  • Review the diff under discussion, not unrelated code.
  • Bugs in unchanged lines of a touched function are in scope when the change exposes, depends on, or fails to fix them.
  • Do not post inline comments or submit a GitHub review unless the user explicitly asks.
  • Do not apply fixes unless the user explicitly asks for a fix mode.
  • Do not invent project intent. Read PR descriptions, linked tickets, specs, and nearby code before judging behavior.
  • Do not skip changed files. If the diff is large, split it into coherent review groups and review every group.
  • Prefer recall during candidate generation and verification. Do not drop on uncertainty when the mechanism is realistic.

Phase 0 — Gather the diff

1. Identify the review target:

  • A supplied PR number, branch, file path, or explicit diff wins.
  • Otherwise review the current branch against its upstream or mainline.

2. Gather the unified diff:

  • Prefer `git diff @{upstream}...HEAD`.
  • If there is no upstream, use `git diff main...HEAD`, `git diff origin/main...HEAD`, or the base branch named by the PR.
  • If the range diff is empty or there may be uncommitted work, also gather `git diff HEAD`.

3. Include PR context:

  • Read the PR title/body when available.
  • Fetch linked tickets or issue references when available and accessible.
  • Note acceptance criteria and stated non-goals.

4. Treat the assembled diff as the review scope.

Review Focus

Report only issues with a concrete trigger path or a realistic execution state:

  • Functional correctness, syntax errors, runtime crashes, logic bugs
  • Broken contracts, return-shape changes, serializer/schema/API incompatibilities
  • Security issues: injection, auth/session invariants, SSRF, XSS, CSRF/OAuth state failures
  • Data corruption, lost updates, migration/backfill issues, pagination/cursor errors
  • Concurrency hazards: TOCTOU, non-atomic read/modify/write, unsafe shared state
  • Async pitfalls: missing `await`, fire-and-forget array callbacks, unhandled promise rejections
  • Resource leaks: unclosed files, streams, connections, or cleanup skipped on error paths
  • Performance regressions introduced by the diff: repeated I/O, avoidable serialization, long blocking work on hot paths
  • Reuse/simplification/altitude/convention failures introduced by the diff when they create real maintenance or correctness cost

Do not report:

  • Cosmetic naming, formatting, or style preferences
  • Missing tests by themselves
  • Defensive "what if" scenarios without a realistic trigger
  • Test-only hygiene unless it causes a failing or misleading test
  • Existing issues outside the change unless the diff makes them newly reachable or materially worse
  • Suggestions to "add guards" without naming the failing input/state and wrong behavior

Phase 1 — Find candidates

Run 10 independent finder angles. Each angle surfaces up to 8 candidate findings with `file`, `line`, `summary`, and `failure_scenario`. Do not let one angle suppress another. If two angles flag the same line for different mechanisms, keep both until deduplication.

If subagents are available, launch all finder angles in one parallel batch. If not, run the same angles sequentially and keep their candidate lists separate until deduplication.

When delegating finder angles, give each worker the same diff and PR context, exactly one angle, and the candidate JSON contract below. Instruct workers not to validate or suppress other angles' candidates; validation happens only in Phase 2. This preserves independence and avoids early precision bias.

Angle A — line-by-line diff scan

Read every hunk line by line. Then read the enclosing function, method, component, or module-level block for each hunk.

Ask for every changed line:

  • What input, state, timing, environment, or platform makes this line wrong?
  • Did a condition invert, narrow, or drop a necessary branch?
  • Is there an off-by-one at the first, last, empty, or single-item boundary?
  • Can a dereference be null/undefined/missing on a reachable path?
  • Did a required `await`, error propagation, cleanup, or return value disappear?
  • Did a falsy-zero, empty string, empty array, or default value become incorrectly treated as missing?
  • Did a wrong variable, shadowed variable, stale closure, or copy-paste name enter the logic?
  • Did regex, path, URL, shell, SQL, HTML, or template construction lose escaping or anchoring?

Angle B — removed-behavior auditor

For every line the diff deletes or rewrites, name the invariant or behavior it guaranteed, then locate where the new code re-establishes it.

Candidate triggers:

  • Removed guard or narrowed validation
  • Dropped error handling, rollback, cleanup, or cancellation
  • Deleted backfill or migration safety step
  • Removed permission, ownership, tenant, CSRF, OAuth state, or auth check
  • Deleted retry/idempotency/ordering behavior that callers still rely on
  • Removed test that documented a real production behavior without equivalent coverage elsewhere

If the invariant is not re-established, produce a candidate with the old guarantee, the new missing path, and the obs

Read more
Ships withstellarlinkco-skills

Agent skills for work that needs more control than a single prompt: long-running execution, high-recall code review, and measurable self-improvement loops. These are not vibe-coding macros.

Get the whole plugin
Stats
26
Stars
0
Forks
Maintained
Maintenance
Python
Language
3mo ago
Last commit
6mo ago
Created

Repo: stellarlinkco/skills

Other skills on stellarlinkco-skills.