Borrowing it
Nothing to install: this file belongs to robconery/kolea. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/robconery/kolea/main/.claude/commands/git-merge.mdgit clone --depth 1 https://github.com/robconery/koleaWrote 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/robconery/kolea/git-merge)<a href="https://agentmods.dev/commands/robconery/kolea/git-merge"><img src="https://agentmods.dev/badge/commands/robconery/kolea/git-merge/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/robconery/kolea/git-merge"><img src="https://agentmods.dev/badge/commands/robconery/kolea/git-merge.svg" alt="Reviewed on agentmods" width="80" 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.00018 | $0.01137 |
| Opus 5.5 | $0.00007 | $0.00455 |
| Sonnet 5.5 | $0.00004 | $0.00227 |
| Haiku 4.5 | $0.00002 | $0.00114 |
Grade A, and why
git-merge 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 2mo 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.
git-merge
Bring a working branch into main. Refuses to do anything destructive
or surprising — every step is checked, then confirmed.
Preflight
- In a git repo?
git rev-parse --is-inside-work-tree. Refuse if not. - Identify branches:
git branch --show-current→ source branch- Default target is
main(ormasterif nomainexists).
- Same-branch guard. If the source branch equals the target, refuse with a clear message — there's nothing to merge.
Working-tree check
git status -s.- If there are uncommitted changes, stop and ask:
- Commit them first (suggest
/git-commit). - Stash them (
git stash push -m "pre-merge stash") — note the stash ref in the report so the user cangit stash popafter. - Discard (only if the user explicitly says so — never the default).
- Commit them first (suggest
- Do not proceed with a dirty tree.
Remote sync check
git remote -v. If no remote:- Skip the remote sync; proceed with a local merge.
- Mention in the report that no remote was found.
- If a remote exists:
git fetch origin --prune- Compare
mainwithorigin/main:git rev-list --left-right --count main...origin/main→ tells us ahead/behind counts.
- If local
mainis behindorigin/main: tell the user, and after the working-tree is clean, fast-forward localmainbefore merging (git switch main && git pull --ff-only). - If local
mainis ahead oforigin/main: warn — that's unpushed work on main. Ask before continuing; offer to push first. - If they have diverged: stop. This is not the time for a
/git-merge— recommend rebasing or pulling with--rebasefirst, and let the user decide.
- Also fetch the source branch's remote tracking ref if it exists,
and warn if
origin/<branch>is ahead of the local branch (someone else pushed).
Confirm before doing anything destructive
Use AskUserQuestion to confirm in one batch:
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.
- 2mo ago First seen · 117 lines · 18 tokens per session scan A 0348067079ad
git-merge is a command published in the GitHub repository robconery/kolea (11 stars, last pushed 28d ago), licensed MIT. It adds 18 tokens to every session and 1,137 once invoked, about $0.0001 per session on Opus 5.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-08-31.
Other commands, from other repositories
customer-changelog-check
Audit whether user-visible changes in the current session have matching CHANGELOG.md entries; report MISSING with suggested lines; --fix auto-appends.
retro
Generate a timestamped arc retrospective from the past 7 days of git history in /.agentskills.
update-agentskills
Apply a reusable lesson to /.agentskills (rules/skills/templates/commands), backup + commit + push.
rollback
Restore the previous Cloudflare deployment and verify recovery. Fires when a deploy broke prod and you need the last-good version back.
sync-claude
Update the vendored control plane + core commands in this repo to the latest heymegabyte/claude-bootstrap. Fires when the shared brain has moved on.
worktree-create
Create a git worktree for parallel development on a separate branch without stashing.