Skip to content
Skill Authoring
Command

/sync-branch

Sync feature branch with the latest main branch.

BOOST
From plugin
agent-toolkit
2.6k8 skills6 agents8 commands
Install
$ npx -y skills add softaworks/agent-toolkit --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/sync-branch

Context preview

What this command does when you run it.

Sync feature branch with the latest main branch.

Command definition

sync-branch.md
description: Sync feature branch with the latest main branch.
argument-hint: [target]

1. Fetch latest upstream refs: `git fetch origin --prune`. 2. Identify target branch (default `main`, or override via argument). 3. Rebase current branch onto target:

   git rebase origin/${target:-main}

4. Resolve any conflicts 5. Force-with-lease push to update the PR:

   git push --force-with-lease origin $(git branch --show-current)
Ships withagent-toolkit

Opinionated skills shared by @leonardocouy for improving daily work efficiency with Claude Code. Skills are packaged instructions and scripts that extend agent capabilities across development, documentation, planning, and professional workflows.

Get the whole plugin

Other commands on agent-toolkit.