minimize-token-usage

minimize-token-usage is a skill for Codex from Kolikkii/token-razor. It costs 82 tokens per session (565 once invoked), scanned A, original, MIT.

A set of instructions for keeping an agent's context and token use low while preserving important evidence and checks.

In plain words
What is it for?
Use it to inspect files narrowly, summarise large results, restore compacted output when needed, and keep work cost-efficient.
Why use it?
It reduces repeated reading and noisy output during long coding, research, or debugging tasks.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions Codex.

Good fit Use it to inspect files narrowly, summarise large results, restore compacted output when needed, and keep work cost-efficient.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kolikkii/token-razor/minimize-token-usage
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.

Any agent
npx skills add Kolikkii/token-razor --skill minimize-token-usage
Clone the repo
git clone --depth 1 https://github.com/Kolikkii/token-razor

Made for: Codex.

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 minimize-token-usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/kolikkii/token-razor/minimize-token-usage/github.svg)](https://agentmods.dev/skills/kolikkii/token-razor/minimize-token-usage)
Your own site
<a href="https://agentmods.dev/skills/kolikkii/token-razor/minimize-token-usage"><img src="https://agentmods.dev/badge/skills/kolikkii/token-razor/minimize-token-usage/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 minimize-token-usage

Your own site · 80×15
<a href="https://agentmods.dev/skills/kolikkii/token-razor/minimize-token-usage"><img src="https://agentmods.dev/badge/skills/kolikkii/token-razor/minimize-token-usage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 565 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.00082 $0.00565
Opus 5 $0.00041 $0.00282
Sonnet 5 $0.00016 $0.00113
Haiku 4.5 $0.00008 $0.00056

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

Security

Grade A, and why

minimize-token-usage 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 8d 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.

skills/minimize-token-usage/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Minimize Token Usage

Treat context as a budget. Preserve decisions, constraints, failures, and verification evidence; discard repetition and low-signal bulk.

Work economically

  1. Inspect narrowly with rg, targeted line ranges, and exact files.
  2. Reuse evidence already in the thread. Do not reread unchanged content.
  3. Batch independent reads only when every result is likely to matter.
  4. Prefer summaries, counts, and diffs over full listings.
  5. Keep progress and final prose proportional to the request.
  6. Verify risky changes; token savings never justify skipping relevant tests.

Handle compressed results

Token Razor labels a compacted tool result with a TR-XXXXXXXXXXXX identifier. Use the visible summary first. Restore the full result only when omitted evidence blocks the next decision:

node "/installed/token-razor/scripts/cli.mjs" restore TR-XXXXXXXXXXXX --data-dir "/plugin/data/path"

Copy the exact command from the compacted result; it contains the current installation and data paths. Prefer a fresh narrow query over restoring a huge archive when the missing fact is known. Never invent omitted content.

When the result advertises a search command, use it before printing the full archive:

node "/installed/token-razor/scripts/cli.mjs" search TR-XXXXXXXXXXXX "decisive literal" --context 3 --data-dir "/plugin/data/path"

Select a mode

  • balanced: default; compress large tool output aggressively while retaining signals.
  • safe: larger output budget for unfamiliar or high-risk debugging.
  • extreme: smallest budget for repetitive logs, broad searches, and explicit token minimization.
  • passthrough: use only when the user asks for verbatim or unabridged output.

The prompt hook recognizes these intents per turn. Persistent project overrides belong in .token-razor.json; see algorithms-and-configuration.md only when tuning or auditing behavior.

Guard correctness

Read the full file on GitHub · 49 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 49 lines · 82 tokens per session scan A 2e087bf0d56c

Subscribe to this mod's changes

minimize-token-usage is a skill published in the GitHub repository Kolikkii/token-razor (1 stars, last pushed 1mo ago), licensed MIT. It adds 82 tokens to every session and 565 once invoked, about $0.0004 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-31.