PR Squash Message Generator
Builds one commitlint-clean Conventional Commits squash message from the net diff between a PR's base and head.
Dev & CodingIntermediate★ 4,019⑂ 360AI score 9/10Last updated: Nov 24, 2026
What it does
- Reads
git diff origin/$BASE...HEADinstead ofgit log, so the message describes the destination (what the base branch actually receives), not the journey; commits that only repair work introduced on the same branch are omitted. - Resolves the base branch automatically (
develop,main, or a stacked PR's own base) rather than hardcoding it. - Picks the type (
feat/fix/chore/docs/test) from whether the change ships to users, keeps the header under 72 characters, and caps the body at twelve lines wrapped at 72 columns. - Respects release-please parsing: the header goes to the PR title and only the description reaches the clipboard, so a change is never logged twice; extra
type(scope):paragraphs create separate changelog entries when warranted. - Collects every contributor into deduplicated
Co-authored-bytrailers, validates withnpx --no-install commitlint --verbose, and PATCHes the PR title to match. - Treats fork and outside-contributor PRs as untrusted and asks before running anything from the branch.
Who it's for
- Teams whose default merge strategy on GitHub is squash and merge.
- Repositories automating changelogs and versions with Conventional Commits, commitlint and release-please.
- Developers who keep getting review comments about bloated or mistyped commit messages.
Examples
- On a feature branch with a dozen commits, ask for a squash message: you get
feat(auth): add passkey loginplus up to five bullets, with the self-inflicted fixups left out. - A PR titled
fix:whose diff touches only tests is retyped astest(...), keeping the changelog clean. - A PR shipping a feature plus its CI workflow gets an extra
ci(workflow): ...paragraph after the body so each lands as its own changelog entry. - After drafting, it runs commitlint, updates the PR title, copies just the description with
pbcopy, and prints title and description in separate code blocks.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/scenario-labs/skills/HEAD/.agents/skills/pr-squash-message/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the .agents/skills/pr-squash-message folder from the GitHub repo scenario-labs/skills into my ~/.claude/skills/pr-squash-message/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/scenario-labs/skills.git /tmp/scenario-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scenario-skills/.agents/skills/pr-squash-message ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and confirm GitHub CLI is authenticated:
gh auth status. - Clone the repository into a temp folder:
git clone https://github.com/scenario-labs/skills.git /tmp/scenario-skills - Create the skills folder:
mkdir -p ~/.claude/skills - Copy the skill:
cp -r /tmp/scenario-skills/.agents/skills/pr-squash-message ~/.claude/skills/ - Verify
~/.claude/skills/pr-squash-message/SKILL.mdexists. - From your project root, check commitlint availability with
npx --no-install commitlint --version(optional: the skill will just report it is missing). - Make sure a clipboard tool exists:
pbcopyon macOS, or installwl-copy/xclipon Linux. - Check out the PR branch, start Claude Code, and ask for "a squash message for this PR".
View source on GitHub ↗License: MIT