branch-review
БесплатноБез исполняемых скриптовНе проверенReview a branch before merge
от hamr0★ 28 звёзд на GitHubОб этом скилле
Pre-merge review gate. General review, then a full security audit, then an adversarial verify pass, then a docs sweep. It never edits code: findings are reported and handed back, and fixing is a separate, separately authorized action. The docs sweep is the one stage that writes, and only to docs — it updates the project's docs for what this branch changed and commits exactly that.
Only Critical and High findings block the merge. Everything else is appended to the fix ledger (.amp/remember/fix-ledger.md) — a local, cumulative list, living beside MEMORY.md, usually gitignored, that /refactor (no arguments) works through between features. The report is blockers plus the ledger count. This command never runs /refactor itself.
Guardrails
- Spawn a worker, mid tier stated explicitly (an omitted tier inherits the parent's; never a vendor model name), and hand it this file's path — a worker has no skill text of its own. Fall back to running inline if your tool has no subagent mechanism.
- Escalate, never assume. Anything you cannot decide, cannot verify, or that this spec does not cover → stop and report it to the orchestrator. Never improvise, never widen scope, never fix a side issue you noticed (for workers this overrides the Surgical dev rule).
- The worker does the work itself — no sub-spawning. Everything it reports has to be something it read, ran, or grepped with its own tool calls; a relayed "I executed X" is hearsay.
- No edits — three exceptions. You have no authorization to change code, even for a finding you are certain about. Report it. The only files you may write are
.amp/remember/fix-ledger.md(append bullets; never rewrite or delete),.amp/remember/last-review.md(overwrite; the review record described at the end of this file), and the doc files Stage 4 touches — edited and then committed by that stage alone, never for code, skills, config, or tests. - Prove it with two checks, because neither sees what the other does.
git status --porcelain, at start and again before you report, must show the tree clean (Stage 4's doc edits committed as the last act)..amp/is gitignored, so also hash the files there before you start and again before you report:
and show the comparison: onlyfind .amp/remember -maxdepth 1 -type f -exec md5sum {} + | sort -k2fix-ledger.mdandlast-review.mdmay differ. And rungit diff --name-only <reviewed sha>..HEADbefore you report: it must list only the files on the record'sdocs:line — anything else means an edit escaped Stage 4's scope. Both results are shown on theproof:line of the closing block.
Target — check the tree first, then interpret $ARGUMENTS
$ARGUMENTS is no hash (the committed work on the current branch), one
or more commit hashes, or a range <a>..<b> (exactly those commits).
The orchestrator runs the tree check (and, no-hash only, the behind-main check) before spawning anyone, so a stop costs no worker; the worker re-runs each as its own first act. Both, not either.
Before resolving anything, run git status --porcelain. If it prints any line — modified, staged, or untracked — stop and report it. Say all three things, not just the first: (a) the tree is dirty, listing the uncommitted paths; (b) /branch-review reviews commits, not the working tree; (c) commit the work to the branch, then re-run /branch-review. Do not review a subset and do not fall back to the staged diff or the working tree: a dirty tree is an error, never a silent partial review.
/release needs a review at the current HEAD SHA, so any later non-docs commit makes it stale: the only correct order is commit → review → release.
No hash only — check the branch is not behind main. Run git fetch origin, then git merge-base --is-ancestor origin/main HEAD. Non-zero → stop and say all three things: (a) the branch is behind origin/main by N commits (git rev-list --count HEAD..origin/main); (b) reviewing now is wasted, because syncing afterwards makes the review stale; (c) merge origin/main into the branch (or rebase), then re-run /branch-review. A never-pushed branch passes; no origin remote or no origin/main → skip the check and say so.
Decide REUSE or RUN now, once (after both checks pass, before spawning): run this line as printed and print its output; it stays valid for the whole run (Stage 4 commits only docs, which it ignores). Pass that exact output line to the worker in its brief.
f=.amp/remember/last-review.md; g=$(sed -n 's/^green: \([0-9a-f]\{40\}\) .*/\1/p' "$f" 2>/dev/null); c=$(git diff --name-only "$g" HEAD 2>/dev/null | grep -vE '^(docs/|[^/]+\.md$)'); if [ -z "$g" ]; then echo "RUN (no green: line)"; elif ! git merge-base --is-ancestor "$g" HEAD 2>/dev/null; then echo "RUN (green $(printf %s "$g" | cut -c1-7) not an ancestor of HEAD)"; elif [ -z "$c" ]; then echo "REUSE $(grep '^g
Установить branch-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobAgentEditWriteBash(git add:*)Bash(git commit:*)Bash(git diff:*)Bash(git fetch:*)Bash(git log:*)Bash(git show:*)Bash(git status:*)Bash(git grep:*)Bash(git rev-list:*)Bash(git rev-parse:*)Bash(git merge-base:*)Bash(rg:*)FAQ
Что делает скилл branch-review?
Review a branch before merge
Как установить скилл branch-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл branch-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic