AI Agent Hub
Back to plugins
🖥️

dsh-composer-tokens

Client Updated 2026.09.03

Run the following command in DeepSeek Harness:

dsh plugin install wbycloud/dsh-composer-tokens

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

Run dsh plugin install wbycloud/dsh-composer-tokens in your DeepSeek Harness terminal to install the plugin; the full source code is available at https://github.com/wbycloud/dsh-composer-tokens

About this plugin

When you are iteratively refining prompts, attaching tool definitions, and referencing skill files inside the DeepSeek Harness web interface, one question lingers overhead: exactly how many tokens will this message consume, how much headroom is left in the context window, and what share is taken by the fixed overhead of system prompts and tool declarations? dsh-composer-tokens is a pure client-side plugin built to answer exactly that. It pins a small real-time badge to the far right of your input box — no server component required, out of the box the moment you install it.

Under the hood, the badge is backed by a layered token-metering pipeline. It first reaches for a precise engine driven by the same tokenizers DeepSeek ships (DeepSeek-V3, o200k, and cl100k tables) to compute the baseline, then refreshes the draft portion with a 250 ms debounce. When a precise engine is unavailable — unknown model, offline, or a failed custom URL — it falls back to the same heuristic DeepSeek's official token-meter uses and marks the figure with a tilde so you always know the basis. Hover or keyboard-focus the badge and a tooltip unfolds: baseline source, skill-reference delta, per-frame constants, projected total tokens for the next request, context-window occupancy, the four-bucket running usage for the whole session, and the input cache hit rate. The badge colour also shifts with total volume, turning red in both background and border as you approach the window limit — a glance is enough to feel the pressure.

If your daily work in Harness involves writing long system prompts, debugging multi-turn conversations, or hopping between models, dsh-composer-tokens turns the vague feeling of almost-full into a concrete 12-percent headroom figure and the question of whether a cache hit landed into a measurable percentage. It changes nothing about how requests are sent — it simply reads the ledger a little more carefully on the client side.

Use Cases

  • Gauge projected token cost and remaining window headroom while iterating on long prompts or multi-turn dialogue
  • Track cumulative session usage, fixed-overhead share, and input cache hit rate over time
  • Verify that the baseline auto-recalibrates after switching models so context-window estimates stay trustworthy

Best For

  • Prompt engineers who build and debug inside the DeepSeek Harness web GUI
  • AI application developers who need quantified context-window occupancy and cost budgeting across multi-tool setups
  • Heavyweight Harness users who swap models, attach skill files, and care about exact token baselines