squash-pr

Squash WIP commits on Git feature branches via interactive rebase.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill squash-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-pr
Source: https://github.com/SumitRajpal/nextjs-claude-architecture/tree/main/.claude/skills/squash-pr
Command: npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill squash-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines Git workflows by cleaning up commit histories on feature branches before merging, making history easier to review.

Core Features & Use Cases

  • Automated history cleanup: Detects WIP commits and suggests squashes to produce cohesive, descriptive messages.
  • Safe, guided rebase: Proposes an interactive rebase plan and prompts for confirmation before rewriting history.
  • Use Case: On a feature branch with multiple small commits, squash them into meaningful units before creating a PR.

Quick Start

Please review the current branch history and propose a squash plan, then perform an interactive rebase to squash WIP commits.

Frequently Asked Questions about squash-pr

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

FAQPage Schema
How do I squash WIP commits before merging a feature branch?

To squash WIP commits before merging, use an interactive rebase plan that identifies noisy commits and consolidates them into clean, descriptive messages. This ensures a readable history before integration.

What is the safest way to rewrite Git commit history on a feature branch?

The safest way to rewrite Git commit history is using a guided interactive rebase that prompts for confirmation before applying changes. It should also warn you if the branch has already been pushed to avoid data loss.

How do I clean up multiple small commits into meaningful units for a PR review?

To clean up multiple small commits for PR review, consolidate the feature branch history by detecting WIP commits and proposing a squash plan. This creates cohesive, descriptive commit messages before creating the PR.

Can I squash commits if the feature branch has already been pushed to the remote?

You can squash commits on a pushed branch, but the process issues a warning to prevent data loss. It prompts for confirmation before rewriting history, ensuring you acknowledge the implications of force-pushing the updated branch.

When should I squash commits in my Git workflow?

You should squash commits in your Git workflow when a feature branch contains multiple small or noisy WIP commits. Squashing them before merging streamlines the history, making the final integrated project history easier to review.