rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Yearngg/dsh-cost-chip
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Token usage and money, where you already look: one compact line under every completed answer, and the running session total above the composer — priced the way DeepSeek actually bills, with peak/idle rates applied per turn.
DeepSeek Harness already counts tokens, but the numbers live in a popover. This plugin puts them on screen and turns them into money:
本轮 12.3k tok · ¥0.0345 (Turn 12.3k tok · ¥0.0345 in English).会话 2.11M tok · ¥0.2498, updating as the turn streams and settles.task-token-cost, so you can ask the agent for cross-session reports, per-day totals, or CSV/JSON — the same numbers, aggregated over every session on disk.Zero dependencies, zero network calls, no files written: everything is read from the session projections the harness already maintains.
Install it (below) and open any conversation. Finished turns get the line automatically; the composer line appears as soon as the session has a model call.
Point at either line to see the split. Nothing to configure, no panel to open.
To go beyond the current session, just ask in natural language — the bundled skill handles it:
最近三天每个任务花了多少 token 和钱?
把这个月的用量导出成 CSV
哪个会话最贵?
The skill answers from $DSH_HOME/sessions, so it also covers sessions you are not looking at, and can emit per-turn, per-day or per-model totals.
Price change? Edit PRICES at the top of client.js for the on-screen readings and
skills/task-token-cost/prices.json for the reports. Models missing from the table fall back to the Flash rate and are marked with ≈.
The turn line sits at the end of every finished answer — tokens for that turn, and what it cost at that turn's own peak/idle rate:

The composer line keeps the running total for the whole session, next to the harness's own speed and cache-hit pills:

Hovering either line opens the split — uncached input, cache read, output, model, and the rate that was
applied. The figures above are real readings from a deepseek-flash session, priced at the idle rate.
The ≈ on the session reading means the session is longer than the loaded transcript: the token count
is still the whole session, while the money covers the turns currently in the window.
dsh-cost-chip, install.dsh plugin add github:Yearngg/dsh-cost-chip
dsh plugin add dsh-cost-chip
Requires DeepSeek Harness 0.2.1-rc.1 or newer — it uses the conversation.chat.turnTail and
conversation.composer.dock slots. Reload the page after installing; no restart needed.
Prices are CNY per 1,000,000 tokens and mirror the public DeepSeek list (checked 2026-10):
| Model | Idle: miss / hit / output | Peak: miss / hit / output |
|---|---|---|
deepseek-flash |
¥1 / ¥0.02 / ¥4 | ¥2 / ¥0.04 / ¥8 |
deepseek-v4-pro |
¥4.5 / ¥0.15 / ¥13.5 | ¥9 / ¥0.3 / ¥27 |
Peak hours are Beijing time, Monday–Friday, 09:00–12:00 and 14:00–18:00; everything else is idle. Cache writes are not billed. Figures are estimates: they follow the list price, not your invoice, and statutory holidays are priced as peak because the plugin cannot know the holiday calendar.
skills/task-token-cost/ ships the task-token-cost skill and its CLI:
node <skill-dir>/scripts/token-cost.mjs report # per-session tokens + cost
node <skill-dir>/scripts/token-cost.mjs report --by turn # per-turn detail
node <skill-dir>/scripts/token-cost.mjs report --since 7d --csv report.csv
node <skill-dir>/scripts/token-cost.mjs prices # show the active price table
The plugin registers it as a runtime skill, so it outranks a same-named copy under ~/.dsh/skills.
Two skills with one name would shadow each other; delete the user-level copy if you installed one earlier.
The readings come from the running session's tokenUsage projection and each completed turn's folded
usage; the skill reads $DSH_HOME/sessions/**/session.v4.jsonl.zstd. Nothing leaves the machine and
nothing is written.
The package is a plain Cordis bundle: cordis.patch.yml inserts the token-cost row, index.js
registers the skill, client.js registers the two slots. No build step — a git install runs the
source directly. Edit client.js, reload the page, done.
MIT
作用:把 DeepSeek Harness 已经统计的 token 用量直接摆到界面里,并折算成金额。
本轮 12.3k tok · ¥0.0345;会话 2.11M tok · ¥0.2498;task-token-cost 技能注册进来,可以让 agent 跨会话出报表、导 CSV/JSON。零依赖、不联网、不写文件。
截图:
每条回答末尾的本轮读数——本轮的 token 和按该轮时段单价算出的金额:

输入框上方的会话累计,排在宿主自带的 tok/s 和缓存命中率旁边:

指着任一行就能展开拆分(未命中输入 / 缓存命中 / 输出、模型、当时按高峰还是闲时)。上面两张是 deepseek-flash 会话里的真实读数,按闲时价计。会话行前面的 ≈ 表示这个会话比已加载的对话窗口更长:token 数仍是整个会话的,金额只覆盖窗口里已有的轮次。
怎么用:
client.js 顶部的 PRICES(界面)和 skills/task-token-cost/prices.json(报表)。安装:
dsh plugin add github:Yearngg/dsh-cost-chip # 本仓库
dsh plugin add dsh-cost-chip # 发布到 npm 之后
也可以在市场里搜索 dsh-cost-chip 一键安装(收录后)。需要 dsh 0.2.1-rc.1 及以上,装完刷新页面即可,不用重启。
口径:金额 = Σ 每次调用(未命中输入×未命中价 + 缓存命中×命中价 + 输出×输出价)÷ 1,000,000,高峰为北京时间工作日 9:00–12:00、14:00–18:00,其余闲时;缓存写入不计费;法定节假日无法识别,按高峰计。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。