agentsclimarketplace

Token squeeze

Skill Evan-Daruwalla/claude-skill-suite/token-squeeze

Claude Code skills for running models cost-effectively: security gates (secret scanner, commit-gate), model-quality tooling (eval harness, token-squeeze, compact-io, opus-workers), review/advisory (trusted-advisor, audit, skill-vet, research-brief), and a read-only reorg-proposal advisor.

Install
npx -y skills add Evan-Daruwalla/claude-skill-suite --skill token-squeeze

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 28 days oldThe repository was created 28 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Deterministic, no-LLM compressor that rewrites verbose English into fewer tokens for text that will be REUSED — saved prompts, system prompts, skill bodies, docs pasted repeatedly. Use when the user asks to "compress this file/prompt/doc for reuse", "shrink this system prompt", "run token-squeeze", or wants to cut the token cost of a reusable text asset. Runs a bundled Node CLI (no API, no model call). NOT for compressing live chat turns — those tokens are already spent on arrival; this only pays when the compressed text replaces the original in future contexts. Meaning-leaning, not lossless: it substitutes verbose phrases for equivalents and protects code, URLs, paths, quotes, numbers, and negations.

SKILL.md

4.8 KB, 972 tokens by cl100k_base, as published. Nobody here has run it

This skill wraps a deterministic CLI. It does NOT ask you to compress text by hand — invoke the tool so results are reproducible and guard-checked.

WHEN IT PAYS (state this if the user aims it at live chat). Compressing text already in the context window saves nothing — those tokens were billed on arrival. token-squeeze only nets tokens when its output is reused: a saved prompt, a system prompt, a skill body, a doc pasted across many sessions. For a one-off message, skip it.

RUN IT. From the skill directory: npm install once (pulls gpt-tokenizer), then:

  • node cli.js <file> — compressed text to stdout.
  • node cli.js <file> --stats — adds a token-before/after + guard line on stderr.
  • node cli.js <file> --json — structured {tokensBefore, tokensAfter, savedPct, subs, subsDetail, guard}; subsDetail is the per-substitution ledger ("what changed"), show it when the user asks what was done.
  • node cli.js - --stats — read from stdin.
  • add --clean only for text carrying junk whitespace (pasted logs, tables); it's off by default because it saves ~0% on normal prose. Exit code is non-zero if the guard trips, so it's safe to script.

WHAT IT DOES. Layer B (default): token-aware dictionary substitution — "in order to"->"to", "due to the fact that"->"because", "utilize"->"use", plus deletion of pure filler. Each dictionary entry is self-filtered at load against the tokenizer and dropped unless it strictly reduces tokens, so a bad entry can't make output worse. Layer A (--clean, opt-in): lossless whitespace reclamation.

GUARANTEES AND LIMITS (report honestly, don't oversell).

  • Measured on the bundled corpus: ~25% overall, 37-42% on verbose prose, 13-17% on technical text, 0% on already-tight prompts (a tight prompt returns byte-identical). Run node test.js to reproduce.
  • Protected spans are never altered: fenced/inline code, URLs, Windows paths, double-quoted strings, dotted identifiers (auth.js, example.com, decimals). A five-way guard verifies every run and fails loudly: numbers; negation/constraint words in ANY case (no/not/never/must/cannot + contractions); dotted identifiers; protected spans; idempotence (running the output through again must be byte-identical).
  • Homonym-risky words are deliberately NOT in the dictionary (e.g. "leverage" — financial noun; "interface with" — UI noun phrase); a deterministic tool can't disambiguate, so it doesn't try. Same for phrases whose compression would delete a negation ("there is no doubt that") — the guard outranks the saving.
  • Token counts use the o200k (tiktoken) tokenizer as a PROXY for Claude's tokenizer, which Anthropic does not publish. Real Claude savings will be close but not identical. For exact numbers, count via the Anthropic count-tokens API (needs an API key).
  • Meaning-leaning, not string-lossless: substitutions preserve propositional content but change wording; emphasis from deleted filler is lost by design. Do not use where exact wording is contractual (legal text, quoted material) — those cases are protected only if quoted.

After running, show the user the savedPct and the guard result; if the guard fails, surface it rather than returning the output silently.

REPORTING FORMAT. Show before/after with the savedPct, then two short lists: Preserved (protected spans, negations, numbers — what the guard confirmed survived) and Dropped (pure-filler phrases removed entirely, not substituted — from subsDetail, the "-> (deleted)" entries). Never silently swap the user's text; the diff and the guard result are always shown.

FOR LONG REUSABLE PROMPTS (~200+ words). Beyond running the dictionary substitution, restructure the result as: INTENT (one sentence — what the prompt is for), CONSTRAINTS (bullets — the non-negotiable rules), CONTEXT (only what the model can't infer on its own). This is a manual restructuring step on top of the deterministic pass, not something the CLI does — do it only when asked to prep a prompt for reuse (a saved prompt, a system prompt, a skill body), not for a one-off message.

Gives 0 of the 12 instructions most prompt engineering skills give in 972 tokens

Counted across 563 of the 626 authors here whose files we hold, read 2026-08-06

  • ask at most three clarifying questionsin 22 of 563, across 15 files
  • respond in the user input languagein 14 of 563, across 9 files
  • preserve the original intentin 13 of 563, across 11 files
  • Establish baseline metrics and collect representative examplesin 12 of 563, across 2 files
  • Identify failure modes and prioritize high-impact fixesin 12 of 563, across 2 files
  • Apply prompt and workflow improvements with measurable goalsin 12 of 563, across 2 files
  • Roll back quickly if quality or safety metrics regressin 12 of 563, across 2 files
  • validate changes with tests and roll out in controlled stagesin 12 of 563, across 2 files
  • generate quantitative baseline performance reportsin 12 of 563, across 2 files
  • create representative test scenariosin 12 of 563, across 2 files
  • treat prompts as codein 12 of 563, across 5 files
  • test prompts on diverse inputsin 12 of 563, across 8 files

Said here and by no other author read

  • invoke the bundled CLI instead of compressing text manually
  • run npm install from the skill directory
  • show the token savings and guard result
  • surface guard failures instead of returning output silently
  • report preserved spans and dropped phrases
  • restructure long prompts into intent constraints context

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.