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/softaworks/agent-toolkit/explain-changes-mental-modelgit clone --depth 1 https://github.com/softaworks/agent-toolkitWhat 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.00013 | $0.01647 |
| Opus 5 | $0.00006 | $0.00823 |
| Sonnet 5 | $0.00003 | $0.00329 |
| Haiku 4.5 | $0.00001 | $0.00165 |
Grade A, and why
explain-changes-mental-model 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 yesterday.
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 — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Mental Model Builder
Analyze code changes and present them as a coherent mental model - breaking large diffs into logical chunks ordered by dependency so they can be understood incrementally.
What This Command Does
- Gather changes from the specified source (commit, branch, range, or custom input)
- Analyze and categorize changes into logical groups by theme/purpose
- Identify dependencies between change groups
- Present ordered explanation so changes can be reviewed in a sensible sequence
Usage
# Current working changes (staged + unstaged)
/mental-model
# Specific commit
/mental-model abc1234
/mental-model HEAD~3
# Branch comparison (vs main)
/mental-model feature/my-branch
# Explicit range
/mental-model main..HEAD
/mental-model origin/main...HEAD
# Custom - user will provide diff/changes in next message
/mental-model custom
Implementation Steps
When this command is invoked:
1. Determine Change Source
Parse the argument to determine what changes to analyze:
No argument provided:
- Run
git diff HEADto get all uncommitted changes (staged + unstaged) - If no changes found, report "No uncommitted changes to analyze"
Argument looks like a commit hash (7-40 hex chars):
- Run
git show <hash> --statfirst to verify it exists - Run
git show <hash>to get the full diff
Argument looks like a branch name (contains letters, no ..):
- Detect main branch: check if
mainormasterexists - Run
git diff <main-branch>...<argument>to compare
Argument contains .. (explicit range):
- Use as-is:
git diff <argument>
Argument is "custom":
- Tell the user: "Please paste or describe the changes you want me to analyze in your next message."
- Wait for user input before proceeding
2. Extract the Diff
Run the appropriate git command and capture the output:
# Example for commit
git show <hash> --no-color
# Example for range
git diff <range> --no-color
If the diff is very large (>5000 lines), use --stat first to get an overview, then selectively read the most important files.
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.
- yesterday First seen · 215 lines · 13 tokens per session scan A edb34aa61a66
explain-changes-mental-model is a command published in the GitHub repository softaworks/agent-toolkit (2,401 stars, last pushed 5mo ago), licensed MIT. It adds 13 tokens to every session and 1,647 once invoked, about $0.0001 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.
Other commands, from other repositories
add-agent
引导新增一个 Agent 适配器。用法 /add-agent.
speckit.archive
Archive a feature specification into main project memory after merge, resolving gaps and conflicts.
speckit.opsmill.retrospect
Run a session retrospective that surfaces context-management gaps and routes them to approved follow-up actions.
create-issue
Transform feature descriptions, bug reports, or improvement ideas into well-structured GitHub issues.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.
mach12:issue-review
Read a GitHub issue and all comments, review the implementation plan, and present findings.