merge

merge is a command for Claude Code from peterkrueck/Claude-Code-Development-Kit. It costs 0 tokens per session (4,872 once invoked), scanned A, original, MIT.

A command for finishing work on a Git branch, the separate line of development where changes are made. It checks documentation and the working tree, merges the branch into the main branch, and cleans up when appropriate.

In plain words
What is it for?
Use it when a branch is ready to ship, whether it was created normally or through a Git worktree, a separate working directory linked to the same repository.
Why use it?
Merging can hide missing documentation, unwanted files, or unresolved conflicts. This command checks those conditions and exposes problems instead of quietly changing them.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it when a branch is ready to ship, whether it was created normally or through a Git worktree, a separate working directory linked to the same repository.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/peterkrueck/claude-code-development-kit/merge
About the project

Claude Code Development Kit is a starter workflow that gives Claude Code project context, working notes, verification commands, review commands, and hooks for maintaining them across sessions. It is for beginners and intermediate users building applications or side projects who want Claude Code to understand the codebase and check its work. The catalogue entries are the kit's skills and commands.

peterkrueck/Claude-Code-Development-Kit · 1,388 stars · on GitHub · linkedin.com

Install

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.

Clone the repo
git clone --depth 1 https://github.com/peterkrueck/Claude-Code-Development-Kit

Made for: Claude Code.

Wrote 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.

agentmods badge for merge

README.md
[![agentmods](https://agentmods.dev/badge/commands/peterkrueck/claude-code-development-kit/merge/github.svg)](https://agentmods.dev/commands/peterkrueck/claude-code-development-kit/merge)
Your own site
<a href="https://agentmods.dev/commands/peterkrueck/claude-code-development-kit/merge"><img src="https://agentmods.dev/badge/commands/peterkrueck/claude-code-development-kit/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.

agentmods 80×15 button for merge

Your own site · 80×15
<a href="https://agentmods.dev/commands/peterkrueck/claude-code-development-kit/merge"><img src="https://agentmods.dev/badge/commands/peterkrueck/claude-code-development-kit/merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,872 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04872
Opus 5.5 $0.00000 $0.01949
Sonnet 5.5 $0.00000 $0.00974
Haiku 4.5 $0.00000 $0.00487

Measured 1mo ago against content hash 2e329887189c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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 1mo 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.

commands/merge.md · 322 lines

How it starts

The opening of the file, as written. The whole thing — 322 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Merge Command

Finalize work on a branch: verify docs + tree are clean, merge to main, clean up. Supports both standard git checkout -b branches and git worktree flows — auto-detected at pre-flight.

Context from user: $ARGUMENTS


Philosophy

/merge is a verify + ship command, not a do-everything-at-end-of-session cleanup. Doc updates, commits, and testing belong to the work session on the branch. By the time /merge runs — typically in a fresh claude session — those things should already be done. This command verifies the invariant, surfaces violations, and ships if clean.

Rule of thumb: if you're tempted to have /merge silently fix something, STOP and surface it to the user instead. Merges are semi-destructive; a missed doc update or an accidentally-committed build artifact is much harder to undo after the fact.

Two scenarios, one command. When the branch fast-forwards or auto-merges with no conflicts, this is pure verify + ship. When main has diverged and the merge conflicts — routine when overlapping branches touch the same files — conflict resolution becomes the real work (→ Step 4b). Resolving conflicts is NOT "silently fixing": surface the approach decision to the user, then execute it on rails with mandatory verification.

Prime directive (non-negotiable): any merge where main had diverged — i.e., git composed a new tree from both sides, whether it conflicted or auto-merged cleanly — MUST pass the project's build/test before the merge commit is finalized (→ Step 4c). The nastiest defects are clean auto-merges with no conflict marker: a reference whose declaration the other side moved or deleted compiles on each parent alone and breaks only in the combined tree. Only building the composed tree catches it. (If main is already an ancestor of the branch — no divergence — the merged tree equals the branch tree, already built on-branch; the build is skippable.)


$ARGUMENTS conventions

Two documented uses for $ARGUMENTS:

Read the full file on GitHub · 322 lines

Changes

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.

  1. 1mo ago First seen · 322 lines · 0 tokens per session scan A 2e329887189c

Subscribe to this mod's changes

merge is a command published in the GitHub repository peterkrueck/Claude-Code-Development-Kit (1,388 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,872 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-30.