Skip to content
Back to skills

Critique

ASecurity

Multi-lens code review of a change, PR or MR, severity-ranked; --fix also fixes the Important findings. Use to review or audit a changeset.

  • 16 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 6, 2026
ai-agentsgobashgitsecurity

Works with

  • mcp

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 6, 2026

npx -y skills add Alexander-Tyagunov/magician --skill critique --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Critique?

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

Security grade badge for Critique
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexander-tyagunov-critique/badge)](https://www.skillsdirectory.com/skills/alexander-tyagunov-critique)

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: critique
description: Multi-lens code review of a change, PR or MR, severity-ranked; --fix also fixes the Important findings. Use to review or audit a changeset.
effort: high
allowed-tools: Read, Grep, Glob, Bash(ugrep *), Bash(rg *), Bash(grep *), Bash(mkdir -p .workspace/local), Agent, AskUserQuestion, mcp__context7__resolve-library-id, mcp__context7__query-docs, Bash(gh pr view *), Bash(gh pr diff *), Bash(gh pr checks *), Bash(gh pr list *), Bash(glab mr view *), Bash(glab mr diff *), Bash(glab mr list *), Bash(glab ci status *), Bash(git merge-base *), Bash(kg check), Bash(kg query *), Bash(kg blast *), Bash(kg neighbors *), Bash(ctx recall *), Bash(ctx signal finding *), Bash(ctx learn line), Bash(evidence record *), Edit(./.workspace/shared/diffs/**), Edit(~/.claude/plugins/data/magician-*/divine-monitor.json)
argument-hint: "[PR/MR URL · branch · base ref · \"working tree\"] [--fix] [--lens <name>] [monitor <repo>]"
---

# /critique — Code review

> **Bundled command:** if `ctx` is not found, run it as `${CLAUDE_PLUGIN_ROOT}/tools/ctx`, or skip it.

> **Bundled command:** if `evidence` is not found, run it as `${CLAUDE_PLUGIN_ROOT}/tools/evidence`.

> **Bundled command:** if `kg` is not found, run it as `${CLAUDE_PLUGIN_ROOT}/tools/kg` and give subagents that full path, or search the code directly.

Review a change for bugs, security defects and broken project rules. Report by default; `--fix` also fixes the `Important` findings. Not for a security-only scan: `/security-scan`. `/migrate` invokes `/critique` as its G7 gateway, checked against `.workspace/shared/research/<feature>-parity.md`.

## Completion Signal

> "Critique complete. <N Important, N Nit, N Pre-existing; N fixed, N closed with reason>."

After fix rounds add "Final gate: <GO | NO-GO | UNVERIFIED>."

In a top-level interactive run, run `ctx learn line` last; when it prints a line, append it unchanged as the final line. Print nothing when it prints nothing, when `ctx` is missing, and in a dispatched, headless or parent-invoked run.

## Dialect

It speaks the dialect of [`lore/review.md`](../../lore/review.md):
- A finding is a bug or a violation of a rule in `CLAUDE.md` or `REVIEW.md`, marked `Important`, `Pre-existing` or `Nit`, with a suggested fix.
- A cleanup is `/simplify` territory, not a finding: count the candidates in one closing line. With `--lens simplifier` the cleanups are the findings.
- Nits are capped. Fix rounds stop after three.

**`REVIEW.md`.** Read the root file on the default branch and the one in every folder above a changed file ([where](references/change-context.md#5-conventions-and-reviewmd)). Its values override the defaults, and its text goes into every lens prompt. Suggest a [platform alternative](../../lore/deep/review.md#platform-surfaces) when it fits better. None yet: [template](references/review-md-template.md).

## Autonomy

Gates: posting comments to a PR or MR, pushing fix commits, closing an `Important` finding without a fix. Everything else runs without asking.

## Phase 0 — Change context

**Monitor mode:** when `$ARGUMENTS` starts with `monitor` (an unattended `/loop`, no fixes), follow [monitor-mode.md](references/monitor-mode.md) instead.

Read [change-context.md](references/change-context.md). Resolve the target from `$ARGUMENTS` (a PR/MR URL, a branch, a base ref, or "working tree"). Gather the diff, the PR/MR description and tickets, CI status and in-repo grounding. Drop the `REVIEW.md` skip paths. Measure the diff size and the risk tier. Before the verdict, run `ctx recall "<changed area>"` and check the diff against any decision or convention page it returns; a stale page is not grounds for a finding.

## Phase 1 — Depth

Derive the depth from the size and the risk tier. Do not ask:
- **Quick:** a small diff (3 files or fewer, 300 changed lines or fewer) at Low tier.
- **Standard:** everything else below High tier.
- **Deep:** a High-tier change at any size.
- **Exhaustive:** only when the request names it.

A depth the request names wins. State it in one clause: "Standard review: 9 files, +412/−38, Medium tier (say `deep` to go further)." Matrix: [depth-and-research.md](references/depth-and-research.md). Depth alone never calls for `/research`: invoke it first only when the change is on unfamiliar ground or names a library decision.

## Phase 2 — Multi-lens review

First run `mkdir -p .workspace/local`. A safety fallback can change the model mid-review; the report names it ([why](references/dispatch.md#model--effort-per-lens)).

Lenses: `magician:reviewer`, `magician:sentinel`, `magician:simplifier`, `magician:guardian` (a diff that touches agents, hooks, skills or prompts), `magician:verifier` (Deep and Exhaustive, always fresh). `--lens <name>` runs only that lens. Pick the path by measured diff size ([`lore/fold-first.md`](../../lore/fold-first.md)):
- **Small** (3 files or fewer, 300 changed lines or fewer): run each lens but the verifier in the main loop, with `agents/<lens>.md` as its checklist. Quick depth here makes no `Agent` call. A High-tier change dispatches its lenses fresh at any size.
- **Larger:** write the diff once to `.workspace/shared/diffs/<ref>.patch`, then dispatch the lenses in parallel, in one message ([fork or fresh](../../lore/deep/review.md#fork-or-fresh)).

Spawn prompts are self-contained: [templates](references/dispatch.md), [contract](../../lore/subagent-context.md). On `NEEDS_CONTEXT`, add the input and re-dispatch.

Finders optimize for recall: never tell a lens to be conservative or to skip nits. Phase 3 removes the noise.

## Phase 3 — Adversarial verification

Try to refute every Critical and High finding against the code and the intent, in a fresh context, never in a fork (independent votes at Exhaustive). At Quick on a small diff, run it in the main loop and state `Verification: in-loop` in the report. Keep the survivors, list the rest as dropped ([details](references/depth-and-research.md#adversarial-verification)).

## Phase 4 — Report

Deduplicate and rank, then follow [report-format.md](references/report-format.md). The contract:
- The first line under the heading is the count line, plain, in this order: `N Important, N Nit, N Pre-existing; N fixed, N closed with reason.`
- Line two is the depth clause above.
- Every finding line starts with its tag (`**[Important]**`, `**[Nit]**`, `**[Pre-existing]**`) and cites `file:line`, never a bare file, with impact and fix.
- A refuted candidate goes only under Dropped. The closing signal repeats the count line; it never replaces it.

In a top-level run, run `ctx signal finding <class>` once per Important finding, with the closest class from `ctx signal --list`; skip a finding that fits none. It records a fixed key, never the finding text.

## Phase 5 — Deliver and post

Present the report in chat. Post to a PR/MR only on request:

<HARD-GATE>
A post publishes on the user's behalf. Show the exact text and confirm through `AskUserQuestion`: options **Post as a comment** (one review with the report) or **Do not post** (it stays in chat). Check the GitHub/GitLab account before any `gh` or `glab` write.
</HARD-GATE>

Commands: [report-format.md](references/report-format.md#posting-to-the-pr).

## Phase 6 — Fix rounds

Run them with `--fix`. When the request itself already says to fix ("review and fix"), or the change runs under an approved plan, that is the answer too. Go on in the same turn as the report; never offer the fix as a question. Otherwise stop at the report. Follow [fix.md](references/fix.md): the rounds, the ledger, the one question, the final gate, the push gate.

## Obstacles

As a consumer, roll the lenses' Obstacles blocks into one report, separate from the findings. A lens `NEXT` that proposes a lint rule or a `CLAUDE.md` line goes to the user as a suggestion. Memorize a confirmed pattern with `ctx memory add --kind pitfall` in your own words, never secrets or PII. As a producer, on a non-clean run return the Obstacles block from [`lore/obstacles.md`](../../lore/obstacles.md) (fields: STATUS, OBSTACLE, BLOCKER, SEVERITY, WORKAROUND, RECURRENCE, SCOPE, NEXT) with what you completed.

Files in this skill

  • SKILL.md8 KB
  • references/change-context.md6.9 KB
  • references/depth-and-research.md7.3 KB
  • references/dispatch.md9.2 KB
  • references/fix.md6 KB
  • references/monitor-mode.md4.6 KB
  • references/report-format.md6.8 KB
  • references/review-md-template.md3.9 KB

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.