merge-prep

Squash git feature branch commits into one conventional commit for PR merging.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/spencerbeggs/design-docs-plugin --skill merge-prep
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: merge-prep
Source: https://github.com/spencerbeggs/design-docs-plugin/tree/main/plugin/skills/merge-prep
Command: npx skills add https://github.com/spencerbeggs/design-docs-plugin --skill merge-prep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, gh.

What problem does it solve?

This skill automates the final cleanup of feature branches by squashing multiple commits into a single, clean, conventional commit, ensuring a tidy project history before merging.

Core Features & Use Cases

  • Automated Squash: Safely resets the branch to the merge base and creates a single, consolidated commit.
  • PR Integration: Automatically pulls PR titles and descriptions to generate professional commit messages.
  • Safety Guardrails: Includes preflight checks for uncommitted changes, PR approval status, and force-push safety using lease flags.

Quick Start

Run the merge-prep skill to squash your current branch commits into one and force push the result to the remote repository.

Frequently Asked Questions about merge-prep

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

FAQPage Schema
How do I squash git commits into a single clean commit before merging a pull request?▼

To squash git commits, the merge-prep skill performs a soft reset to the merge base and consolidates feature branch history into one conventional commit. It automatically pulls PR metadata to generate the commit message and force-pushes the result.

How do I generate conventional commit messages from GitHub pull request metadata?▼

Generating conventional commit messages from PR metadata is handled by integrating with the GitHub CLI. The skill fetches the PR title and description to automatically create a professional, consolidated commit message for the squashed branch.

Do I need the GitHub CLI to automate branch squashing and force-pushing?▼

Yes, the GitHub CLI is required to automate branch squashing. The skill depends on `gh` to validate pull request approval status and fetch PR metadata, alongside standard `git` access to manage branch history and execute the safe force-push.

Is there a safe way to force-push a squashed feature branch to a remote repository?▼

Safe force-pushing a squashed branch is achieved using lease flags. The skill includes preflight safety guardrails that check for uncommitted changes and PR approval status before executing the force-push to prevent overwriting untracked remote updates.

What's the best way to clean up feature branch history before a final merge?▼

Cleaning up feature branch history is best done by automating the squash process. This skill resets your branch to the merge base, creates a single tidy conventional commit from PR data, and ensures a clean project history before the final merge.