session-review Skill
>- 会话结束时的对抗性审查循环。将本次会话的工作整理成分配了角色、自成体系的简报,然后并行运行独立评审员——包括一个读取真实文件并用网络核查技术时效性的隔离代码阅读器(即 idea-validator 智能体),如有多家外部模型也可加入——综合他们的共识与分歧,立即应用低成本安全修复,为剩余问题记录可衡量的计划,并对你不同意的评审意见提出质疑(绝不盲目接受)。在实质性的编码或设计会话结束时,或用户说 "session review" 等时使用。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Session Review — the adversarial closing loop
Stress-test a session's work before it sets, using reviewers who don't share your blind
spots. You wrote the work, so you are the worst person to spot what you assumed. The loop ends
in action: cheap-safe fixes applied immediately, the rest recorded as a measurable plan, and
anything you disagree with explicitly challenged — not silently accepted, not silently dropped.
Invocation is usually EXPLICIT (/session-review) — "review" is something the agent does
natively, so don't expect auto-triggering; invoke it by name at session close.
The loop
1. Assemble the brief (the load-bearing step)
Write ONE self-contained markdown brief to a path of THIS session — session-review.md in the session's
scratchpad directory when one is listed, else a fresh mktemp -t session-review.XXXXXX file — never a fixed
/tmp name, which a parallel session overwrites. It is the only context the reviewers get. It must contain:
- An assigned role that fits the work ("Principal Engineer" for a feature slice, "Security
reviewer" for auth work) — the role is the lens.
- Project context a stranger can follow, the session goal, and what was built, with
concrete file:line references.
- The specific decision points you most want challenged — and for anything that turns on
CURRENT best practice, an explicit ask to web-check with sources.
- What to return — a structured verdict with severity, file refs, a short MEASURABLE plan.
Never let the brief be the reviewer's only window: tell the code-reader explicitly
"do not trust this summary — read the actual files." Your summary is where your blind
spots live.
2. Run the reviewers IN PARALLEL (same message)
- Reviewer A — the isolated code-reader. Spawn
idea-validatorpointed at the brief AND
the actual files, with the currency instruction: "web-check whether every library / runtime /
pattern I chose is still the right choice this year, cite sources." Without that line it only
verifies claims you explicitly made — dated tech slips through.
- Reviewer B — an external-family model (if available), reviewing from the brief only.
Different training distribution, different blind spots; lean on it for concept and
tech-currency, not file-level facts.
- One reviewer alone (A) is still a valid light review — note the absence and proceed.
3. Synthesize — agree vs diverge
Where reviewers independently land on the same finding — high-confidence signal, promote it.
Where they diverge — the highest-value rows: adjudicate on merits. On facts about the code the
code-reader wins; never count votes. The full adjudication procedure — acceptance layers, the
claim→check table, how a disputed finding is allowed to close — is
reference/orchestrator-fact-check.md.
4. Act (the loop must end in action)
- Accept now: cheap, safe, low-blast-radius fixes — apply this session, verify by artifact
(typecheck / lint / tests), don't round toward success.
- Plan, measured: larger items become backlog entries, each with a metric for the win.
A plan item with no measurable outcome is a task for task's sake — drop it.
- Challenge: for anything you disagree with, write back WHY. Holding your ground with a
reason is the partnership — blind acceptance defeats the loop.
5. Measure the outcome
Close with what the loop produced: findings found / applied / planned / challenged, what you
had missed, what tech-currency facts updated. That's how you know it earned its tokens.
6. Retrospective on the machine (so quality compounds)
Steps 1-5 review the WORK; this reviews the SYSTEM that produced it. Three questions, backed by
what actually happened this session:
- What foundation element (a rule, a MEMORY line, a handoff, a pattern) EARNED its keep —
name the concrete moment. Keep those.
- Where did the foundation give friction or a gap — stale, duplicated, missing? Fix/merge/prune.
- How did the orchestration go — right agents, good-enough briefs, honest adjudication?
(reference/parallel-development.md for the fan-out defaults and stop-conditions.)
What happened comes from the session logs, counted by a script — waits, refused or failed tool calls,
re-runs, what filled the context — not from recall: a model asked how it worked tells a smoother story than
its logs and recalls its errors selectively. When a day holds many sessions, one retro a day covers every
session since the last one. At most three changes per retro. (one project's working practice; no count)
A CONFIRMED finding is worth a row in the findings-class registry, and a class recurring three
times earns promotion into the cheapest layer that prevents it — reference/review-loop.md.
Output: at most 1-3 minimal, evidence-backed adjustments, biased to subtract before add.
"Keep doing" is a valid output — most sessions should change the foundation little.
Guardrails
- Never blind-accept. Rejecting a finding with a reason is a success, not a failure.
- Separate "now" from "plan" by RISK, not importance — big-blast-radius changes at the end of a
long session belong in the plan, done fresh.
- Scale to the work: small session → light brief, single reviewer; architecture change → the
full role-assigned, fact-checked, multi-reviewer pass.