claude-code-autoconfig: Command for Claude Code

.claude/commands/token-saver-rationale.md

token-saver-rationale is a command for Claude Code from design-and-deliver/claude-code-autoconfig. It costs 10 tokens per session (458 once invoked), scanned A, original, MIT.

A command that displays the full explanation behind a TokenSaver cost-control result. It retrieves the saved result for a specific session when a session token is provided, or the newest result for the project otherwise.

In plain words
What is it for?
Use it after a TokenSaver recommendation to inspect its arithmetic and supporting rationale.
Why use it?
The normal result card omits its calculation, so this shows the details behind the recommendation without searching through older state files.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

This is design-and-deliver/claude-code-autoconfig's own configuration. It tells Claude Code how to work on claude-code-autoconfig itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-autoconfig configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Bash(node .claude/hooks/token-guard.js --details:*).

Reuse

Borrowing it

Nothing to install: this file belongs to design-and-deliver/claude-code-autoconfig. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/design-and-deliver/claude-code-autoconfig/main/.claude/commands/token-saver-rationale.md
Clone the repo
git clone --depth 1 https://github.com/design-and-deliver/claude-code-autoconfig

Made for: Claude Code.

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 token-saver-rationale

README.md
[![agentmods](https://agentmods.dev/badge/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale/github.svg)](https://agentmods.dev/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale)
Your own site
<a href="https://agentmods.dev/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale"><img src="https://agentmods.dev/badge/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale/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 token-saver-rationale

Your own site · 80×15
<a href="https://agentmods.dev/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale"><img src="https://agentmods.dev/badge/commands/design-and-deliver/claude-code-autoconfig/token-saver-rationale.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 458 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.00010 $0.00458
Opus 5 $0.00005 $0.00229
Sonnet 5 $0.00002 $0.00092
Haiku 4.5 $0.00001 $0.00046

Measured 3d ago against content hash 66116a7e8edb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

token-saver-rationale 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 3d 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.

.claude/commands/token-saver-rationale.md · 38 lines

What it actually says

TokenSaver Rationale

The consolidated TokenSaver card deliberately leaves out its arithmetic. This command prints the full card that was persisted when the verdict fired. Every card face ends with a session token (/token-saver-rationale <token>); passing it pins the lookup to the session that fired, so a parallel session's newer card can't shadow the one the user is asking about. Without a token it prints the newest card across ALL of this project's sessions, because the natural moment to ask is right after the /clear + /continue migration the card recommended, when the session id has already changed.

Steps

  1. Run (passing the token only if one was given):

    node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/token-guard.js" --details "${CLAUDE_PROJECT_DIR:-.}" $ARGUMENTS
    
  2. Relay the output verbatim in a fenced code block — do not paraphrase, reformat, or summarize the card; its wording is a pinned copy contract.

  3. If it printed no cost-control verdicts recorded ..., say exactly that and stop — do not go hunting through state files for older evidence.

Add nothing beyond the relayed output except (optionally) one sentence of plain-language interpretation if the user asks a follow-up question.

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. 3d ago First seen · 38 lines · 10 tokens per session scan A 66116a7e8edb

Subscribe to this mod's changes

token-saver-rationale is a command published in the GitHub repository design-and-deliver/claude-code-autoconfig (2 stars, last pushed 4d ago), licensed MIT. It adds 10 tokens to every session and 458 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-09-05.