fixup

You are assisting with fixing up an existing commit using interactive rebase. Follow these steps:

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fixup" with this command: npx skills add yusuke-suzuki/dotfiles/yusuke-suzuki-dotfiles-fixup

Fixup

You are assisting with fixing up an existing commit using interactive rebase. Follow these steps:

  1. Initial Assessment
  • Run git status to see if there are uncommitted changes

  • Run git fetch origin to get latest remote updates

  • Display existing commits with git log origin/main..HEAD --oneline

  1. Create Fixup Commit

If there are uncommitted changes:

Show the commit history

Ask user which commit hash to fixup (or identify it based on context)

Stage changes with git add . or ask which files to stage

Create a fixup commit:

git commit --fixup=<commit-hash>

  1. Autosquash Rebase

Run non-interactive rebase with autosquash:

git rebase --autosquash origin/main

  1. Commit Message Review

After rebase completes, verify the commit message in two phases.

Phase 1: Evaluate

Display the rebased commit:

git show HEAD

Read .claude/rules/commit-message.md — especially the "After /fixup or --autosquash rebase" section.

Evaluate whether the existing message accurately describes the purpose of the final diff as a single coherent unit.

If the message is accurate, skip amending and proceed to Step 5.

Phase 2: Amend (only if needed)

If the message does not accurately describe the commit's purpose:

  • Draft a corrected message based on the final diff — not on what changed between iterations

  • Explain what is inaccurate and why

  • Update with git commit --amend

  1. Post-Rebase Actions

After message review:

Display the final commit history:

git log origin/main..HEAD --oneline

Inform the user to run /publish to push changes and update the PR

Key Principles

  • Use --fixup=<hash> to create fixup commits targeting specific commits

  • --autosquash automatically merges fixup commits during rebase

  • After rebase, evaluate the existing message before amending — it is often already accurate and needs no change

  • Read commit-message.md before drafting any corrected message

  • Commit messages follow the commit-message rule

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

resolve-comments

No summary provided by upstream source.

Repository SourceNeeds Review
General

lint-doc

No summary provided by upstream source.

Repository SourceNeeds Review
General

publish

No summary provided by upstream source.

Repository SourceNeeds Review