squash-commits

Squash feature branch commits into one with an AI-generated summary.

Updated Nov 16, 2025
One-click install
npx skills add https://github.com/mixomat/claude-plugins --skill squash-commits
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-commits
Source: https://github.com/mixomat/claude-plugins/tree/main/plugins/git-workflow/skills/squash-commits
Command: npx skills add https://github.com/mixomat/claude-plugins --skill squash-commits

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill squashes all commits in a feature branch into a single commit with a well-structured, AI-generated summary message, facilitating clearer history and simpler PRs.

Core Features & Use Cases

  • Safety & Backups: Creates a backup branch before squashing and checks for uncommitted changes.
  • Base Branch Detection: Auto-detects main, master, or develop as the base branch.
  • Commit Type Inference: Determines commit type from branch name (including JIRA patterns) or a mapping.
  • AI-Generated Message: Produces a concise, well-formatted commit message with a list of functional changes.
  • Approval Workflow: Presents the message and asks for user approval before executing.
  • Output: Produces a single, squashed commit on top of the base branch.

Quick Start

Example: On branch feature/TVFUS-12345-add-auth, say "squash commits" to generate and execute the squash flow, with the system asking for approval before committing.

Frequently Asked Questions about squash-commits

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I squash multiple commits into one with a summary message?

Squashing commits combines multiple commits into a single commit with a unified message. This Skill automates the process by analyzing your feature branch commits, generating a descriptive summary with AI, and applying the squash after your approval—cleaning your Git history before merging.

Can I squash commits automatically before creating a pull request?

Yes. This Skill detects your feature branch, identifies the base branch (main, master, or develop), generates an AI-crafted commit message summarizing all changes, and executes the squash with your explicit approval—ready for a cleaner PR.

What happens to my original commits when I squash?

This Skill creates a backup branch preserving your original commits before squashing. After approval, all commits collapse into one on your feature branch, leaving the backup untouched so you can recover the original history if needed.

Does squashing work with JIRA ticket patterns in branch names?

Yes. This Skill infers commit type from branch names including JIRA patterns (e.g., feature/TVFUS-12345-description), uses that context to classify changes, and incorporates it into the AI-generated summary for better traceability.

What safety checks happen before squashing commits?

This Skill verifies you have no uncommitted changes, creates a backup branch, analyzes all commits to derive functional impact, and requires explicit user approval before executing any squash—preventing accidental data loss.