git-branch-sync

git-branch-sync is a skill for Claude Code, Codex from pivoshenko/pivoshenko.ai. It costs 89 tokens per session (823 once invoked), scanned A, original, MIT.

A guide for updating a Git branch by fetching the latest base branch and replaying the branch's commits on top of it; this replay is called a rebase.

In plain words
What is it for?
Use it to sync with main or another named base branch, handle local changes safely, identify conflicts, and report whether the branch needs a force push.
Why use it?
It keeps a branch current without creating a merge commit and clearly stops when conflicts need a developer's decision.

Skill for Claude CodeCodex

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

Good fit Use it to sync with main or another named base branch, handle local changes safely, identify conflicts, and report whether the branch needs a force push.

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/pivoshenko/pivoshenko.ai/git-branch-sync"><img src="https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/git-branch-sync.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 823 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.00089 $0.00823
Opus 5.5 $0.00036 $0.00329
Sonnet 5.5 $0.00018 $0.00165
Haiku 4.5 $0.00009 $0.00082

Measured 2mo ago against content hash b1e66ab078d5, 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-sync 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 2mo 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.

skills/git-branch-sync/SKILL.md · 43 lines

How it starts

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

Git Branch Sync

Catch current branch up to base. Rebase only. Surface conflicts.

Flow

  1. Parallel:
    • git status --porcelain
    • git branch --show-current
    • git rev-parse --abbrev-ref --symbolic-full-name @{u} (upstream if any)
    • Rebase/merge already in progress (git status says so) or detached HEAD (git branch --show-current empty) -> stop with a one-line explanation. Why -> a second git rebase on top of a half-finished one errors confusingly, and there is no current branch to sync
  2. Base: user names one -> verbatim. Else detect: git symbolic-ref --short refs/remotes/origin/HEAD -> strip the origin/; ref missing -> git remote set-head origin -a, re-read; no remote -> main, fall back master. Why -> rebasing onto main in a develop-based repo replays the branch onto the wrong parent and manufactures conflicts that aren't real
  3. Dirty -> stash: git stash push -u -m "sync-branch auto-stash". Pop later. Unsafe (unresolved merge) -> stop + tell user
  4. On base -> git pull --ff-only origin <base>. Fails (local base diverged) -> pop the stash if step 3 made one (nothing was rewritten), then stop + tell user. No auto-rebase of base itself
  5. Else:
    • git fetch origin <base>
    • git rebase origin/<base>
    • No remote -> skip the fetch, git rebase <base> (local ref). Local <base> absent too -> nothing to sync against; pop the stash if step 3 made one, stop + say so
  6. Conflicts:
    • git status -> list conflicted paths
    • Stop + surface. No auto-resolve
    • Tell user: resolve, git add <paths>, git rebase --continue. Mention git rebase --abort escape
    • Leave stash in place. Tell user to pop after resolve
  7. Rebase done (clean or aborted) -> pop stash if created
  8. Print one-liner: branch, base, commits replayed (git rev-list --count origin/<base>..HEAD before the rebase vs after), force-push needed? (yes = upstream exists and history was rewritten)
    • 0 commits replayed (already up to date) -> say so explicitly; don't mention force-push (nothing rewritten)

Read the full file on GitHub · 43 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. 2mo ago Changed b1e66ab078d5
  2. 2mo ago Changed · +2 lines 363f857db302
  3. 2mo ago Changed cc781e8917ab
  4. 3mo ago First seen · 41 lines · 89 tokens per session scan A 6f1873477459

Subscribe to this mod's changes

git-branch-sync is a skill published in the GitHub repository pivoshenko/pivoshenko.ai (7 stars, last pushed 2d ago), licensed MIT. It adds 89 tokens to every session and 823 once invoked, about $0.0004 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-sync compared with skills from other repositories

git-branch-sync next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
git-branch-syncpivoshenko/pivoshenko.aiSkill72d agoMITA89Claude Code, Codex
artifactscloudflare/skillsSkill3.5k5d agoApache-2.0A66Claude Code
skill-upstream-prluongnv89/asmSkill976todayMITA56Claude Code
skill-changelogluongnv89/asmSkill976todayMITA53Claude Code
meanest-editorelvisun/newsjackSkill1.7k5d agoMITA33Claude Code
ai-visibility-writingelvisun/newsjackSkill1.7k5d agoMITA137Claude Code
headline-generatorelvisun/newsjackSkill1.7k5d agoMITA88Claude Code