Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/axiomantic/spellbookWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/axiomantic/spellbook/finish-branch-execute)<a href="https://agentmods.dev/commands/axiomantic/spellbook/finish-branch-execute"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/finish-branch-execute.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.00808 |
| Opus 5 | $0.00014 | $0.00404 |
| Sonnet 5 | $0.00006 | $0.00162 |
| Haiku 4.5 | $0.00003 | $0.00081 |
Grade A, and why
finish-branch-execute scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Step 4: Execute Choice
Invariant Principles
- Execute exactly the chosen strategy — never silently switch options
- Discard requires explicit confirmation — Option 5 is irreversible; re-confirm before executing
- Pull before merge — always pull the latest base branch to avoid stale-base conflicts
Context: Steps 1-3 complete. You have: chosen option number (1-5), feature branch name, base branch name, worktree path (if applicable).
Option 1: Merge Locally
git checkout <base-branch>
git pull
git merge <feature-branch>
<test-command> # use test command from Step 1 context; ask if unknown
git branch -d <feature-branch> # only on test pass
After success: invoke finish-branch-cleanup.
Option 2: Push and Create PR
git push -u origin <feature-branch>
Then invoke the creating-issues-and-pull-requests skill via the Skill tool to
create the PR. That skill discovers and applies the repository's own PR template;
never call gh pr create directly from here.
Provide context:
mode: "pr"
branch: <feature-branch>
base: <base-branch>
diff_summary: <merge-base diff summary>
If push or PR creation fails: STOP. Report the error.
Report the PR URL to the user. Do NOT cleanup worktree. Do NOT invoke finish-branch-cleanup.
Option 3: Push, Create PR, and Do the PR Dance
Execute Option 2 steps first (push + create PR). Then dispatch a subagent with command: pr-dance
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 117 lines · 28 tokens per session scan A 1afad8531b31
finish-branch-execute is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 808 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
release
Release guide version (CHANGELOG + VERSION + README + landing sync + commit + push).
update-infos-release
Update Claude Code releases tracking (guide + landing + version bump).
watch-ci
Spawn a background Haiku-backed subagent to watch CI for the current branch (or specified target). Provider-agnostic — the subagent inspects project signals to identify the CI system (GitHub Actions, GitLab CI, CircleCI, etc.) and picks the right CLI. Returns immediately; reports back when CI reaches a terminal state.
undo-commit
Soft-undo the last commit. Restores its changes as staged, leaves working tree intact. Refuses if HEAD is already pushed to a tracked remote.
session-report
Capture what changed this session and why, scoped to the current branch. Read by ship verbs when synthesizing the commit message; deleted after a successful commit.
commit
Stage, commit, and optionally ship further. Pass an escalation token (push, pr, merge, squash, squash merge) to skip the prompt. With no token, commits then asks how far to ship. Delegates message format to the atomic-git-discipline skill.