token-saver CLAUDE.md

token-saver CLAUDE.md is an instructions file for coding agents from ppgranger/token-saver. It costs 145 tokens per session, scanned B, original, Apache-2.0.

A project instruction file for a plugin that shortens verbose command-line output before it reaches the coding agent.

In plain words
What is it for?
Use it when working on output processing for commands such as Git, Docker, npm, Terraform, or kubectl, or when debugging the plugin.
Why use it?
It helps reduce unnecessary text while preserving important command results, and defines cases where shortening must be skipped to avoid broken or unsafe behavior.

Instructions file

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 instructions/ppgranger/token-saver/claude-md
Clone the repo
git clone --depth 1 https://github.com/ppgranger/token-saver

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 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ppgranger/token-saver/claude-md.svg)](https://agentmods.dev/instructions/ppgranger/token-saver/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ppgranger/token-saver/claude-md"><img src="https://agentmods.dev/badge/instructions/ppgranger/token-saver/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 145 This file is loaded in full into every session.
When invoked 145 The same file — it is already loaded in full.
Security scan B 1 finding. 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.00145 $0.00145
Opus 5 $0.00072 $0.00072
Sonnet 5 $0.00029 $0.00029
Haiku 4.5 $0.00015 $0.00015

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

Security

Grade B, and why

token-saver CLAUDE.md scanned grade B with 1 finding 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Never wrap sudo commands
CLAUDE.md · 16 lines

What it actually says

Token-Saver Plugin

Token-saver automatically compresses verbose CLI output to save tokens.

How it works

  • A PreToolUse hook intercepts Bash commands matching known patterns (git, docker, npm, terraform, kubectl, etc.)
  • The command output is piped through specialized compression processors
  • Compressed output is returned to Claude, saving tokens while preserving critical information

Important rules

  • Never wrap token-saver CLI commands themselves (avoid infinite loops)
  • Never wrap interactive commands (vim, nano, ssh, etc.)
  • Never wrap commands with redirections (>) or complex pipes
  • Never wrap sudo commands
  • Debug mode: set TOKEN_SAVER_DEBUG=true environment variable
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 · 16 lines · 145 tokens per session scan B e248e1acddd2

Subscribe to this mod's changes

token-saver CLAUDE.md is an instructions file published in the GitHub repository ppgranger/token-saver (142 stars, last pushed 16d ago), licensed Apache-2.0. It adds 145 tokens to every session, about $0.0007 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories

packmind packmind-cli-command-structure.instructions.md

Instructions for PackmindHub/packmind: Enforce clear separation of concerns between command definition (parameters and metadata) and handler logic (validation, execution, and output) in apps/cli commands to improve testability, maintainabi... .

PackmindHub/packmind · 353 tokens

packmind packmind-frontend-error-management.instructions.md

Instructions for PackmindHub/packmind: A global error boundary is already configured at the root level (in root.tsx) that automatically catches all page crashes, 404s, and loader failures. This standard defines when and how to use explicit... .

PackmindHub/packmind · 302 tokens

packmind packmind-frontend-navigation-with-react-router.instructions.md

Instructions for PackmindHub/packmind: This codebase uses React Router v7 with organization and space scoping in URLs (e.g., /org/{orgSlug}/space/{spaceSlug}/recipes). To maintain consistency, improve maintainability, and simplify navigati... .

PackmindHub/packmind · 229 tokens

packmind packmind-tanstack-query-key-management.instructions.md

Instructions for PackmindHub/packmind: TanStack Query uses prefix matching to invalidate cached queries, matching keys from left to right like a file path. Properly structured query keys enable efficient cache invalidation at any scope lev... .

PackmindHub/packmind · 227 tokens

packmind packmind-rest-api-endpoint-design.instructions.md

Instructions for PackmindHub/packmind: Conventions for designing REST API endpoints that are predictable, self-documenting, and aligned with distinct business actions. Favors dedicated action endpoints over generic status updates, and rout... .

PackmindHub/packmind · 157 tokens

packmind packmind-e2e-page-object.instructions.md

Instructions for PackmindHub/packmind: Write proper PageObjects for our E2E tests .

PackmindHub/packmind · 112 tokens