Skip to content

wmxscott/git-sync

unversioned · 18c10296d4b6MIT

Fast-forwards the current git branch to its upstream before work starts, and stops when it has diverged

git-sync

Brings the current branch up to date with its upstream before the agent starts work, so it never edits or reviews code against a stale base.

The fast-forward-sync skill runs at the start of a task in a git repository. It fetches, compares the branch with its upstream, and fast-forwards only when the branch is strictly behind. It never merges, rebases, stashes or resets.

Install

Claude Code:

claude plugin marketplace add wmxscott/ai-toolkit
claude plugin install git-sync@ai-toolkit

Codex:

codex plugin marketplace add wmxscott/ai-toolkit
codex plugin add git-sync@ai-toolkit

Needs git. Nothing else: the plugin is a single skill, with no hooks or scripts.

What it does

Branch stateResult
No upstream, or detached HEADSkipped
Up to dateNothing to do
Behind onlygit merge --ff-only '@{u}'
Ahead onlyNothing to pull
DivergedStops and asks you to choose between merge and rebase

If uncommitted changes would be overwritten, --ff-only refuses and the agent reports it; your working tree is left as it was. If git fetch fails, for example offline, the agent says so and carries on.

It uses git fetch plus git merge --ff-only rather than git pull, whose result depends on your pull.rebase and pull.ff settings.

Agent support

AgentManifest
Claude Code.claude-plugin/plugin.json
Codexplugin.json (Agent Plugins format)

Both load the same skills/ directory.