squash

Group related changes into logical, atomic commits and rewrite branch history.

2|1|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Vekta/PolyForge --skill squash-vekta
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash
Source: https://github.com/Vekta/PolyForge/tree/main/skills/squash
Command: npx skills add https://github.com/Vekta/PolyForge --skill squash-vekta

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of cleaning up messy commit histories on a branch, making it easier to create clear, logical, and reviewable pull requests.

Core Features & Use Cases

  • Commit Grouping: Organizes scattered commits into meaningful, atomic units.
  • History Rewriting: Safely rewrites commit history to improve clarity and reduce noise.
  • Use Case: After a period of rapid, iterative development, you have 20 small commits. Use /squash to consolidate them into 4-5 well-defined commits representing distinct features or fixes before submitting a PR.

Quick Start

Use the squash skill to clean up the current branch against origin/main.

Frequently Asked Questions about squash

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

FAQPage Schema
How do I clean up git commits before a pull request?

To clean up git commits, the skill analyzes your branch diffs, groups related changes into logical atomic commits, and executes the rebase process to rewrite commit history before submitting a pull request.

What is the best way to consolidate multiple small commits into logical units?

The best way to consolidate commits is by analyzing diffs to categorize changes, then proposing a new commit structure that reorganizes scattered commits into meaningful, atomic units via rebase.

Can I rebase and group commits on an existing pull request?

You can rebase commits on an existing pull request by rewriting the branch history and updating the PR summary to reflect the newly grouped, atomic commit structure.

How does commit grouping work when rewriting git history?

Commit grouping works by analyzing your current branch changes against origin/main, categorizing related diffs, and proposing a structured rebase to rewrite git history into clear, logical commits.

When should I rebase and squash commits on my branch?

You should rebase and squash commits after rapid iterative development leaves you with many small commits, consolidating them into well-defined commits representing distinct features before code review.