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.
npx agentmods add commands/pablomarin/claude-codex-forge/finish-branchgit clone --depth 1 https://github.com/pablomarin/claude-codex-forgeWrote 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/pablomarin/claude-codex-forge/finish-branch)<a href="https://agentmods.dev/commands/pablomarin/claude-codex-forge/finish-branch"><img src="https://agentmods.dev/badge/commands/pablomarin/claude-codex-forge/finish-branch.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.00000 | $0.00773 |
| Opus 5 | $0.00000 | $0.00387 |
| Sonnet 5 | $0.00000 | $0.00155 |
| Haiku 4.5 | $0.00000 | $0.00077 |
Grade A, and why
finish-branch 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 2d 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 — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/finish-branch — Host-Neutral Merge and Cleanup
Use after the PR is approved. This workflow merges only with explicit human authorization, preserves developer continuity, and removes the feature worktree without choosing a permanent engine.
1. Inspect Without Mutation
- Read
.forge/local/state.mdand resolve the active host through its adapter. - Resolve the current branch and inspect its PR state, URL, title, base, checks, and review status.
- If no PR exists, stop. If it is already merged, skip to continuity/cleanup.
- If checks, review, or conflicts still block merge, report the exact blocker and stop.
2. Authorize and Merge
Show the exact merge mutation, including PR URL and merge strategy. Pause for explicit human
authorization. Council, reviewer, native /goal, and prior PR-creation authority cannot authorize
merge.
After authorization, run the selected gh pr merge command once. Do not combine it with branch
deletion. Re-read PR state after any local checkout error: if the server says MERGED, continue;
if it remains OPEN, report the failure and stop rather than retrying or force-merging.
3. Preserve Continuity Before Removing the Worktree
Developer-local continuity lives in .forge/local/state.md; project-owned durable knowledge lives
in .forge/memory/. Never move gate receipts, /goal authorization, or candidate evidence between
worktrees.
When running inside an isolated worktree:
- Run
.forge/hooks/lib/worktree-lifecycle.sh fold --worktree <absolute-worktree-path>(PowerShell:worktree-lifecycle.ps1 -Action Fold -Worktree <absolute-worktree-path>) before navigating away. Only in the Forge source checkout, when the installed path is absent, use the trackedhooks/lib/worktree-lifecycle.shor.ps1instead. - The helper compares the primary foldable narrative with the exact seed snapshot. Missing or
malformed inputs emit
FOLD_SAFE_STOP; primary divergence emitsFOLD_DIVERGED. Both preserve every state file for manual reconciliation—no engine guesses a merge. - On an exact seed match, the helper atomically replaces only
## State(Done/Next/Deferred, with### Nowcleared),## Open Questions, and## Blockersin primary state. It never touches## Workflow,## /goal session,## PR authorization, receipts, objective nonce, or persistent Forge turn records. - Fold verified durable learnings separately into
.forge/memory/; never copy local receipts or volatile session history there.
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.
- 2d ago Changed · -272 lines 752de08bc6b8
- 6d ago First seen · 336 lines · 0 tokens per session scan A 37aef2d6d11d
finish-branch is a command published in the GitHub repository pablomarin/claude-codex-forge (5 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 773 tokens. 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-08-31.
Other commands, from other repositories
push-and-release
Git pull, resolve conflicts, push, fix hook errors, then release.
land
Cadence-tick autonomous PR babysitter (CI-fix, resolve, converge, merge, close, release).
release
Create a release branch, run changeset version, review changelog, and prepare PR.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
release
Walk the llmwiki release process step by step.
ship
Ship is the operational release-prep flow for a connected project repo.