squash-pr

Squash and merge a GitHub pull request into main after validating review feedback.

Updated Apr 9, 2026
One-click install
npx skills add https://github.com/cookeyholder/django-devcontainer-template --skill squash-pr-cookeyholder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: squash-pr
Source: https://github.com/cookeyholder/django-devcontainer-template/tree/main/.agent/skills/squash-pr
Command: npx skills add https://github.com/cookeyholder/django-devcontainer-template --skill squash-pr-cookeyholder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Finalize a GitHub pull request by squashing it into the main branch after confirming there is no new review feedback, ensuring a clean project history.

Core Features & Use Cases

  • Validate PR status (open, not draft) and ensure the base branch is main.
  • Detect and block merges when new actionable review feedback or failing/pending CI checks exist.
  • Squash merge to main, delete the feature branch, and synchronize the local main with the remote.

Quick Start

Provide a PR number or URL and run this skill to squash the PR into main after ensuring there is no new review feedback.

Frequently Asked Questions about squash-pr

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

FAQPage Schema
How do I squash and merge a GitHub pull request only after CI checks pass?

To squash and merge a pull request safely, the skill fetches PR data via the gh CLI and validates that the PR is open, not a draft, and has no pending or failing CI checks. It blocks the squash merge until all review feedback is resolved.

When should I use a squash merge for my pull request?

Use a squash merge when you want a clean project history on your main branch. This approach condenses all commits from a feature branch into a single commit before merging, ensuring auditable and linear main branch progression.

Can I automate deleting a feature branch after squashing a PR into main?

Yes, automating feature branch deletion after a squash merge is supported. After successfully squashing the pull request into main, the skill deletes the remote source branch and synchronizes your local main repository with the remote.

Will squash merging proceed if there is new actionable code review feedback?

No, squash merging will not proceed if there is new actionable review feedback. The skill detects unresolved code review comments and actively blocks the merge to ensure no unaddressed feedback is integrated into the main branch.

How do I sync my local main branch after merging a pull request remotely?

To sync your local main branch after a remote merge, the skill uses git commands to pull the latest changes. This synchronization happens automatically immediately after the squash merge and remote feature branch deletion are completed.

Does this squash merge workflow require the gh CLI to validate pull request status?

Yes, the gh CLI is required to fetch pull request data and validate status. It checks if the base branch is main and verifies the PR state before executing the git squash merge and branch synchronization operations.