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.
npx agentmods add commands/metaschema-framework/claude-plugins/squash-commitsgit clone --depth 1 https://github.com/metaschema-framework/claude-pluginsWrote 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.
[](https://agentmods.dev/commands/metaschema-framework/claude-plugins/squash-commits)<a href="https://agentmods.dev/commands/metaschema-framework/claude-plugins/squash-commits"><img src="https://agentmods.dev/badge/commands/metaschema-framework/claude-plugins/squash-commits.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00899 |
| Opus 5 | $0.00000 | $0.00449 |
| Sonnet 5 | $0.00000 | $0.00180 |
| Haiku 4.5 | $0.00000 | $0.00090 |
Grade A, and why
squash-commits 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.
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.
How it starts
The opening of the file, as written. The whole thing — 145 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Squash Commits Command
Squash all commits in the current branch into a single commit with a comprehensive message.
Instructions
Execute the following steps to squash commits safely:
Step 1: Validate State
First, verify the repository state is clean and identify the base branch:
# Check for uncommitted changes
git status --porcelain
# Identify the base branch (develop or main)
git branch -r | grep -E 'origin/(develop|main)$' | head -1
If there are uncommitted changes, STOP and inform the user they must commit or stash changes first.
Step 2: Identify Commits to Squash
Determine the merge base and list all commits:
# Find the merge base with the target branch (adjust branch name as needed)
git merge-base HEAD origin/develop
# Count commits since merge base
git rev-list --count $(git merge-base HEAD origin/develop)..HEAD
# List all commits with full messages
git log $(git merge-base HEAD origin/develop)..HEAD --format="=== COMMIT %h ===%n%B"
If there is only 1 commit, inform the user there is nothing to squash.
Step 3: Analyze Commit Messages
Read and analyze all commit messages from Step 2. Create a comprehensive combined message that:
- Summarizes the overall change in a clear subject line (50 chars max if possible)
- Preserves important details from each original commit
- Groups related changes logically
- Maintains any issue/PR references (e.g., #123, fixes #456)
- Removes redundant information (e.g., repeated "fix typo" commits can be consolidated)
Format the message as:
<type>: <concise summary of all changes>
<Detailed description organized by logical groupings>
- <Key change 1>
- <Key change 2>
- ...
<Any preserved references or metadata>
Step 4: Perform the Squash
Use soft reset to squash (preserves all changes in staging):
# Store the merge base commit
MERGE_BASE=$(git merge-base HEAD origin/develop)
# Soft reset to merge base (keeps changes staged)
git reset --soft $MERGE_BASE
# Verify staged changes match expected
git diff --cached --stat
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.
- 4d ago First seen · 145 lines · 0 tokens per session scan A 114f5bdadd98
squash-commits is a command published in the GitHub repository metaschema-framework/claude-plugins (10 stars, last pushed 6mo ago), licensed CC0-1.0. It costs nothing until one of its globs matches a file; then it loads 899 tokens. 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-31.
Other commands, from other repositories
checkpoint
Create a checkpoint by staging the changes you have made using git. usage: git [-v | --version] [-h | --help] [-C ] [-c = ] [--exec-path[= ]] [--html-path] [--man-path] [--info-path] [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] [--git-dir= ] [--work-tree= ] [--namespace= ] [--super-prefix= ]…
commit
智能创建 git 提交,分析代码变更并生成符合项目规范的提交信息.
git
Unified git operations - commits, pull requests, and issue management.
ship
Commit staged changes, push, and create PR.
changelog
Summarize staged git changes into a concise changelog/commit message.
commit
Create an atomic git commit with conventional message.