Skip to content
Back to skills

Fixup Commits

ASecurity

Matches staged review fixes to the commits they belong to, creates fixup commits and autosquashes once you approve.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agentsgit

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill fixup-commits --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fixup Commits?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Fixup Commits
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-fixup-commits/badge)](https://www.skillsdirectory.com/skills/workspace-templates-fixup-commits)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: fixup-commits
description: Matches staged review fixes to the commits they belong to, creates fixup commits and autosquashes once you approve.
argument-hint: "[base branch, default main]"
user-invocable: true
disable-model-invocation: true
---

Turn the staged changes into fixup commits for the branch. Base branch: $ARGUMENTS (use main if empty).

1. Run `git status --short` and `git diff --staged`. If nothing is staged, stop. Never stage files yourself.
2. List the branch commits with `git log --oneline <base>..HEAD`. Stop if HEAD is on the base branch itself.
3. For each staged hunk, run `git blame -L <range> <base>..HEAD -- <file>` on the original lines and note which branch commit last touched them. A hunk touching only new lines of one commit maps to that commit.
4. Show a table: hunk, file, target commit hash and subject, confidence. Mark hunks with no clear owner as "unmatched" and leave them staged.
5. Ask: "Create these fixups?" After a yes, split the index per target and run `git commit --fixup <hash>` for each.
6. Check whether the branch was pushed with `git status -sb`. If it was, warn that autosquash rewrites history and ask again.

Then show `git log --oneline` and ask before running `git rebase -i --autosquash <base>` with GIT_SEQUENCE_EDITOR=true. Never force push.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.