Add a merge skill#31
Open
koomen wants to merge 2 commits into
Open
Conversation
Lands one PR: rebase onto latest main, review it adversarially with two fable subagents (defects, and AGENTS.md invariant conformance), triage and fix the findings, gate on `ci`, merge. Rebase rather than merge-from-main, so the tree fable reviews is the tree that lands. The driver writes the fixes and the reviewers run on fable — a model reviewing its own fixes is not an adversarial review. Findings are confirmed against real control flow before acting, since adversarial reviewers over-report. Three fix rounds, then it stops and reports. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
koomen
force-pushed
the
merge-queue-skill
branch
from
July 24, 2026 19:23
7ed4c2d to
d9ef2df
Compare
Round-1 adversarial review found the runbook would fail in practice. Fixed, in order of severity: - Pin the reviewed SHA and merge with `--match-head-commit`, so a commit pushed after the review cannot land unreviewed. Re-check that main has not moved before merging. - Reorder cleanup: a branch checked out in a worktree cannot be deleted, so `--delete-branch` failed on every run. Remove the worktree first, then delete the branch explicitly. - Fetch the PR branch, not just main; `git worktree add` needs the ref. - `bun install` in the worktree before `bun run ci` — a fresh worktree has no node_modules. - Give the reviewers the checkout directory. A subagent starts in the session cwd, so a reviewer that is not told where to look diffs the wrong tree and reports nothing. - Handle the branch already being checked out, including in the primary checkout, where `git worktree add` refuses outright. - Require the PR base to be main; rebasing a stacked PR onto main would rewrite it and split the review target from the merge destination. - Only remove a worktree this skill created; a reused one may be a long-lived checkout the user is sitting in. - Derive the worktree path from the repo root instead of hardcoding a home directory into a shared repo file. - Use the `fable` model alias; the Agent tool takes sonnet|opus|haiku|fable, not a full model ID. - Defer to the check-invariants skill instead of restating it, per the standing rule against duplication that can drift. - Note that `gh pr checks` errors rather than waits before a run registers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
.claude/skills/merge/SKILL.md—/merge 28, or/mergefor the current branch's PR.mainin a worktree, force-push with lease. Rebase, never merge-from-main — a merge commit would mean fable reviewed a tree that never existed. Conflicts that aren't mechanical get handed back rather than guessed at.claude-fable-5subagents, one on defects (correctness, security, regressions), one onAGENTS.mdinvariant conformance. Both are told to hunt for reasons not to land it. The driver writes the fixes; the reviewers are a different model, because a model reviewing its own fixes is not an adversarial review.bun run ci, push, re-review. Three rounds, then it stops and reports.ciis green on the pushed head.Asks for approval once up front, then runs through to the merge without further prompting.
No labels, no queue, no CI credentials — it runs in your session with the auth you already have.
🤖 Generated with Claude Code