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.
npx agentmods add skills/escapeboy/ai-prompts/git-sync-branchesnpx skills add escapeboy/ai-prompts --skill git-sync-branchesgit clone --depth 1 https://github.com/escapeboy/ai-promptsWrote 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.
[](https://agentmods.dev/skills/escapeboy/ai-prompts/git-sync-branches)<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>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.
| Model | Per session | Once 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 |
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.
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
mastervsmain— 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:
cd <submodule-path>- Run Steps 1–6 of this workflow inside the submodule
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.
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.
- 5d ago First seen · 173 lines · 61 tokens per session scan A 3c6032a3e04f
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.
Other skills, from other repositories
git-commit
Generate well-formatted git commit messages following conventional commit standards.
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.
commit
Commit current changes with a clear, descriptive message.
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…
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…
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…