/git:gpg-sign-historyfrom git
GPG-signs all unsigned commits on the current branch, preserving tree, author, dates, and messages. Useful for key rotation, security cleanup, or enforcing signed history requirements.
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.
The plugin's backend does every mechanical step and prints one JSON object per run. It finds the unsigned commits of the current branch and checks that the key signs. It recreates each commit from the oldest unsigned one up to the tip, with the same tree, parents, author, dates and message, and checks every new commit against the one it replaces. Only then does it move the branch, behind a backup branch of its own. This skill explains the tradeoff and asks the user twice.
A signature carries its own creation time, and every signature this rewrite
makes is dated today. The Git dates stay, and GitHub shows Verified beside
them, but git verify-commit --raw <sha> prints the signature's date: anyone
who inspects a re-signed commit sees when it was signed. Re-signing fits a key
rotation, a security cleanup, or a project that requires a signed history. For a
user who only wants old commits to show Verified, recommend Stop: the badge
costs a new SHA for every commit in the rewrite and a force-push, and anyone who
checks sees the signatures were made today.
Before anything runs, explain this and ask through AskUserQuestion, which
records the choice; a reply in chat is not that record. Three options:
run `"${CLAUDE_PLUGIN_ROOT}/scripts/gpg-sign-history.ts" audit`
On ok: false, report error and detail and stop. Otherwise report
unsigned_count out of commits, with the unsigned list, and
sample_signature: its signed_at beside its committed_at shows the date
tradeoff on the user's own history.
unsigned_count is 0: say so and stop.signing.ready is false: give signing.detail and, for key-locked, the
signing.unlock command, which the user runs in their own terminal; then run
the audit again.Ask once more through AskUserQuestion. The question text itself, not an
option's description, states each of these, leaving out a count of 0 and an
empty list:
rewrite.count commits get a new SHA and a signature dated today, of which
rewrite.resigned were signed already and rewrite.merges are merges;rewrite.foreign_committers commits made by someone else take the user as
committer;other_refs, each named, keep pointing at the old commits;upstream whose rewritten is true, named, needs a force-push.run `"${CLAUDE_PLUGIN_ROOT}/scripts/gpg-sign-history.ts" apply`
On ok: true: rewritten commits, the new head, backup_ref, and checks.
On ok: false, the branch has not moved:
key-locked: give unlock, which the user runs in their own terminal, then run apply again.verification-failed: report each entry of checks.mismatches, checks.unsigned and checks.bad_signatures.error and detail; branch-moved also names backup_ref.State that every author and committer date is preserved and that the GPG
signatures date from this rewrite (signed_at). Then:
git push --force-with-lease, since every SHA in the rewrite changed; the user runs it;"${CLAUDE_PLUGIN_ROOT}/scripts/gpg-sign-history.ts" verify <backup_ref> checks the branch against the backup again, before that push for instance;git branch -D <backup_ref> drops the backup once the history looks right;Unverified until the public key is uploaded: gpg --armor --export <signing.key>, the audit's key, pasted at GitHub > Settings > SSH and GPG keys.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
npx claudepluginhub bengous/claude-code-plugins --plugin git4 skills in this plugin
/commitCommit the current work with a message that follows the repo's convention, closing the branch's issue when its name carries a number. Use when the user asks to commit, to record the work, or to save a change to history./rebaseInteractive rebase of the current branch with a visual plan and reworked commit messages, no editor. Use when the user asks to rebase, rewrite, reorder, reword, or clean up commits, or to continue, skip, or abort a paused rebase./squashSquash git commits by pattern, hash list, or the last N, without opening an editor. Use when the user asks to squash, fold, or combine commits, or to collapse fixup and WIP commits.