squash-merge

Draft standardized commit messages and squash merge GitHub pull requests via gh CLI.

Updated Feb 10, 2026
One-click install
npx skills add https://github.com/mjbellantoni/scm-tools-claude --skill squash-merge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-merge
Source: https://github.com/mjbellantoni/scm-tools-claude/tree/main/skills/squash-merge
Command: npx skills add https://github.com/mjbellantoni/scm-tools-claude --skill squash-merge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the process of squash merging pull requests directly via GitHub's API, ensuring commit messages adhere to project standards and preventing accidental merges.

Core Features & Use Cases

  • Drafts Commit Messages: Generates a commit message following specific formatting rules (subject line, body wrapping, imperative mood).
  • Two-Phase Workflow: Separates message drafting from the actual merge, requiring explicit user approval before execution.
  • GitHub API Integration: Uses gh pr merge for a clean, server-side merge, avoiding local Git complexities.
  • Use Case: When a pull request is ready for merging and the team wants to consolidate its history into a single, clean commit, this skill can be used to draft the appropriate commit message and then perform the squash merge.

Quick Start

Use the squash-merge skill to draft a commit message for the current PR and await approval before merging.

Frequently Asked Questions about squash-merge

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

FAQPage Schema
How do I squash merge a pull request with a standardized commit message on GitHub?

To squash merge a pull request, this skill fetches PR details, drafts a commit message following project standards, and executes the merge using the GitHub CLI command gh pr merge --squash after user approval.

What is the best way to format commit messages for a squash merge?

Formatting commit messages for a squash merge involves generating a subject line and body with proper wrapping in imperative mood, which this skill drafts automatically before presenting it for your review and approval.

Can I use the GitHub CLI to squash merge a PR without local Git complexity?

Yes, you can use the GitHub CLI to squash merge a PR without local Git complexity by leveraging the gh pr merge --squash command server-side, which this skill automates while drafting the commit message.

Does squash merging a PR require user approval before executing the merge?

Squash merging a PR requires explicit user approval before executing the merge, operating in a two-phase workflow that separates commit message drafting from the actual GitHub API merge execution.

When should I choose a squash merge over a rebase merge for my pull request?

You should choose a squash merge over a rebase merge when you want to consolidate a pull request's history into a single, clean commit, as this skill is specifically designed for squash merge scenarios.

Why does my squash merge commit message need to follow project standards?

Your squash merge commit message needs to follow project standards to maintain a clean and consistent Git history, which this skill enforces by drafting the subject line and body according to specific formatting rules.