git-merge

git-merge is a skill for Claude Code, Codex from MithunWijayasiri/dotclaude. It costs 81 tokens per session (2,482 once invoked), scanned A, original, MIT.

A procedure for combining another Git branch, usually master, into the branch you are working on. It preserves unstaged local changes, resolves conflicts, and checks the result.

In plain words
What is it for?
Use it to merge branches safely, inspect conflicts, keep local-only files out of commits, and verify the integrated code with the repository's checks.
Why use it?
It reduces the risk of losing local work, creating incorrect conflict resolutions, or accepting a merge that passes basic checks but changes behaviour incorrectly.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to merge branches safely, inspect conflicts, keep local-only files out of commits, and verify the integrated code with the repository's checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mithunwijayasiri/dotclaude/git-merge
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.

Any agent
npx skills add MithunWijayasiri/dotclaude --skill git-merge
Clone the repo
git clone --depth 1 https://github.com/MithunWijayasiri/dotclaude

Made for: Claude Code, Codex.

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 git-merge

README.md
[![agentmods](https://agentmods.dev/badge/skills/mithunwijayasiri/dotclaude/git-merge/github.svg)](https://agentmods.dev/skills/mithunwijayasiri/dotclaude/git-merge)
Your own site
<a href="https://agentmods.dev/skills/mithunwijayasiri/dotclaude/git-merge"><img src="https://agentmods.dev/badge/skills/mithunwijayasiri/dotclaude/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.

agentmods 80×15 button for git-merge

Your own site · 80×15
<a href="https://agentmods.dev/skills/mithunwijayasiri/dotclaude/git-merge"><img src="https://agentmods.dev/badge/skills/mithunwijayasiri/dotclaude/git-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,482 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.00081 $0.02482
Opus 5.5 $0.00032 $0.00993
Sonnet 5.5 $0.00016 $0.00496
Haiku 4.5 $0.00008 $0.00248

Measured 18d ago against content hash b6c63666de21, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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 18d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/merge-recon.sh, scripts/merge-stash.sh, scripts/merge-verify.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/git-merge/SKILL.md · 118 lines

How it starts

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

Git Merge — Safe Branch Integration

Workflow the main agent runs. Investigate before mutating; preserve local-only unstaged changes; resolve conflicts by diagnosis; verify with the repo's own checks before done.

Scripts in this skill's scripts/ folder (bash, run with cwd = repo root, as bash <skill-dir>/scripts/<name>.sh) do the mechanical steps and print compact digests. Below, scripts/ means that folder.

Hard rules

  • Read-only investigation first. merge-recon.sh (fetch + map state) before any stash/merge.
  • Never auto-commit beyond the one merge the user authorized. git commit/--amend need explicit user approval — ask (amend / separate fixup / leave it).
  • git add/stash/merge are mutating — explain, then run (user already asked to merge = authorization for the merge itself).
  • Keep the user's local-only unstaged files OUT of any commit. Stage only merge-resolution files.
  • Never push unless asked.
  • Never install tooling mid-merge. Run only checks the repo already has.

1. Recon

bash scripts/merge-recon.sh <target>   # default target: origin's default branch; current branch from HEAD

Runs git fetch origin (all of origin, not one branch: fetch origin <target> leaves origin/<current-branch> outdated, and recon compares both), then prints one digest: target commits + merge-base, ahead/behind OWN remote (+ partial remote merge), files both merges bring, local unstaged/untracked/ignored, COLLISIONS. Dies on merge/rebase in progress, unmerged paths, detached HEAD, missing origin/<target>.

Why:

  • Local branch may be behind its own remote, remote may already hold a partial Merged <target> commit → "merge properly" = two steps: sync (--ff-only) to origin/<current-branch>, then merge origin/<target>. Decide before touching tree.
  • Ignored files matter. Plain git status hides them; merge overwrites an ignored file silently, exit 0 when incoming side tracks that path (local .env/config lost). Script uses --ignored.
  • Both merges checked. --ff-only sync rewrites tree too → same collisions.
  • COLLISIONS: modified → stash (step 3); untracked → merge aborts, move aside; ignored → silent overwrite, move aside. None → no stash needed.
  • Lists are capped (+N more), counts exact. Merge attempt names every conflict; trust it over lists.

Read the full file on GitHub · 118 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 18d ago Changed b6c63666de21
  2. 19d ago Changed · +5 tokens per session 02c3605bbc49
  3. 20d ago Changed · -43 lines 8a4d2e01b033
  4. 2mo ago First seen · 161 lines · 76 tokens per session scan A 5a7e009da159

Subscribe to this mod's changes

git-merge is a skill published in the GitHub repository MithunWijayasiri/dotclaude (4 stars, last pushed 4d ago), licensed MIT. It adds 81 tokens to every session and 2,482 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

git-worktree

Use this skill whenever a task involves running parallel work on a git repository without conflicts — e.g. "fix this bug while I keep working on my feature", "run Claude on two branches at once", "work on this task in isolation", "create a throwaway branch for this experiment", or anything where two agents or sessions…

siva01c/claude-plugins · 132 tokens

okhp3-repository-organizer

OverKill Hill P³ repository organizer for content-first Git repositories. Use when a local Git repository grew organically from a folder and needs an evidence-based profile, purpose summary, classification, cross-platform naming cleanup, folder design, governance scaffolding, or a safe reorganization plan. Also…

OKHP3/skillz · 127 tokens

okhp3-repl-repo-janitor

Clean up a single Replit-hosted Git repository — squash-merge and delete old, merged, or abandoned branches and pull requests (including Replit-generated subrepl-, replit-agent, and agent/ branches), and normalize file/folder names against a kebab-case default with documented exceptions. Use when a user asks to purge…

OKHP3/skillz · 120 tokens

okhp3-github-skill-foundry

Design, author, evaluate, and install-plan a task-focused GitHub Copilot Agent Skill. Use when creating a repository or personal GitHub Copilot SKILL.md for coding, review, maintenance, or repository workflows. Do not use for Cowork, SharePoint, Copilot Studio, or general agent instructions.

OKHP3/skillz · 73 tokens

okhp3-replit-build-in-public

Full playbook for a Replit Designathon competition submission — canvas organisation for judges, artifact selection, dual deployment (Replit Publish + GitHub Pages), session-to-session narrative continuity, and building-in-public commit discipline. Activate for "designathon", "competition", "building in public"…

OKHP3/skillz · 105 tokens

okhp3-replit-repl-janitor

OverKill Hill P³ one-Repl repository cleanup workflow for safely auditing and tidying a single Replit workspace's Git checkout. Use when a user asks to clean up merged or abandoned branches and pull requests, purge stale subrepl- or agent/ branches, normalize file and folder names, or remove repository detritus. Also…

OKHP3/skillz · 151 tokens