Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cookeyholder avatar

Squash Pr

  • 1 installs
  • Updated April 13, 2026
  • cookeyholder/django-devcontainer-template

Squash and clean up commits in Django dev container PRs before merging.

About

Git workflow for squashing commits in Django projects using dev container templates. Keeps PR history clean and maintainable before merge.

  • Interactive git commit squashing in containerized environment
  • Clean PR history management

Squash Pr by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #524 of 733 Git & Pull Requests skills by installs in the Skillselion catalog
  • Data as of Jul 8, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cookeyholder/django-devcontainer-template --skill squash-pr

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedApril 13, 2026
Repositorycookeyholder/django-devcontainer-template

What it does

Squash and clean up commits in Django dev container PRs before merging.

Files

SKILL.mdMarkdownGitHub ↗

Use this skill when the user wants to finalize a PR by squashing into main after confirming there are no new review comments, then sync local main.

Input

  • Optional PR number/URL (e.g., 17 or full PR URL)
  • If omitted, infer from current branch with gh pr view

Workflow

1. Resolve target PR

gh pr view <pr> --json number,url,state,isDraft,headRefName,baseRefName,mergeStateStatus,reviews,comments,latestReviews

Rules:

  • PR must be OPEN
  • PR must not be draft
  • base branch must be main

2. Check for new review feedback

  • Inspect newest reviews/comments and identify whether there are actionable items not yet addressed.
  • If any new actionable feedback exists, stop and report them.
  • If there is no new actionable feedback, continue.

3. Check merge readiness / CI

gh pr checks <pr>
gh pr view <pr> --json mergeStateStatus,reviewDecision

Rules:

  • Required checks should be passing.
  • mergeStateStatus should allow merge (CLEAN/mergeable equivalent).
  • If checks are pending/failing, stop and report.

4. Squash merge to main

gh pr merge <pr> --squash --delete-branch
  • If merge fails, report the exact blocker.

5. Update local main

git fetch origin --prune
git checkout main
git pull --ff-only origin main

6. Report completion

Return:

  • PR number and URL
  • merge commit SHA
  • local main head commit
  • whether branch deletion succeeded

Guardrails

  • Never merge if new actionable review feedback exists.
  • Never merge if required checks are failing/pending.
  • Do not use force push or destructive git commands.
  • If local workspace has conflicting uncommitted changes preventing checkout to main, stop and report.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.