AI Agent Hub
Back to plugins
🧰

dsh-token-diet

Web Tools Updated 2026.08.26

Run the following command in DeepSeek Harness:

dsh plugin install WODE25500/dsh-token-diet

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install WODE25500/dsh-token-diet in DeepSeek Harness to install; source is at https://github.com/WODE25500/dsh-token-diet

About this plugin

Slipping raw content straight into the context window is the most direct and least noticeable source of token waste. A 45k-token log dump, a 125k-token JSON API response, or a multi-hundred-kilobyte CSV export can swallow the entire budget before the model even starts reasoning. Most existing tooling acts after the fact: pruning history once a compaction event fires, or monitoring token spend without intervening. What is missing is an upstream step that preserves the structural skeleton of large payloads before they ever enter the window.

dsh-token-diet fills exactly that gap. It is a zero-dependency, pure-function toolkit with no file I/O, no network calls, and no eval. Three payload types, three dedicated tools: text keeps head and tail, line count, and high-frequency keywords; JSON retains the key skeleton, types, array lengths, and sampled values; CSV surfaces column types, distinct / min / max / avg, and a few sample rows. Compression intensity is tunable through three presets (light, balanced, aggressive), a continuous 0-to-99 slider, or per-parameter overrides, with a clear, predictable priority chain. Every call returns a saved block, so the 98.4 percent you saved on that 45k-token log is a number in the response, not a marketing claim.

Who is it built for? If your day revolves around long log analysis, bulky API responses, CSV report processing, or multi-turn sessions where the token budget is tight and bulk data is the norm, this plugin can cut consumption by an order of magnitude without losing the structural details your workflow depends on. For a quick read of a short paragraph it is overkill; for a 500 KB JSON dump or a hundred-thousand-character report, it lets the model address data by key path instead of hoping the relevant field survived truncation.

Use Cases

  • Compressing multi-tens-of-thousands-token logs or API responses into structural digests before context injection
  • Batch-processing CSV reports and JSON payloads in multi-turn sessions without blowing the token budget
  • Estimating token cost of large inputs before deciding between full-load, diet, or skip

Best For

  • Backend and platform engineers who routinely work with long logs and large API responses
  • AI application developers running multi-turn sessions under tight token budgets
  • Data engineering teams that batch-process CSV and JSON files