ChrisSimmons

squash

0
0
# Install this skill:
npx skills add ChrisSimmons/claude-tools --skill "squash"

Install specific skill from multi-skill repository

# Description

Squash consecutive co-authored commits into one. Always asks for confirmation before proceeding.

# SKILL.md


name: squash
description: Squash consecutive co-authored commits into one. Always asks for confirmation before proceeding.


The user has invoked /squash. Follow these steps exactly:

  1. Run git log --format="%H %s%n%b" to identify all consecutive commits from HEAD that contain a Co-Authored-By: trailer. Stop at the first commit that does not have one - that is the base.

  2. Show the user:

  3. How many commits will be squashed
  4. The base commit (first one NOT being squashed)
  5. A preview of the squashed commit message (see format below)

  6. Ask the user for explicit confirmation before proceeding. This is a destructive action.

  7. Upon confirmation:

  8. Run git reset --soft <base-commit-hash> to unstage all squashed commits
  9. Commit with the message format below

Squashed commit message format

  • Subject line: Multiple changes
  • Body: each squashed commit's subject line and body, listed from oldest to newest, separated by blank lines. Omit the Co-Authored-By trailers from the body.
  • Final line: Co-Authored-By: Claude Sonnet 4.6 <[email protected]>

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.