Few tokens. Do trick.
whispers is a drop-in compression skill for Claude Code.
It reduces response tokens by stripping filler/hedging and preferring fragments + lists, while preserving technical content (code blocks, file paths, URLs, identifiers, errors).
This repo includes:
WHISPERS.mdrules file (the skill)CLAUDE.mdexample auto-loader- Node scripts to measure tokens and run reproducible benchmarks
- Copy
WHISPERS.mdinto your Claude Code project - Add this line to your project’s
CLAUDE.md:
Load the rules in `WHISPERS.md` for all responses.- Start a new session. Use:
whispers(default)whispers litewhispers ultrawhispers off
Claude Code sees WHISPERS.md in context and applies its communication rules to every response:
- Remove filler openers / sign-offs / throat-clearing
- Remove hedging
- Prefer fragments + lists when possible
- Never alter technical payload (code blocks untouched, paths/URLs preserved)
No plugins. No build step. Prompt engineering only.
- ✅ Is: a consistent style layer that reduces verbosity and token usage
- ✅ Is: measurable via benchmarks and token counters
- ❌ Isn’t: a guarantee — compliance varies by model, prompt, and context size
There are 3 benchmark runners in benchmark/:
- Anthropic Claude:
node run.js(requiresANTHROPIC_API_KEY) - Groq (fast, OpenAI-compatible):
node run-groq.js(requiresGROQ_API_KEY) — not Claude - Gemini Flash:
node run-free.js(requiresGEMINI_API_KEY)
All runners execute each prompt twice:
- Normal system prompt
- System prompt +
WHISPERS.md
Then print an aligned table and average % reduction.
Groq sample run (model: llama-3.1-8b-instant):
| Task | Normal tokens | whispers tokens | Saved | % |
|---|---|---|---|---|
| React hooks explanation | 578 | 465 | 113 | 20% |
| Fix undefined variable (code) | 216 | 257 | -41 | -19% |
| Git merge vs rebase | 450 | 347 | 103 | 23% |
| CSS centering (code) | 301 | 383 | -82 | -27% |
| Node retry with backoff (code) | 615 | 595 | 20 | 3% |
| SQL join explanation | 636 | 145 | 491 | 77% |
| Docker multi-stage build | 491 | 454 | 37 | 8% |
Average reduction: 20% (this run).
Transparency: do not treat any % as universal. Savings depend heavily on task type (explanations compress more than code-only answers).
| Command | Effect |
|---|---|
whispers lite |
strip filler only, keep grammar |
whispers / whispers full |
fragments + drop articles when clear (default) |
whispers ultra |
maximum compression |
whispers off |
deactivate |
Normal (verbose):
Great question! I'd be happy to help you debug the re-render. It's worth noting that React re-renders when state or props change. You may want to consider wrapping the child with
React.memoso that it doesn't re-render unnecessarily. Here's how you would do it:export default React.memo(Child);Let me know if you have any questions!
whispers:
Re-render cause: parent re-renders, child props change ref. Fix: memoize.
export default React.memo(Child);
cd scripts
npm install
node whispers-inspect.js paste # count tokens in pasted text (stdin)
node whispers-inspect.js session # compare WITHOUT vs WITH (separator: ----)
node cursor-inspect.js # scan local Cursor DBs and estimate savingsNotes:
whispers-inspectusestiktoken(cl100k_base) if present, otherwise a char/4 approximation.cursor-inspectreads Cursor’sstate.vscdbfiles read-only. Cursor’s internal schema may change; extraction is best-effort.
cd benchmark
cp .env.example .env
npm installAnthropic:
# set ANTHROPIC_API_KEY in .env
node run.jsGroq:
# set GROQ_API_KEY in .env
# optional: set GROQ_MODEL=... (default: llama-3.1-8b-instant)
# optional (helps avoid 429 rate limits):
# GROQ_DELAY_MS=1200
# GROQ_MAX_TOKENS=400
node run-groq.jsGemini:
# set GEMINI_API_KEY in .env
node run-free.js- Prompt, not a guarantee. Different models follow “be terse” rules with different strictness.
- Token counting differs by provider. Compare runs within the same runner, not across vendors.
- Benchmarks are representative, not exhaustive. Add your own prompts in
benchmark/prompts.jsand publish your table. - No code modification.
WHISPERS.mdis explicitly written to keep code blocks and technical strings intact.
bonsai— Cursor rules that reduce verbosity by default.
MIT
- Never commit
.envfiles. - If you accidentally leaked an API key, rotate it immediately and purge it from git history before publishing.
- See
SECURITY.md.
If your current git repo is rooted somewhere above this folder (e.g. your home directory), do not publish that whole repo.
Publish only this directory (whispers/) as its own repository.