Context Mode Output Sandbox
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
Checks and tunes token-saver output compression: reads stats, explains why a command was or was not compressed, and edits config files or environment variables.
$ npx skills add ppgranger/token-saver --skill token-saver-config -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install ppgranger/token-saver token-saver-config --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/token-saver-config .claude/skills/token-saver-config && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .claude/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-configType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add ppgranger/token-saver --skill token-saver-config -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install ppgranger/token-saver token-saver-config --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/token-saver-config .agents/skills/token-saver-config && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .agents/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ppgranger/token-saver --skill token-saver-config -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install ppgranger/token-saver token-saver-config --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/token-saver-config .cursor/skills/token-saver-config && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .cursor/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/ppgranger/token-saver.git --path skills/token-saver-config--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add ppgranger/token-saver --skill token-saver-config -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install ppgranger/token-saver token-saver-config --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/token-saver-config .gemini/skills/token-saver-config && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .gemini/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install ppgranger/token-saver token-saver-configInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add ppgranger/token-saver --skill token-saver-config -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/token-saver-config .github/skills/token-saver-config && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .github/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add ppgranger/token-saver --skill token-saver-config -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install ppgranger/token-saver token-saver-config --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/ppgranger/token-saver.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/token-saver-config .opencode/skills/token-saver-config && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "token-saver-config" agent skill from https://github.com/ppgranger/token-saver/tree/main/skills/token-saver-config into .opencode/skills/token-saver-config/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "token-saver-config", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
token-saver-configChecks and tunes token-saver output compression: reads stats, explains why a command was or was not compressed, and edits config files or environment variables.
This skill helps diagnose token-saver, a tool that compresses command output for coding assistants. `token-saver stats` shows lifetime and per-command savings, `token-saver explain` reports the routing decision for a given command, and `token-saver benchmark` with `--dry-run` measures compression without replacing real output. There is no `config` subcommand, so settings are changed by editing files or environment variables.
Settings are layered, with later sources winning: built-in defaults, `~/.token-saver/config.json`, a project `.token-saver.json` found by walking up from the working directory, then `TOKEN_SAVER_*` variables. Commonly adjusted keys include `enabled`, `min_input_length`, `min_compression_ratio`, `wrap_timeout` (300 seconds by default), `chars_per_token`, `disabled_processors` and `max_output_bytes`. Some options, such as `disabled_processors`, are accepted only from the global config or the environment, never from a project file. A debug mode section follows.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 19d47b2. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Token-Saver Configuration loads about 1k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 410 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from ppgranger/token-saver at commit 19d47b2, republished under its Apache-2.0 licence (© ppgranger). 410 words, ~1,023 tokens.
.claude/skills/token-saver-config/SKILL.md (or your agent's skills folder).Run token-saver stats to see lifetime and per-command compression statistics. Add --json for machine-readable output.
There is no token-saver config subcommand — use explain and benchmark instead:
token-saver explain "git status" # routing decision: compressible? which processor? why excluded?
token-saver benchmark "npm install" --dry-run # measure compression without replacing real outputSettings are read in this order (later wins): built-in defaults → ~/.token-saver/config.json → a project-level .token-saver.json found by walking up from cwd → TOKEN_SAVER_* environment variables. There is no CLI subcommand to write these files — edit ~/.token-saver/config.json directly, or set an environment variable.
The most commonly adjusted settings and their actual defaults:
enabled (bool, default true): master on/off switch.min_input_length (int, default 1): minimum output length in characters before compression is attempted.min_compression_ratio (float, default 0.0): a compression result below this fraction is discarded and the original output is returned instead.wrap_timeout (int, default 300): max seconds a wrapped command may run before being killed.chars_per_token (int, default 4): used only to estimate token counts for display (stats, benchmark) — not part of compression itself.disabled_processors (list, default []): processor names (e.g. "docker", "kubectl") to turn off entirely.max_output_bytes (int, default 10_000_000): hard cap on output length before compression even runs.Example ~/.token-saver/config.json:
{
"min_compression_ratio": 0.1,
"disabled_processors": ["docker"]
}Equivalent environment variables: TOKEN_SAVER_MIN_COMPRESSION_RATIO=0.1, TOKEN_SAVER_DISABLED_PROCESSORS=docker.
Security note: user_processors_dir, disabled_processors, and redaction_allowlist can only be set via the global ~/.token-saver/config.json or an environment variable — never via a project-level .token-saver.json (that file is auto-discovered from any directory you cd into, so it is not trusted with these).
See src/config.py's _DEFAULTS dict for the full, authoritative list of settings — this file lists only the ones users actually tune.
Set TOKEN_SAVER_DEBUG=true to enable debug logging to ~/.token-saver/hook.log (or %APPDATA%\token-saver\hook.log on Windows).
36 specialized processors, auto-discovered from src/processors/: git, gh (GitHub CLI), docker, kubectl, helm, terraform, pulumi, cdktf, ansible, nix, mise, npm/pip/cargo/go/maven/gradle/bun, package listing, python install, test runners (pytest, jest, go test, cargo test, …), lint output (eslint, ruff, pylint, clippy, …), build output, cloud CLIs (aws, gcloud, az), database queries, file listings, file content, environment/system info, network tools (curl, wget), search (grep, find, ripgrep), structured logs, syslog, ssh, jq/yq, act, just — plus a generic fallback for everything else.
If compression isn't working:
python3 (3.10+) is available in your PATH.token-saver explain "<the command>" to see the routing decision and why it was or wasn't wrapped.TOKEN_SAVER_DEBUG=true, trigger a compressible command, then check ~/.token-saver/hook.log for errors.echo '{"tool_name":"Bash","tool_input":{"command":"git status"}}' | python3 "${CLAUDE_PLUGIN_ROOT}/scripts/hook_pretool.py"hookSpecificOutput.updatedInput.command rewritten to invoke wrap.py.© ppgranger, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/token-saver-config of ppgranger/token-saver.
Open the folder on GitHubat commit 19d47b2
Token-Saver Configuration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Token-Saver Configuration this skillppgranger/token-saver | 153 | — | ~1k | Automated safety check: Pass | Apache-2.0 | |
| Context Mode Output Sandboxmksglu/context-mode | 26k | — | ~4.1k | Automated safety check: Pass | Custom licence | |
| Context Mode for Antigravity CLImksglu/context-mode | 26k | — | ~850 | Automated safety check: Pass | Custom licence | |
| Context Fundamentalsguanyang/open-agent-hub | 977 | 2 repos | ~4.2k | Automated safety check: Pass | MIT | |
| Plugin Skill Development Guideanthropics/claude-plugins-official | 38k | 9 repos | ~5.6k | Automated safety check: Pass | Apache-2.0 | |
| Context DoctorjzOcb/context-doctor | 119 | — | ~642 | Automated safety check: Pass | MIT |
mksglu/context-mode
Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.
mksglu/context-mode
Routing rules for using context-mode MCP tools in Antigravity CLI: sandboxed code runs, file analysis, indexed search and web fetches that keep large output out of the conversation.
guanyang/open-agent-hub
This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped…
anthropics/claude-plugins-official
Explains how to design and write skills for Claude Code plugins: SKILL.md frontmatter, bundled scripts, references and assets, and descriptions that trigger at the right time.
jzOcb/context-doctor
Visualize and diagnose OpenClaw context window usage. An agent skill from jzOcb/context-doctor.
yologdev/yoyo-evolve
Diagnoses a recurring failure such as a stuck task, repeated CI error or frequent reverts by sending sub-agents through the logs and returning one root-cause diagnosis.
Categories
Checks and tunes token-saver output compression: reads stats, explains why a command was or was not compressed, and edits config files or environment variables. This skill helps diagnose token-saver, a tool that compresses command output for coding assistants. `token-saver stats` shows lifetime and per-command savings, `token-saver explain` reports the routing decision for a given command, and `token-saver benchmark` with `--dry-run` measures compression without replacing real output.
Token-Saver Configuration fits situations like: finding out why a specific command's output was or was not compressed; raising the minimum compression ratio or turning off a processor such as docker; reviewing token savings statistics; debugging token-saver hook problems.
Run `npx skills add ppgranger/token-saver --skill token-saver-config -a claude-code`. Or copy the skill folder (skills/token-saver-config in ppgranger/token-saver) into .claude/skills/token-saver-config in your project. Claude Code loads it when a task matches its description.
Run `npx skills add ppgranger/token-saver --skill token-saver-config -a codex`. Or copy the skill folder (skills/token-saver-config in ppgranger/token-saver) into .agents/skills/token-saver-config in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ppgranger/token-saver --skill token-saver-config -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/token-saver-config, .gemini/skills/token-saver-config, .github/skills/token-saver-config and .opencode/skills/token-saver-config in your project.
Going by SKILL.md and its folder, Token-Saver Configuration needs the command-line tools its instructions call (python3). Our summary lists: The token-saver command line tool.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Token-Saver Configuration is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Token-Saver Configuration: Context Mode Output Sandbox (mksglu/context-mode, 26k stars), Context Mode for Antigravity CLI (mksglu/context-mode, 26k stars), Context Fundamentals (guanyang/open-agent-hub, 977 stars) and Plugin Skill Development Guide (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
ppgranger (a GitHub user) maintains it in ppgranger/token-saver, which has 153 GitHub stars. The repository was last updated on September 19, 2026.
Source: ppgranger/token-saver on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.