From agitentic
Sync the local default branch and `fork/<branch>` to `upstream/<branch>`. Fetches upstream, fast-forwards the local branch, and pushes the result to the fork. Use when the user asks to sync a fork, pull in upstream changes, update main from upstream, or "bring my fork up to date". Pairs with the agitentic:git-fork skill, which sets up the `upstream` and `fork` remotes this skill expects.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agitentic:git-syncThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Sync the local default branch and `fork/<branch>` to `upstream/<branch>`.
Sync the local default branch and fork/<branch> to upstream/<branch>.
The default mode is fast-forward only, so divergent local commits are
preserved (the script exits with an error and the user decides what to
do). Pass --force to hard-reset and force-push when the user
explicitly wants to discard divergent work.
Use this skill when the user asks to:
--force).Do not use this skill when:
upstream / fork remotes — set them up first
with the agitentic:git-fork skill.git fetch + git merge, not a sync.Run the bundled script from inside the repository:
scripts/git-sync [--branch <branch>] [--force]
--branch <branch> — branch to sync. Defaults to upstream's default
branch (read from refs/remotes/upstream/HEAD, usually main).--force — allow non-fast-forward updates. Hard-resets local
<branch> to upstream/<branch> and force-pushes (--force-with-lease)
to fork. Use this when the user explicitly says "reset", "overwrite",
or "discard local commits".The script:
upstream and fork remotes exist.upstream/<branch>.<branch> ref:
--force is set.<branch> to fork. With --force, uses
--force-with-lease (refuses to clobber commits the local view doesn't
know about).User: "Sync my fork with upstream"
scripts/git-sync
User: "Reset main to whatever upstream has"
scripts/git-sync --force
User: "Sync the release-1.x branch"
scripts/git-sync --branch release-1.x
After the script returns, confirm by showing the user
git log --oneline -3 main and git rev-parse main fork/main upstream/main.
gitupstream and fork remotes configured. The
agitentic:git-fork skill sets these up.fork, the user must have push access to the fork
repo (typically true if it's their own).Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub brycelelbach/agitentic --plugin agitentic