git-sync-branches

git-sync-branches is a skill for Claude Code, Codex from escapeboy/ai-prompts. It costs 61 tokens per session (1,413 once invoked), scanned A, original, MIT.

Flujo de trabajo para ordenar las ramas de un repositorio Git, que guarda el código y su historial de cambios. Integra las ramas de funciones en develop y mantiene develop sincronizada con master o main.

In plain words
What is it for?
Sirve para cerrar el trabajo de una versión, integrar ramas de funciones y limpiar las ramas locales y remotas. También puede guardar primero los cambios pendientes.
Why use it?
Evita dejar ramas antiguas, cambios sin guardar o ramas principales desactualizadas. También revisa los submódulos, que son repositorios Git incluidos dentro de otro repositorio.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/escapeboy/ai-prompts/git-sync-branches
Any agent
npx skills add escapeboy/ai-prompts --skill git-sync-branches
Clone the repo
git clone --depth 1 https://github.com/escapeboy/ai-prompts

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-sync-branches

README.md
[![agentmods](https://agentmods.dev/badge/skills/escapeboy/ai-prompts/git-sync-branches.svg)](https://agentmods.dev/skills/escapeboy/ai-prompts/git-sync-branches)
Your own site
<a href="https://agentmods.dev/skills/escapeboy/ai-prompts/git-sync-branches"><img src="https://agentmods.dev/badge/skills/escapeboy/ai-prompts/git-sync-branches.svg" alt="Measured on agentmods" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,413 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00061 $0.01413
Opus 5 $0.00030 $0.00707
Sonnet 5 $0.00012 $0.00283
Haiku 4.5 $0.00006 $0.00141

Measured 5d ago against content hash 3c6032a3e04f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-sync-branches 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 5d 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.

03-custom-skills/examples/git-sync-branches/SKILL.md · 173 lines

How it starts

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

git-sync-branches

Commit everything, merge all feature branches into develop, sync master/main, delete feature branches. Handles submodules.

Workflow

Step 1: Commit uncommitted changes

git status

If there are untracked files or modifications, commit them:

git add <specific files or dirs>
git commit -m "chore: commit pending changes before branch sync"

Step 2: Identify the main branch name

  • Check for master vs main — use whichever exists
  • Check for develop — this is the integration branch
git branch | grep -E "^\*? *(master|main|develop)$"

Step 3: Process submodules (if any)

For each git submodule, run the full sync workflow inside the submodule first:

git submodule status

For each submodule that has feature branches:

  1. cd <submodule-path>
  2. Run Steps 1–6 of this workflow inside the submodule
  3. cd .. back to parent

Step 4: Find all feature branches ahead of develop

git branch | grep "feat/"

For each feature branch, check how many commits it's ahead of develop:

git log --oneline develop..<branch> | wc -l

Only merge branches that are actually ahead (non-zero).

Step 4b: Triage each branch — keep, rebase, or close (don't blanket-merge)

Before merging, classify every feature branch and state the recommendation with a reason. Blanket "merge everything ahead" buries dead experiments and stale spikes into develop.

For each branch ahead of develop:

git log --oneline develop..<branch>          # what work is on it
git log --oneline <branch>..develop | wc -l  # how far behind develop it is (drift)
git log -1 --format='%cr' <branch>           # how stale (last commit age)

Recommend one of:

  • Merge — real, finished, in-scope work. Proceed to Step 6.
  • Rebase first — useful work but far behind develop (drift) or conflicting; git rebase develop <branch> (or recommend the author do it) before merging.
  • Close — stale spike, superseded, or abandoned (old last-commit + no unique value vs develop). Recommend deleting WITHOUT merging; in Step 9/11 delete it but do NOT fold its commits into develop.

Read the full file on GitHub · 173 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. 5d ago First seen · 173 lines · 61 tokens per session scan A 3c6032a3e04f

Subscribe to this mod's changes

git-sync-branches is a skill published in the GitHub repository escapeboy/ai-prompts (91 stars, last pushed 9d ago), licensed MIT. It adds 61 tokens to every session and 1,413 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

git-commit

Generate well-formatted git commit messages following conventional commit standards.

ThinkInAIXYZ/deepchat · 15 tokens

commit-push-pr

Commit selected local changes, push the branch, and create or update a GitHub pull request with BitFun attribution. Use when the user asks to 提交 PR、提代码、commit and push、开 PR、create a pull request, or wants a Claude Code-like one-command PR publishing flow from BitFun.

GCWing/BitFun · 68 tokens

commit

Commit current changes with a clear, descriptive message.

NVIDIA-NeMo/DataDesigner · 11 tokens

contributing

How to contribute to evlog, covering commit and PR conventions, changesets, the Definition of Done, testing rules, and the authored skills that walk through building a new adapter, enricher, framework integration, or map rule. Load this for any question about contributing, opening a PR, or adding something to the…

HugoRCD/evlog · 68 tokens

github-contributor

End-to-end playbook for shipping high-quality pull requests to open-source projects you don't maintain — discovery, CONTRIBUTING compliance, PR-size check, minimal-diff implementation, PR description with AI-assisted disclosure, conflict resolution, and post-submission maintainer interaction. Use whenever creating…

daymade/claude-code-skills · 133 tokens

git-commit

Creates git commits following Conventional Commits format with type/scope/subject and detailed markdown body. Use when user wants to commit changes, create commit, save work, or stage and commit. Enforces project-specific conventions from CLAUDE.md. Each change type gets its own markdown heading (# emoji + type), with…

redai-infra/Relax · 73 tokens