/justokenmax:attachmentsfrom justokenmax
Compresses PDFs to Markdown, downscales large images, and digests verbose logs to reduce token costs. Use when attaching heavy files or pasting long build output.
Ships in justokenmax. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The silent token sinks in a session are the heavy things you feed in: PDFs (ingested as ~1,500-token page images per page), oversized screenshots, and verbose logs (thousands of near-identical lines). justokenmax turns each into a cheap, faithful equivalent.
.pdf whose contents are needed → PDF → page-delimited Markdown..png/.jpg/.jpeg/.webp over a couple hundred KB → downscale ≤1568px +
recompress + strip metadata..log or pasted build/test/CI output that's long and repetitive →
digest: ANSI stripped, repeated lines collapsed (×N), stack traces
folded, errors/warnings + head/tail kept.The Read hook does the common case automatically — a Read on a .pdf, large
image, or .log is transparently rewritten to read the cheap artifact. Use this
skill for manual/batch runs and to report savings.
justokenmax optimize spec.pdf screenshot.png build.log # auto-dispatch by type
justokenmax pdf report.pdf # force PDF → Markdown
justokenmax image diagram.png --max-edge 1280 # force image compression
justokenmax logs ci-output.log # force log digest
justokenmax stats # lifetime token savings
Add --json for machine-readable output. If justokenmax isn't on PATH, use
python3 -m justokenmax <args> with the plugin's python/ dir on PYTHONPATH.
Read the optimized artifact the command reports (.md, .log.txt, or the
compressed image), not the original. Everything is cached by content hash, so
re-running on an unchanged file is free and reversible — the original is one
read away.
What SKILL.md sets; muted values are Claude Code's defaults
5 skills in this plugin
/cache-alignPreserve 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./chat-branchKeep 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./code-indexFind 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./terse-outputCut 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.npx claudepluginhub kalmantic/justokenmax --plugin justokenmaxOther plugins' skills for the same job