squash

squash is a skill for Claude Code from bengous/claude-code-plugins. It costs 48 tokens per session (1,005 once invoked), scanned A, original, MIT.

A Git skill for combining selected commits into fewer commits without opening an editor. It can select commits by count, hash, or matching message text, and can show a plan before changing history.

In plain words
What is it for?
Use it to fold fix, work-in-progress, or related commits together before sharing a branch. It supports selecting the last few commits, named commits, or commits whose messages match a pattern.
Why use it?
It makes branch cleanup more predictable and provides a recovery path if a merge conflict stops the operation. A dry run lets you check the proposed selection first.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the git plugin — 3 skills shipped together

Good fit Use it to fold fix, work-in-progress, or related commits together before sharing a branch. It supports selecting the last few commits, named commits, or commits whose messages match a pattern.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add bengous/claude-code-plugins
Claude Code
/plugin install git

Made for: Claude Code.

Or install git, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for squash

README.md
[![agentmods](https://agentmods.dev/badge/skills/bengous/claude-code-plugins/squash/github.svg)](https://agentmods.dev/skills/bengous/claude-code-plugins/squash)
Your own site
<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/squash"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/squash/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for squash

Your own site · 80×15
<a href="https://agentmods.dev/skills/bengous/claude-code-plugins/squash"><img src="https://agentmods.dev/badge/skills/bengous/claude-code-plugins/squash.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,005 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01005
Opus 5 $0.00024 $0.00502
Sonnet 5 $0.00010 $0.00201
Haiku 4.5 $0.00005 $0.00101

Measured today against content hash 10478be1d41f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

squash scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

git/skills/squash/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Squash

Fold a run of commits into one. The rebase backend of this plugin does the rewrite: it builds the todo, sets the editors inside its own process, creates a timestamped backup branch, re-checks the plan against the branch, and leaves a conflict resumable. This skill only chooses which commits fold.

Arguments

$ARGUMENTS

Mode Selection
--range N the last N commits, folded into the oldest
--hashes h1,h2,... the listed commits, folded into the oldest of them
--pattern <regex> every commit whose subject matches, case-insensitive, folded into the oldest match
--dry-run validate and print the plan, rewrite nothing

Protocol

  1. Range. --range N: the range is N. Otherwise the range is the branch: origin/dev when it exists, else the remote default branch (git rev-parse --abbrev-ref origin/HEAD). No remote at all, or on that branch itself: ask how far back to look, and use N.

    run `"${CLAUDE_PLUGIN_ROOT}/scripts/rebase.ts" plan {range}`
    

    On ok: false, report error and detail and stop: dirty-worktree lists the files to commit or stash first, rebase-already-in-progress points at /git:rebase continue|skip|abort.

  2. Targets. From plan.commits, oldest first: the commits whose hash starts with a listed hash, or whose subject matches the pattern. Fewer than two targets: say so and stop. A listed hash outside the range: name it and stop.

    The targets must be consecutive. The backend folds a squash into the commit right above it, never across a kept commit: with fixA, other, fixB the second fix would fold into other. Non-consecutive targets: list the commits sitting between them and stop; /git:rebase on the range is the tool for that case.

  3. Message. Read each target with git log -1 --format=%B <hash> and compose one message for the combined commit: a subject in the convention of git log --oneline -10, then the bodies that still hold. Print it.

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 90 lines · 48 tokens per session scan A 10478be1d41f

Subscribe to this mod's changes

squash is a skill published in the GitHub repository bengous/claude-code-plugins (4 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.