git-branch

git-branch is a skill for Claude Code from w693847022/memory_service. It costs 19 tokens per session (926 once invoked), scanned A, original, MIT.

A Git branch management guide for feature and bug-fix work. Git branches are separate lines of development that let changes be prepared before they are merged into another branch.

In plain words
What is it for?
Use it to prepare a feature or fix branch, return to the starting branch, pull updates, merge changes, create a commit, add a tag, and clean up the development branch.
Why use it?
It standardizes how development branches are created, tracked, merged, and tagged. It also describes checks for protecting the main branch and handling merge conflicts.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to prepare a feature or fix branch, return to the starting branch, pull updates, merge changes, create a commit, add a tag, and clean up the development branch.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/w693847022/memory_service/git-branch"><img src="https://agentmods.dev/badge/skills/w693847022/memory_service/git-branch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 926 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.00019 $0.00926
Opus 5.5 $0.00008 $0.00370
Sonnet 5.5 $0.00004 $0.00185
Haiku 4.5 $0.00002 $0.00093

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

Security

Grade A, and why

git-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 3mo 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.

examples/skills/git-branch/SKILL.md · 129 lines

What it actually says

Git 分支管理技能

为 feature-dev 和 bug-fix 技能提供 Git 分支管理功能。


用法

git-branch prepare <id> <type>  # 准备开发分支
git-branch merge <id> <type>    # 合并开发分支

参数说明:

  • id: feature 或 fix 的记录 ID (如 feat_20260321_1)
  • type: 类型,feature 或 fix

prepare 命令

目标: 在代码修改前准备开发分支

流程

  1. 检查当前分支

    • 获取当前分支名
    • 检查是否为 main 或 master
    • 如果是主干分支,提示用户切换到其他分支并退出
  2. 保存起始分支

    • 将当前分支名保存到环境变量或临时文件
    • 用于后续合并回原分支
  3. 创建开发分支

    • 根据类型生成分支名:
      • feature: feature-{id}
      • fix: fix-{id}
    • 检查分支是否已存在
      • 存在: 直接切换使用
      • 不存在: 创建并切换

输出格式

## 分支准备完成

- 起始分支: <branch_name>
- 开发分支: <dev_branch_name>
- 分支状态: <新建/已存在>

错误处理

场景 处理方式
当前在 main/master 提示用户切换分支,退出并返回错误
Git 命令失败 显示错误信息,退出

merge 命令

目标: 在代码完成后合并开发分支回原分支

流程

  1. 获取起始分支

    • 从环境变量或临时文件读取起始分支名
    • 如果不存在,提示用户输入起始分支名
  2. 切换回起始分支

    • 切换到起始分支
  3. 拉取远程更新

    • 执行 git pull 确保分支最新
  4. 合并开发分支

    • 合并开发分支到起始分支
    • 如果有冲突,尝试自动解决:
      • 使用 git merge -X theirs 或 git merge -X ours
      • 如果无法自动解决,提示用户手动处理
  5. 生成提交信息

    • 调用 git-commit 技能生成提交信息
    • 执行提交
  6. 打 tag

    • 使用开发分支名作为 tag 名
    • 执行 git tag <dev_branch_name>
  7. 删除开发分支

    • 执行 git branch -D <dev_branch_name>

输出格式

## 分支合并完成

- 起始分支: <branch_name>
- 开发分支: <dev_branch_name>
- Tag: <tag_name>
- 提交信息: <commit_message>

错误处理

场景 处理方式
起始分支不存在 提示用户输入起始分支名
合并冲突无法自动解决 保留冲突状态,提示用户手动处理
提交失败 显示错误信息,保留分支状态

注意事项

  1. 必须在非主干分支执行: 技能会检查当前分支,main/master 分支会拒绝执行
  2. 分支命名规则: feature-{id} 或 fix-{id},确保唯一性
  3. Tag 规则: 使用开发分支名作为 tag 名
  4. 冲突处理: 优先尝试自动解决,失败则让用户手动处理
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. 3mo ago First seen · 129 lines · 19 tokens per session scan A 740c55c61453

Subscribe to this mod's changes

git-branch is a skill published in the GitHub repository w693847022/memory_service (1 stars, last pushed 6mo ago), licensed MIT. It adds 19 tokens to every session and 926 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.

Related

git-branch compared with skills from other repositories

git-branch next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-branchw693847022/memory_serviceSkill16mo agoMITA19Claude Code
merge-batchdiegosouzapw/OmniRouteSkill91k4d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15ktodayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.8ktodayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1k2d agoMITA51Claude Code
comet-githubrpamis/cometSkill3.3kyesterdayMITA72Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.5ktodayMITA51Claude Code, Codex