Fetches a base branch and rebases the current branch onto it, preserving staged, unstaged, and untracked work. Use when the user wants to sync or update their branch.
Ships in git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Brings the current branch up to date with the default branch of the remote (or the base branch the user names) by rebasing it, without touching the user's uncommitted work.
NEVER use cd <path> && git compound commands — they trigger security approval prompts. Run git commands directly (the working directory is already the target repo), or use git -C <path> if you need to target a different directory.
In PowerShell, quote every ref that contains @{, or PowerShell reads it as a hashtable: git stash pop --index 'stash@{1}', git rev-parse '@{u}'.
ALWAYS:
origin/main), never the local one, so main never has to be checked out. That also works in a linked worktree while main is checked out in another oneNEVER:
git reset --hard, git checkout -- ., git clean, git stash drop or git stash clear — the user's work lives in the stash until it has been restoredgit pull or git rebase --autostash. Autostash re-applies the stash without --index, so staged changes come back unstaged, and it leaves untracked files outgit rev-parse --abbrev-ref HEAD # Current branch ("HEAD" means detached)
git status # Operations in progress, unmerged paths
git status --short # The uncommitted work, kept for the report
git remote # Remotes
Stop, change nothing, and tell the user why when:
git status shows a rebase, merge, cherry-pick, revert or bisect in progress, or unmerged pathsWhen the user named one (for example develop or origin/develop):
git remote (origin/develop) is used as-isdevelop) is taken from origin, or from the only remote when there is no originWhen the user named none, use the remote's default branch:
git symbolic-ref --short refs/remotes/origin/HEAD # e.g. origin/main
If that fails, try origin/main, then origin/master (git rev-parse --verify --quiet <ref>). If none exists, ask the user which branch to rebase onto.
When the current branch is the base branch (on main with base origin/main), stop: there is nothing to rebase. Suggest git pull --ff-only instead.
git fetch <remote>
git rev-parse --verify --quiet <base> # The base exists after the fetch
If the fetch fails (offline, no access), stop. Nothing has changed yet.
git rev-list --count HEAD..<base> # Commits the base has that the branch doesn't
git rev-list --count <base>..HEAD # The branch's own commits
When the first count is 0, the branch is already up to date: say so and stop. Don't stash anything.
Skip this step when git status --short from Step 1 was empty.
git stash push --include-untracked -m "rebase-branch: <branch> onto <base> <timestamp>"
git stash list # Find the entry by its message
Use the current date and time as <timestamp>, so the message is unique. The stash is shared by every worktree of the repository, so later steps find the entry by this message, not by assuming it's stash@{0}.
Ignored files are not stashed and are not touched by the rebase.
git rebase <base>
If the rebase stops on a conflict:
git diff --name-only --diff-filter=Ugit status) and which files conflictgit add them and git rebase --continue; or git rebase --abort to go back to where they startedgit stash pop --index stash@{N} brings their work back — or they can ask you to continueIf the rebase fails for any other reason (a hook, a dirty tree), show the error, run git rebase --abort if a rebase is in progress, then restore the stash as in Step 6 so the user is back where they started.
Skip this step when nothing was stashed.
git stash list # The entry's index, found by its message
git stash pop --index stash@{N}
git status --short
--index restores which changes were staged. When pop succeeds, git drops the entry itself.
If pop fails, git keeps the entry. Nothing is lost. Tell the user what happened:
git stash drop stash@{N} removes the entryConflicts in index. Try without --index.: the staged part no longer applies on its own. Offer git stash pop stash@{N} without --index, which keeps every change but leaves them all unstaged. Run it only if the user agreesCompare git status --short with the one from Step 1: the same files, with the same staged (first column) and unstaged (second column) state.
git rev-parse --abbrev-ref --symbolic-full-name @{u} # The branch's tracking branch, if any
git status -sb # Ahead/behind against it
Report briefly:
git push --force-with-lease. Never run it. When it's only ahead, a normal git push will doExample:
Rebased feature/paging onto origin/main: 4 new commits from main, your 3 commits replayed on top.
Your uncommitted work is back as it was: 2 staged, 1 unstaged, 1 untracked.
The branch was pushed before, so the next push needs: git push --force-with-lease
What SKILL.md sets; muted values are Claude Code's defaults
/git:rebase-branch [base-branch]from git
npx claudepluginhub atc-net/atc-agentic-toolkit --plugin git3 skills in this plugin
/suggest-commitGenerate conventional commit message suggestions for staged git changes, aligned with the repository's commit style. Use when the user wants a commit message suggestion, asks what to commit, or says "suggest commit"./suggest-prGenerate a pull request title and well-structured markdown summary from the commits on the current branch. Use when the user wants to create or draft a PR description, asks for a PR summary, or says "suggest PR".Other plugins' skills for the same job