Squash — Git skill for Claude Code
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
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 RepositoryRelated Skills
Gw PR Merge
Merge PR #$ARGUMENTS with squash and clean up worktree if exists.
Rebase Plan
Drafts a pick / squash / reword plan for git rebase -i to clean up a feature branch before PR. Advisory only -
Review Mode Arken
Interactive, incremental code review for Arken. Analyzes only user-given commit(s), surfaces critical issues o
Cr Status
Is the head commit actually reviewed, and what is still open
Risk Annotate
Annotate the risky hunks in the latest commit (or ...HEAD) so you know where to review first
Rewrite History
Reimplement the current branch with a clean, narrative-quality git commit history suitable for reviewer compre
Related Agents
Work Reviewer
Reads one local repo clone's RECENT git history (since a given commit) and clusters what landed into 1-3 thema
Repo Auditor
Repository health check agent - analyzes file sizes, detects data files, validates staged commits. Use PROACTI
Commit Craft
Expert at creating clean, logical git commits following conventional commit format. Use when user requests git