home/claude/skills/git-commit-fixup/SKILL.md
Analyze working tree changes, map to existing commits, and create fixup commits for autosquash
npx skillsauth add lambdalisue/dotfiles git-commit-fixupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
context (optional): Additional context for mapping changes to commits (e.g., "These changes are for the auth refactor", "Fix edge cases in parser"). This context will be used to inform which existing commits the changes should be mapped to.Analyze - Use the Task tool (subagent_type: "git-commit-fixup") to analyze all working tree changes, map them to existing commits since base branch, and create a fixup plan.
/git-commit instead. STOP.Approve - Present the fixup plan to the user exactly as returned by the agent. Use AskUserQuestion to ask for approval with options: "Approve", "Modify" (let user adjust the plan), "Cancel".
Execute - If approved, execute the approved plan directly via the Bash tool (do NOT delegate to the agent for execution). The user's approval at step 2 is the explicit permission; this is the only place commits run.
Procedure:
git backup "before commit-fixup" (or git branch backup/$(date +%s) HEAD if git backup alias is unavailable)git reset HEAD -- .git diff --cached --statgit commit --fixup=<target-sha>git commit -m "<message>"git log --oneline of the new commits to the user.Forbidden during execution: git add -A, git add ., git commit -a, git stash, git rebase, git commit --amend. Stage explicitly by name only.
If a commit fails (e.g., pre-commit hook), stop and report — do NOT improvise around the failure.
Present - Show rebase instructions in Japanese:
✅ fixup コミットを作成しました
以下のコマンドで自動的にスカッシュできます:
git rebase -i --autosquash origin/<base-branch>
tools
Update the title and body of an existing pull request WITHOUT asking for approval
tools
Create a pull request with title and body based on commits WITHOUT asking for approval
tools
Create a Conventional Commit from already staged changes WITHOUT asking for approval
tools
Map staged changes to existing commits and create fixup commits for autosquash WITHOUT asking for approval