跳到主要内容
知仓学习社ZHICANG

token-diet

Cut LLM output tokens 40–70% by stripping grammatical scaffolding while preserving every fact — telegraphic output modes, when they pay (pipelines, …

不碰外部(只输出文字)无严重或高危命中mohitagw15856/pm-claude-skills

它会碰到什么

扫了多少1 个文本文件,6 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

Token Diet Skill

Most of an LLM's output is grammatical scaffolding the reader's brain (or the next model in the pipeline) reconstructs for free: articles, hedges, pleasantries, "it's worth noting that." Strip it and the facts survive in 30–60% of the tokens — output reads like a telegram, and models parse telegrams fine. But the diet has real economics: output tokens cost 3–5× input, so dieting output pays disproportionately — while in single-shot calls the mode instruction itself costs more than it saves, and human-facing prose dieted into fragments just transfers the reading cost to a person. This skill installs the three levels, the switch lines, and the judgment about when each pays.

What This Skill Produces

  • The mode blocks — paste-ready instruction text for each diet level, tuned to the use case
  • The three levels with examples — the same content shown at each level, so the trade is visible
  • The economics — where the diet pays (multi-turn, pipelines, agent-to-agent) and where it costs (single shots, human deliverables)
  • The never-diet list — the content classes where scaffolding IS the content

Required Inputs

Ask for these if not provided:

  • The use case — interactive session, agent pipeline, logging/intermediate output, or human-facing deliverable — the level (or the refusal) follows from it
  • The reader — a model, a developer skimming, or an end user; models tolerate level 3, humans stop at level 1–2
  • The volume shape — many turns (mode instruction amortizes; diet pays) vs. one call (it usually doesn't — say so)

Framework: The Three Levels and the Economics

  1. Level 1 — No filler (safe everywhere): strip pleasantries, hedges, meta-commentary ("Certainly! It's worth noting that…"), restatements of the question. ~15–25% output reduction, zero information loss, readable by anyone. This level is just good writing and has no never-diet list.
  2. Level 2 — Compressed prose: short declaratives, no transitions, minimal articles where clarity survives. "Deploy failed. Cause: expired cert on api-gw. Fix: rotate cert, redeploy. ETA 20min." ~30–50% reduction; fine for status updates, intermediate reasoning, developer-facing output.
  3. Level 3 — Telegraphic (the caveman register): facts only, grammar reconstructed by the reader. "deploy fail. cert expired api-gw. rotate + redeploy. 20min." ~50–70% reduction; for agent-to-agent messages, pipeline intermediates, and logs — places where no human reads unassisted.
  4. The economics, honestly: output tokens price at 3–5× input, so output dieting is the highest-leverage compression per effort — but the mode instruction rides input on every call (cheap, cacheable) and only amortizes across turns. Single-shot: skip it. And a dieted output a human must re-expand mentally didn't save tokens, it moved the cost off the bill and onto the reader — which is why deliverables stay at level 1.
  5. The never-diet list: legal/contractual text, user-facing documents, teaching content (the scaffolding is the pedagogy), anything quoted verbatim later, and safety-relevant instructions — ambiguity introduced by compression is a bug, and these are where ambiguity bites. The diet compresses transport, never meaning-bearing form.

Output Format

Token Diet: [use case] — level [1/2/3]

The Mode Block (paste this)

> [The instruction text, e.g. L2: "Respond in compressed prose: short declaratives, no filler, no hedges, no restating the question. Facts and actions only. Full grammar where ambiguity threatens."]

The Same Content, Three Ways

[One realistic paragraph at L0/L1/L2/L3 with token counts — the trade made visible]

The Economics Here

[This use case's volume × the level's reduction × output pricing — worth-it verdict in one sentence; measure with [token-cost](../token-cost/SKILL.md)]

Never Diet

[The exclusions relevant to this user's context, named]

Quality Checks

  • [ ] The level matches the reader (models get 3, humans get 1–2)
  • [ ] The single-shot case was checked — and refused when the diet costs more than it saves
  • [ ] The example shows the same content at multiple levels with counts
  • [ ] The never-diet exclusions are stated, not implied
  • [ ] Facts survive verbatim at every level — compression touched form only

Anti-Patterns

  • [ ] Do not diet single-shot calls — the instruction outweighs the saving; the skill says no
  • [ ] Do not ship level-3 output to humans — that's cost-shifting, not saving
  • [ ] Do not let compression create ambiguity — where two readings appear, grammar returns
  • [ ] Do not diet the never-diet list — legal text in telegraphese is a liability with a good ratio
  • [ ] Do not confuse terse with rude in interactive use — level 1 removes filler, not courtesy where courtesy is content

Based On

The output-compression register pattern — telegraphic prompting for output-token reduction (as in Caveman and the caveman-compression method) — systematized here into levels, economics, and exclusions.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 token-diet 的技能。它们内容并不相同,别混用: