anorth/agent-skills

review-diff

Reviews a git diff through reviewer subagents on each lens (big picture, detail), then checks and triages the findings and fixes clear problems.

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/anorth/agent-skills --skill review-diff

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

Review diff

Reviews always run in subagents: a fresh context, on a different model from the implementer (which is probably you). Each subagent reviews through one lens: a file saying what to look for and how much code to read. You coordinate: scope, lenses, launch, check, triage, fix, report.

Other skills reuse this flow with their own lens set (for example, /deep-review).

1. Scope

The default change set is the working tree against the current branch's HEAD: git diff HEAD plus untracked files (git status --short), which the diff doesn't show. If that's empty (for example, a clean tree on a feature branch), ask the user for the range, such as the merge-base with main. Don't launch reviewers on an empty change set.

Find the originating ticket, task, or plan, if there is one, so lenses that judge against it can.

2. Lenses

Use the lens set the calling skill gives. Otherwise, the standard set, both on the strong tier:

Brief reviewers with absolute paths: reviewer.md and the standard lenses live in this skill's directory (review-diff's), whichever skill supplies the lens set.

3. Choose models

For each lens on the strong tier:

  • User names models → one reviewer per model.
  • User gives a count → that many reviewers.
  • Otherwise → one reviewer.

Lenses on other tiers get one reviewer each.

Resolve models with the /model-tiers skill: named models as the user named them, the rest from the lens's tier. Reviewer models follow /model-tiers' rules: different from the implementer, distinct per lens.

4. Launch

Launch all reviewers in parallel, in one message, as /model-tiers describes, and wait for their results. Brief each with:

text
Read and follow <absolute path to review-diff's directory>/reviewer.md.
Lens: <absolute path to the lens file>
Review: <diff command, e.g. git diff HEAD, plus any untracked files by path>
Originating work: <ticket/task/plan pointer, or "none">

Point at the files; don't summarise them into the brief.

If a reviewer fails, retry once. If it fails again, continue with the other reviewers' findings and report the failure. If every reviewer fails, report the blocker and stop.

5. Check and triage

Merge findings from all reviewers. Merge findings that share a root cause, across lenses. Note where reviewers disagree, especially on design questions.

Check each finding against the code before acting on or reporting it. Drop findings that don't hold, and say why in the report. A fix-now or fix-trivial you can't confirm either way is a design question. Drop other findings you can't confirm.

CategoryAction
fix-nowFix directly.
fix-trivialFix directly when the fix is local and uncontroversial.
design-questionDon't fix. Present to the user with enough context to decide.
informationalMention briefly; no change unless the user asks.

Treat a fix-now as a design question when:

  • another reviewer calls it a design question,
  • it has more than one reasonable remediation, or
  • it changes user-visible behaviour.

Skip fixes that expand scope beyond the reviewed diff, unless the diff introduced the bug.

6. Fix

Apply fix-now and fix-trivial items. Match existing codebase style. Run the project's lint, if known.

Don't re-run the review unless the user asks.

7. Report

  1. Reviewers: lens and model per reviewer, with its finding counts.

Group reviewers on the cheap tier into one line: their lenses, models, and total findings. Note any fallback: another tier, or a reviewer on the implementer's model.

  1. Fixed: what changed and why; group trivial fixes briefly.
  2. Dropped: findings the check rejected, one line each with the reason.
  3. Design questions: numbered, with the trade-off and each reviewer's view where they disagreed.
  4. Informational: one line, if anything noteworthy remains.

Name the lens each finding came from. If nothing needed fixing and there are no design questions, say so in one sentence.

同じリポジトリから

関連する Skills

すべての Skills
anorth
コミュニティ

build-ticket

Builds one ready ticket through to a reviewed result with evidence, without stopping for routine decisions: checks it's ready, builds to its design, runs its done checks, reflects, reviews, and reports. Use when the user asks to build, implement, or pick up a ticket.

1時間の導入数
2
GitHub Stars
1
更新日
11月3日
anorth
コミュニティ

deep-review

Deep, themed review of a diff: the review-diff flow and its standard lenses, plus one cheap reviewer subagent per theme, using distinctive preferences distilled from Alex North's public GitHub reviews (naming, API shape, errors, tests, coupling, and related themes). Needs the review-diff skill. Use when the user asks for a deep review, themed review, or anorth-style review.

1時間の導入数
2
GitHub Stars
1
更新日
11月3日
anorth
コミュニティ

domain-modeling

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

1時間の導入数
2
GitHub Stars
1
更新日
11月3日
anorth
コミュニティ

grilling

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

1時間の導入数
2
GitHub Stars
1
更新日
11月3日