git-sync-branches

git-sync-branches is a skill for Claude Code, Codex from escapeboy/ai-prompts. It costs 80 tokens per session (1,946 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

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

Good fit 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.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/escapeboy/ai-prompts/git-sync-branches
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 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/github.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/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-sync-branches

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,946 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00080 $0.01946
Opus 5.5 $0.00032 $0.00778
Sonnet 5.5 $0.00016 $0.00389
Haiku 4.5 $0.00008 $0.00195

Measured 14d ago against content hash 2721d6dc25ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 14d 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 · 209 lines

How it starts

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

git-sync-branches

Commit everything, merge finished feature branches into develop, sync master/main, delete merged and Close branches. Handles submodules.

When to Use (and When NOT to)

Use this skill for Use a simpler approach for
Cleaning up multiple stale feature branches across a repo (and submodules) into develop/master Merging a single branch you're actively working on — just git merge <branch>
Bulk local + remote branch deletion after a sprint/release Deleting one branch you already know is safe — git branch -d <branch>
Repos with git submodules needing coordinated branch sync Single-repo, no-submodule projects — plain git merge + git push
Restoring master/develop to a known-clean, in-sync state Reviewing a PR before merge — use the code-review skill instead

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–12 of this workflow inside the submodule (its own develop → main, deletions and push)
  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 — merge, hold, or close (don't blanket-merge)

Read the full file on GitHub · 209 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. 14d ago Changed · +21 lines · +19 tokens per session 2721d6dc25ec
  2. 27d ago Changed · +15 lines 1def3853dbe9
  3. 1mo 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 15d ago), licensed MIT. It adds 80 tokens to every session and 1,946 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-30.