git-branch-merge

git-branch-merge is a skill for Claude Code from grasscaograss/AwesomeWeldoneSkills. It costs 150 tokens per session (1,071 once invoked), scanned A, original, Apache-2.0.

A structured method for moving selected changes between Git branches when the branches have diverged significantly. Instead of merging everything at once, it groups changes by purpose and rebuilds each approved group on the target branch.

In plain words
What is it for?
Use it to assess branch differences, group commits into functional specifications, review migration plans, and transfer changes through separate implementation tasks.
Why use it?
It makes large, conflict-heavy branch migrations easier to review and control. The process also creates backup tags and tracks which change groups are complete, skipped, or waiting for approval.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents.

Good fit Use it to assess branch differences, group commits into functional specifications, review migration plans, and transfer changes through separate implementation tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/grasscaograss/awesomeweldoneskills/git-branch-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 grasscaograss/AwesomeWeldoneSkills --skill git-branch-merge
Clone the repo
git clone --depth 1 https://github.com/grasscaograss/AwesomeWeldoneSkills

Made for: Claude Code.

Its marketplace also offers this one on its own, as the plugin git-branch-merge/plugin install git-branch-merge after adding the marketplace above.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/grasscaograss/awesomeweldoneskills/git-branch-merge"><img src="https://agentmods.dev/badge/skills/grasscaograss/awesomeweldoneskills/git-branch-merge.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,071 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.00150 $0.01071
Opus 5 $0.00075 $0.00535
Sonnet 5 $0.00030 $0.00214
Haiku 4.5 $0.00015 $0.00107

Measured 12d ago against content hash 98419dd607bb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

git-branch-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 12d 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.

git-branch-merge/SKILL.md · 115 lines

What it actually says

Git 大分支迁移方法论

第一步:诊断现状

# 找到分叉点
git merge-base <target> <source>

# 源分支独有的提交数
git log --oneline <source> ^<target> | wc -l

# 分叉时间
git log --format="%ai" <merge-base-hash> -1

# 文件差异统计
git diff --stat <target> <source> | tail -3

根据结果判断整体策略,参见 references/complexity-guide.md

第二步:建立安全网 + 初始化进度文件

git tag backup/<source>-before-merge <source>
git tag backup/<target>-before-merge <target>

.claude/tmp/merge-progress.md 创建进度文件:

# 分支迁移进度

来源:<source> → 目标:<target>
开始:<date>

## 进度概览
✅ 0 完成 / 🔄 0 进行中 / ⏭ 0 跳过 / ⬜ 待归纳

## 待处理提交
(将 git log 输出粘贴在此,逐步消耗)

## Spec 列表
(每完成一个在此追加)

第三步:归纳下一个 spec(循环起点)

从进度文件的"待处理提交"中取下一批,按功能意图归纳出一个 spec,提交用户审核。

归纳方法见 references/commit-grouping.md

输出格式:

📋 Spec N:<功能意图标题>

包含提交:<hash1> <message>
          <hash2> <message>
涉及文件:src/xxx, src/yyy
意图描述:<一两句话说清楚这组提交要实现什么、解决什么问题>
建议方式:[ ] opsx:new  [ ] 直接迁移

等待用户:批准 / 修改描述 / 跳过(记入进度文件跳过区域)

第四步:执行迁移

每个 spec 必须启动一个新的 sub-agent 来完成,不在主线上下文中直接操作。这样可以防止主线上下文被实现细节撑爆,保证整个迁移任务的进度管理始终清晰。

Sub-agent 的 prompt 应包含:

  • spec 的意图描述
  • 涉及的提交 hash(供 sub-agent 读 diff)
  • 进度文件路径(.claude/tmp/merge-progress.md
  • 当前目标分支名
  • 实现方式(直接迁移 / opsx:new)

Sub-agent 完成后返回:实现结果 + 构建是否通过。

实现方式参考:

第五步:验证 + 更新进度 → 回到第三步

dotnet build

构建通过后,更新 .claude/tmp/merge-progress.md

  • 将该 spec 状态改为 ✅,填入实现方式
  • 更新概览计数

回到第三步,处理下一批提交。所有提交处理完毕后,迁移结束。

关键原则

  • 一次只处理一个 spec:归纳一个,审核一个,迁移一个
  • 每个 spec 用独立 sub-agent 实现:主线上下文只负责进度管理和 spec 归纳,实现细节交给 sub-agent
  • 进度文件是唯一的任务指引:随时打开 .claude/tmp/merge-progress.md 查看当前状态
  • 跳过不等于丢失:跳过的提交记录在进度文件,便于事后 review
Files

What ships with it

4 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. 12d ago First seen · 115 lines · 150 tokens per session scan A 98419dd607bb

Subscribe to this mod's changes

git-branch-merge is a skill published in the GitHub repository grasscaograss/AwesomeWeldoneSkills (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 150 tokens to every session and 1,071 once invoked, about $0.0007 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-08-31.

Related

Other skills, from other repositories

prowler-commit

Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.

prowler-cloud/prowler · 33 tokens

gh-auth-isolation

Safely manage multiple GitHub identities (EMU + personal) in agent workflows.

github/gh-aw · 20 tokens

comet-github

A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.

rpamis/comet · 72 tokens

github-skill

Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.

zeenie-ai/OpenCompany · 51 tokens

changelog-composer

Generates structured changelogs and release notes from git history and PRs, classifying breaking changes, features, fixes, performance, docs. Triggers on: "generate changelog", "write release notes", "what changed since", "prepare release", "release notes for", "diff since tag".

Mathews-Tom/armory · 67 tokens

re0-merge

Review and land an external contribution the way this suite does: gate it against the thesis, land it with the author's credit intact, complete a new skill rather than merging it raw, then approve, credit, and explain before closing. Use when reviewing a pull request, as any collaborator or maintainer, not only the…

LilMGenius/paperthin · 70 tokens