intuitive-squash

intuitive-squash is a skill for Claude Code, Codex from MiaoDX/intuitive-flow. It costs 73 tokens per session (1,989 once invoked), scanned A, original, MIT.

A procedure for turning a noisy series of local Git commits into a smaller, reviewable history while keeping the final files unchanged.

In plain words
What is it for?
Use it to inspect the correct base branch, compare moderate and aggressive squash plans, keep security or hotfix commits, and rewrite history only after approval.
Why use it?
It makes agent-generated work easier to review and helps preserve important fixes when preparing a branch for a pull request.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/miaodx/intuitive-flow/intuitive-squash
Any agent
npx skills add MiaoDX/intuitive-flow --skill intuitive-squash
Clone the repo
git clone --depth 1 https://github.com/MiaoDX/intuitive-flow

Made for: Claude Code, Codex.

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 intuitive-squash

README.md
[![agentmods](https://agentmods.dev/badge/skills/miaodx/intuitive-flow/intuitive-squash.svg)](https://agentmods.dev/skills/miaodx/intuitive-flow/intuitive-squash)
Your own site
<a href="https://agentmods.dev/skills/miaodx/intuitive-flow/intuitive-squash"><img src="https://agentmods.dev/badge/skills/miaodx/intuitive-flow/intuitive-squash.svg" alt="Measured on agentmods" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,989 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00073 $0.01989
Opus 5 $0.00036 $0.00994
Sonnet 5 $0.00015 $0.00398
Haiku 4.5 $0.00007 $0.00199

Measured 4d ago against content hash ac7ffed1d9bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

intuitive-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 4d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/preflight.test.ts, scripts/preflight.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/intuitive-squash/SKILL.md · 190 lines

How it starts

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

Intuitive Squash

Turn noisy local agent history into a small set of meaningful commits without changing the final tree. After an optional fetch, keep planning free of worktree and local-branch mutations. Never rewrite history until the user approves the exact plan and its risk gates.

Resolve The Base

If the user gives a base ref, verify it and use its merge base with HEAD. Otherwise inspect:

git fetch --prune --all
git branch --show-current
git rev-parse --abbrev-ref --symbolic-full-name @{upstream}
git remote show origin
git for-each-ref --sort=-committerdate \
  --format='%(refname:short) %(committerdate:short) %(subject)' \
  refs/remotes/origin
git branch -vv
gh pr view --json baseRefName,headRefName,url

Continue with local evidence if fetch or GitHub CLI access is unavailable, and say what is missing. Rank candidates by:

  1. the open PR base;
  2. a configured upstream only when it is an integration branch rather than the current branch's push target;
  3. the remote default branch, unless stale;
  4. active long-lived branches such as dev, develop, trunk, or a release branch that plausibly contains the branch point;
  5. main or master only when no stronger evidence exists.

For plausible candidates compare merge base, branch commit count, and latest commit date. Ask Use <recommended-base> as the squash base, or should I use another ref? when the evidence is ambiguous, the recommendation is not the remote default, the default looks stale, the upstream is the branch's own remote counterpart, or the commit count changes materially. Do not analyze or plan groups until the base is explicit.

Run Read-Only Preflight

After resolving the base, run:

bun <intuitive-squash-skill-root>/scripts/preflight.ts <base-ref> \
  --remote-default <remote/default-branch>

The report inventories the exact merge base and HEAD, dirty and untracked state, upstream divergence, remote publication, merges, signatures, tags, authors, changed paths, and deterministic preservation reasons. Treat the reported HEAD as the planned head; rerun preflight if it changes before execution. Omit --remote-default only when discovery could not identify one; the script otherwise falls back to a local origin/HEAD symbolic ref. Exit 3 means the report contains a hard stop, not that its read-only probes failed.

Read the full file on GitHub · 190 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 190 lines · 73 tokens per session scan A ac7ffed1d9bf

Subscribe to this mod's changes

intuitive-squash is a skill published in the GitHub repository MiaoDX/intuitive-flow (48 stars, last pushed yesterday), licensed MIT. It adds 73 tokens to every session and 1,989 once invoked, about $0.0004 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-08-30.