Token-Saver plugin
Token-Saver compresses terminal output for Claude Code: diff, pytest, npm, terraform, kubectl, docker. Compression runs locally.
- 165 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The plugin sits between commands and the agent and rewrites output.
- A hidden output line may hide the cause of an error.
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/token-saverDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The plugin sits between commands and the agent and rewrites output.
- A hidden output line may hide the cause of an error.
This is third-party code. Review the repository files before installing.
What it does
The Token-Saver plugin intercepts the output of commands an AI assistant reads and removes progress logs and boilerplate while keeping diagnostics. Thirty-six processors know the formats of git, pytest, jest, cargo, go, docker, kubernetes, terraform, pulumi, helm, ansible, aws and gcloud. Compression uses rules and text parsing, with no network and no second model. In Claude Code and Antigravity CLI it turns on automatically after install, while Codex needs an explicit wrapper per `docs/codex.md`. Version 3 adds an experimental Delta mode: on repeated pytest and Ruff runs it shows which failures are new, changed or unchanged and folds repeated ones into a short list. The `token-saver stats` command prints accumulated savings.
Who it is for. Developers whose tests, builds and logs eat the agent context and token budget.
Good fit when
- Long `npm install` or `terraform plan` output clogs the Claude Code window.
- Tests run in a loop and you want to see only new failures.
- Diffs and docker and kubectl logs should pass through a filter before the model.
- You want to measure savings with `token-saver benchmark` on your own command.
Not a fit when
- Output is already short or the command format is unsupported: it stays unchanged.
- You need the full raw log for an incident review.
- The agent runs in an environment without hooks, such as a plain chat.
Example request
Run the project tests and show which failures are new compared with the previous run.Limitations
The effect depends on the command: the stated 60–99% savings come from the authors test scenarios and short output gains nothing. Delta mode is experimental, opt-in and supports pytest and Ruff in Claude Code. Compression may hide a line a specific debug needs, so rerun the command without processing. Python 3.10 or newer is required. Compression data is stored locally as statistics and `token-saver stats` prints it.
How to disable. Run `/plugin uninstall token-saver`; for a clone just delete the repository folder.
FAQ
Does data go to external services?
No. Compression uses rules and text parsing, with no model call and no output upload.
How do I check savings before installing?
Clone the repository and run `python3 bin/token-saver benchmark "git log --oneline -50"`. The `--show-removed` flag shows removed lines.
Which agents are supported?
Claude Code and Antigravity CLI work automatically, Codex through an explicit wrapper and project instructions.
What is Delta?
An optional version 3 mode: on repeated pytest and Ruff runs it keeps details of new failures and folds repeated ones into an inventory.
Can I add my own processor?
Yes, rules live in the repository processors and quality contracts check that important diagnostics are preserved.
Discussion
No questions or reviews yet.
Related
PluginsClaude Token Optimizer: fewer tokens at startup
Claude Token Optimizer
The cto utility counts the tokens Claude Code loads at session start and shrinks CLAUDE.md into a short cheat sheet.
Token-Goat trims repeated file reads, build noise and heavy screenshots before they reach an agent's context window.
A Go CLI proxy that shrinks git, test and build output with YAML filters before it reaches the agent. The author estimates 60-90% token savings
Local code search for agents: finds the files and fragments that matter and keeps context within a set token budget
A Claude Code plugin that trims noisy Bash output with the Jev model before the result reaches the main model, without a summary
Eleven skills for Claude Code and Codex: test audit, git worktree cleanup, plan pages, screen recording transcripts and 1Password sign-in
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Token-Saver (this card) | no | 165 | ||
| Claude Token Optimizer: fewer tokens at startup | no | 653 | that one trims startup context and CLAUDE.md; Token-Saver compresses command output on the fly | |
| Repomix | no | not required | 29,259 | packs a repository into one file; Token-Saver works on command output during a session |
README in short
A Python repository with thirty-six output processors, the version 3 Delta mode, before and after examples and a comparison with similar tools. It covers marketplace install, Codex use, diagnostic preservation guarantees and fixture tests.