By Kalmantic
Reduces Claude Code token costs by compressing PDFs, images, logs, and diffs; offloading sub-tasks to isolated agents; indexing code symbols for cheap lookup; and optimizing outputs and context files—all while preserving technical content.
Branch a self-contained sub-task into an isolated subagent context to keep the main thread cheap.
Tersely rewrite a memory/context file (CLAUDE.md, notes) to cut its per-session token cost.
Compress a git diff — keep real code hunks, collapse lockfile/generated/minified file diffs to one line.
Build the jusTokenMax code symbol index for this repo.
Mine this session for recurring corrections and save them to CLAUDE.md so future sessions don't repeat the mistakes (and waste tokens re-litigating them).
Compress heavy context before it costs tokens. Use when the user attaches or asks to read a PDF, scanned document, screenshot/large image, or a verbose log / build output / CI output — convert PDFs to Markdown, compress oversized images, and digest noisy logs so the same content costs a fraction of the tokens.
Preserve prompt-prefix stability so the provider's KV cache keeps hitting, cutting cost and latency on long sessions. Use when structuring system prompts, memory files, or tool definitions, when a long session is getting expensive, or when deciding where to put changing vs stable content.
Keep the main conversation cheap by offloading heavy sub-tasks to isolated subagent contexts. Use when a sub-task (research sweep, large-file investigation, log triage, broad search) will generate a lot of intermediate output whose conclusion is small — branch it to a subagent so the verbose work never enters the main thread, and merge back only a compact digest.
Find code by symbol name instead of reading whole files. Use when you need to locate a function, class, or method, understand where something is defined, or navigate an unfamiliar repo — query the jusTokenMax code index to get file:line + signature in a few tokens, then read only that range.
Cut the tokens the agent WRITES, not just what it reads. Activate when the user asks for terse/concise/brief output, says responses are too long, wants to save output tokens or cost, or runs /justokenmax:terse — then answer in a compressed style that preserves all technical substance while dropping filler.
Admin access level
Server config contains admin-level keywords
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimnpx claudepluginhub kalmantic/justokenmax --plugin justokenmaxBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Keep your coding agent under a token (and cost) budget. jusTokenMax shrinks every expensive thing before it reaches the model's context — attachments, logs, JSON, notebooks, CSVs, diffs, and the files you read — so the same work costs a fraction of the tokens.
Built by Kashi (linkedin) and Rajan (linkedin), founders of Kalmantic — jusCode.co. MIT licensed. Contributors: Arbaz (linkedin), CTO of LineupX.
Coding-agent bills are driven by input tokens — the PDFs, logs, API responses, diffs, and source files that pile into the context window. jusTokenMax caps that: it intercepts each heavy input and replaces it with a faithful, far cheaper equivalent, before it costs you a token.
terse
output and chat-branch to also cap what the agent writes and re-reads.justokenmax retrieve brings it back); secrets and base64 blobs are masked on
the way through.Read hook swaps
heavy files for cheap artifacts in place), and available to any MCP agent
(Codex CLI, OpenCode, Cursor, …) plus a plain justokenmax CLI.| What you feed it | Typical reduction |
|---|---|
| PDF spec / paper | −56% (real PDFs) |
| Verbose build/CI log | −99% |
| Large JSON / API response | −99% |
| Jupyter notebook | −99% |
| CSV (thousands of rows) | −99% |
| Git diff (lockfile churn) | lockfile → 1 line |
| Finding a symbol vs reading the file | −97% |
Fastest path, inside Claude Code (run these one at a time — one slash command per prompt):
/plugin marketplace add https://github.com/Kalmantic/jusTokenMax.git/plugin install justokenmax@justokenmax/reload-pluginsNow reading PDFs / logs / JSON / CSV / notebooks / diffs is compressed
automatically. (The hook calls the justokenmax CLI — see Install
to add it; or just have Node and it auto-provisions.) Prefer the CLI or another
agent? justokenmax install registers it for Codex / OpenCode / Cursor too.
👉 Full 5-minute hands-on with a real dev task and on/off measurement:
docs/try-it.md.
In a real development loop — one pass through a small website project's inputs (8 source modules, a 10k-line
package-lock.json, a 5,000-row CSV, a noisy build log): 259,819 → 103,745 tokens (−60%), measured with a real tokenizer — and it compounds as the agent re-reads files while editing. Reproduce it step by step indocs/try-it.md.
The same tool serves a solo developer and a regulated enterprise, by design — not as an afterthought:
justokenmax install) and then it
just works, automatically: free, MIT, no account, no signup, sensible
defaults. Your agent simply gets cheaper.Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Token optimization for Claude Code. Automatic tool output compression (40-60% reduction), token meter in statusline, auto-compact at 70% context, structured output formats, self-building project wiki, URL ingestion, Karpathy compile pass, and semantic lint.
Honey (I Shrunk the AI) — three reflexive levers that cut agent token cost: less code (YAGNI/stdlib-first), less prose, and denser agent-to-agent handoffs (ESON/compact-JSON). Plus on-demand satellites (review, eco, gain, compress) and a hive of read-only subagents that return compressed handoffs. Auto-intensity lite/full/ultra; correctness and safety-critical paths stay exact.
Compress LLM agent instructions and code documentation markdown files through iterative section-by-section compression with compressor-reviewer loop — lossless structural optimization and lossy semantic compression modes
45% cost reduction measured. Cache expiry prevention, SubTask auto-delegation, zero-cost context restoration, real-time cost dashboard. The only Claude Code plugin built from CC source analysis.
Governor: always-on compact professional output, telemetry, context slimming, tool-output filtering, prompt guidance, and drift guardrails for Claude Code Max users.