/tstack:diff-reviewfrom tstack
Review a code diff. This skill MUST be used when the user provides a diff or asks for a code, PR or MR review, and once before substantial or high-risk code is handed back or opened as a PR or MR. It MUST NOT be skipped because the diff is small. A diff this conversation wrote MUST go to an independent reviewer; only a small, low-risk change gets a lightweight self-review. The same review MUST cover security-relevant changes following security-scan and changed screens following ui-review, and it checks what a change could break elsewhere. It MUST NOT be used for changes limited to documentation, prose, images or formatting. Triggers on: 幫我 review, 看 diff, PR review, MR review, code review, 影響範圍, 看看程式有沒有問題
Ships in tstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is the single entry for code review. One reviewer reviews the code, covers the security part following security-scan and the screens following ui-review, and returns one report.
Apply the core's Independent Review.
| You are | Do |
|---|---|
| The main conversation, and it wrote or changed any part of the diff | Do not review. Follow Dispatching the review, then Final output |
| The main conversation, and the diff is a small, low-risk change of its own | Do a lightweight review yourself |
| The main conversation, and it had no part in the diff | Review it yourself with the sequence below |
| A reviewer dispatched for this diff | Review it yourself with the sequence below, including the handoffs your task names. Do not dispatch anyone |
Small and low-risk is defined in the core's Independent Review. For a diff, security-relevant means Security handoff applies, and high-impact means the condition in Adversarial review holds.
Read the whole diff once against the request and the checks in references/technical-review.md that apply to it, and run the blast-radius check. Dispatch no one. When UI handoff applies, look at the changed screens yourself following ui-review and report it on the UI handoff line. Report with Final output and state on the Reviewed line that it was a lightweight self-review.
review task type. That reviewer does every review that applies and returns one report. Whether to continue an existing reviewer or start a new one follows its reuse rules: start reviewers so they can be resumed, and send a re-review back to the reviewer that reported the findings unless this review has to be isolated from that one. Each task states:
Fixing the findings is implementation again. A diff that changed after review is reviewed again by a reviewer, normally the same one resumed, not by the main conversation.
Review once, before the work is opened as a pull request or merge request, or before it is handed back when there will be none. A commit does not call for a review. Before merging, the conditions in ship-it decide and no further review is dispatched for an unchanged diff.
Code that changed after the review is reviewed again whether or not the repository has an automated reviewer: a small, low-risk change by the lightweight review, anything else by the reviewer as in Dispatching the review. The second review covers only what changed and what it affects.
Identify the relevant code diff from the user's input, current worktree, pull request, or merge target. Inspect the repository's existing Git state, conventions, and task context as needed. If the review scope or base remains unclear after inspection, ask the user.
Report in the format and scale of the core's Findings and Severity. For each finding, cite the file and line, describe the trigger and impact, and recommend a proportionate action. Refer to a secret as the core's Secrets rule requires.
Read references/blast-radius.md and run it in each of these cases: the user asks what a change could break or affect; a playbook step calls for it; the diff is a fix or a refactoring; the review is a lightweight self-review. In a dispatched review, the reviewer runs it and reports it with the findings.
This review does not look for vulnerabilities. Run security-scan in diff mode on the same diff when it adds or changes any of the following:
State which of these the diff touches, or that it touches none, with the files that decided it. When unsure, hand over.
Report its findings in Findings, keeping their level, evidence and location, and mark each as security-scan.
This review does not judge how screens look or behave. Run ui-review on the affected screens when the diff adds or changes what a user sees: templates, components, styles, layout, copy, or the empty, loading and error states of a screen.
State which screens the diff changes, or that it changes none, with the files that decided it. Report its findings in Findings, keeping their level, evidence and location, and mark each as ui-review.
It has two parts, each done by one more reviewer the main conversation dispatches through agent-delegation:
You are an adversarial reviewer. Review the established diff.
Think like a chaos engineer. Find ways this code will fail in production — not
style issues, not missing tests, actual breakage: wrong results, lost or corrupted
data, races, unhandled failures, resource exhaustion. Vulnerabilities are reviewed
separately; note one only if you run into it.
Apply the checks in this skill's references/technical-review.md independently.
Include file and line references, the failure trigger, evidence, and impact.
Give each CONFIRMED finding a level from P0 (must fix before merging) to P3
(minor). NEEDS INVESTIGATION concerns go in a separate section with missing
facts and verification steps. Do not classify uncertainty as a confirmed defect.
Never print the values of settings, tokens, passwords or keys, including in the
commands you run and their output. Report the key name and where it is stored.
Lead with confirmed findings ordered from P0 to P3, followed by evidence-backed concerns needing investigation. Review and deduplicate results from technical, documentation, adversarial, and handoff checks by failure scenario and affected location, preserving distinct causes and the strongest evidence.
Use this structure:
## Diff Review
Scope: [CLEAN / DRIFT]
Reviewed: [diff source and scope]
Adversarial review: [RUN — Trigger: reason]
Security handoff: [RUN — touches: ... / NOT NEEDED — reason]
UI handoff: [RUN — screens: ... / NOT NEEDED — reason]
### Findings
- [P0-P3] [CONFIRMED] location - trigger, impact, description, recommended action - ran: | read: evidence
### Needs investigation
- [NEEDS INVESTIGATION] location - observed evidence, possible failure, missing fact, verification step
### Scope differences
- [include only when the diff holds changes the request does not call for]
Include the Adversarial review line only when that review ran. Always include the Security handoff and UI handoff lines. If there are no confirmed findings, state No confirmed findings. Report any investigation concerns separately. Do not include empty sections.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub timlai666/tstack --plugin tstack13 skills in this plugin
/acceptance-reviewCheck finished work against what was originally asked: every requirement is matched to a result that was actually exercised, and the original problem is shown to be solved. This skill MUST be used before reporting substantial work as done or handing it back, and when the user asks whether the result meets the request. Work this conversation produced MUST be checked by an independent reviewer who is not given the implementer's summary. It MUST NOT be used outside software engineering work, and MUST NOT replace diff-review, security-scan or test-and-fix. Triggers on: 驗收、有沒有做到、有沒有符合需求、有沒有解決問題、做完了嗎、acceptance review/agent-delegationRules and script for handing work to a subagent or another CLI (OpenCode, Antigravity, Copilot, Codex, Claude). This skill MUST be loaded before dispatching any subagent or CLI, even for a small task, and before changing an existing API's name, signature, usage or behavior. New delegation MUST go through scripts/dispatch.py and its task-local levels, and MUST NOT skip tools based on earlier turns. It MUST NOT be applied to work that is not software engineering. A main agent MUST NOT dispatch through its own CLI. A dispatched worker MUST NOT apply this skill or delegate further. Triggers on: subagent、派工、分工、antigravity、agy、opencode、copilot、codex、誰來寫、用哪個模型、介面變更Other plugins' skills for the same job