AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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...HEAD instead of git 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-by trailers, validates with npx --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

  1. On a feature branch with a dozen commits, ask for a squash message: you get feat(auth): add passkey login plus up to five bullets, with the self-inflicted fixups left out.
  2. A PR titled fix: whose diff touches only tests is retyped as test(...), keeping the changelog clean.
  3. 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.
  4. 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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download 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.

  1. Open a terminal and confirm GitHub CLI is authenticated: gh auth status.
  2. Clone the repository into a temp folder: git clone https://github.com/scenario-labs/skills.git /tmp/scenario-skills
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy the skill: cp -r /tmp/scenario-skills/.agents/skills/pr-squash-message ~/.claude/skills/
  5. Verify ~/.claude/skills/pr-squash-message/SKILL.md exists.
  6. From your project root, check commitlint availability with npx --no-install commitlint --version (optional: the skill will just report it is missing).
  7. Make sure a clipboard tool exists: pbcopy on macOS, or install wl-copy / xclip on Linux.
  8. Check out the PR branch, start Claude Code, and ask for "a squash message for this PR".