/git:history-cleanupfrom git
Use when the user wants to tidy git history before merging - squashing, fixing up, rewording, reordering or dropping commits - or to undo a mistake and recover lost commits with the reflog.
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: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Rewriting history is fine on a private branch and risky on a shared one. Follow these rules first:
main or any branch others build on.git push --force-with-lease.git branch backup/<branch-name>. Delete it once the user is happy.Prefer fixup commits plus autosquash over editing commits by hand:
git commit --fixup=<sha> # stage the fix first
git rebase -i --autosquash origin/main
Interactive editors may not be available to you. Run the rebase non-interactively by accepting the generated todo list as-is:
GIT_SEQUENCE_EDITOR=: git rebase -i --autosquash origin/main
Use --fixup=reword:<sha> to change only an earlier commit's message.
git reset --soft $(git merge-base HEAD origin/main)
git commit # write a fresh Conventional Commits message
git commit --amend # change message and/or add staged changes
git commit --amend --no-edit # add staged changes, keep the message
Undo the last commit, keep its changes staged: git reset --soft HEAD~1
Undo a commit that is already on a shared branch: git revert <sha> (don't rewrite)
Abort a rebase in progress: git rebase --abort
Find "lost" commits after a bad reset or rebase:
git reflog # find the sha from before the mistake
git branch recovered/<name> <sha>
Avoid git reset --hard and git clean -fd unless the user asks for them explicitly; they discard work that the reflog can't always bring back (e.g. uncommitted changes).
Show the result with git log --oneline origin/main..HEAD so the user can check it before anything is pushed.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hiroshisuda/agent-skills --plugin git3 skills in this plugin
/branchingUse when creating a new git branch or starting work on a feature or fix, when naming a branch, or when bringing an existing branch up to date with main./commit-messagesUse when writing or reviewing a git commit message, when committing or amending changes, or when titling or merging a pull request (including PRs in a stack). Applies the user's Conventional Commits style with concise messages and references to tickets or design docs.Other plugins' skills for the same job