AlexMollard

Squash — Git skill for Claude Code

Git community

Squash commits from a given commit to HEAD into clean thematic commits.

How to install Squash

Installs to ~/.claude/skills/alexmollard-harness-squash/SKILL.md

Terminal
mkdir -p ~/.claude/skills/alexmollard-harness-squash && curl -fsSL https://raw.githubusercontent.com/AlexMollard/Harness/HEAD/commands/squash.md -o ~/.claude/skills/alexmollard-harness-squash/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

What Squash does


description: Squash commits from a given commit to HEAD into clean thematic commits argument-hint:

Task: Squash history from `$ARGUMENTS` to HEAD

Squash all commits from `$ARGUMENTS` (exclusive) to HEAD into a small number of clean, thematic commits. `$ARGUMENTS` itself is the base and must stay untouched.

If `$ARGUMENTS` is empty, ask me for the start commit before doing anything.

Method — use `commit-tree`, not interactive rebase

This must be conflict-free and c

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Merge Command — Finalize worktree work: update docs, commit, merge to main, clean up 1.3k ★
  • Husky — by evmts - Sets up and manages Husky Git hooks by configuring pre-commit hooks, establishing commit message st 440 ★

Full documentation available on GitHub

View Source Repository