token-diet

GitHub

通过去除语法冗余压缩LLM输出40-70%,提供三种压缩等级及适用场景建议。适用于管道、长会话或Agent间通信以降低成本,不适用于单次调用或面向人类阅读的场景。

plugins/pm-tokens/skills/token-diet/SKILL.md mohitagw15856/pm-claude-skills

Trigger Scenarios

要求模型简洁回复 降低输出Token成本 启用极简模式(caveman mode) 压缩Agent间消息

Install

npx skills add mohitagw15856/pm-claude-skills --skill token-diet -g -y
More Options

Non-standard path

npx skills add https://github.com/mohitagw15856/pm-claude-skills/tree/main/plugins/pm-tokens/skills/token-diet -g -y

Use without installing

npx skills use mohitagw15856/pm-claude-skills@token-diet

指定 Agent (Claude Code)

npx skills add mohitagw15856/pm-claude-skills --skill token-diet -a claude-code -g -y

安装 repo 全部 skill

npx skills add mohitagw15856/pm-claude-skills --all -g -y

预览 repo 内 skill

npx skills add mohitagw15856/pm-claude-skills --list

SKILL.md

Frontmatter
{
    "name": "token-diet",
    "description": "Cut LLM output tokens 40–70% by stripping grammatical scaffolding while preserving every fact — telegraphic output modes, when they pay (pipelines, long sessions) and when they don't (single shots, human-facing prose), with the mode lines to switch on demand. Use when asked make the model respond tersely, cut output token costs, caveman mode, or compress agent-to-agent messages. Produces the diet-mode instruction block ready to paste, the three compression levels with examples, the economics of when each pays, and the never-diet list."
}

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]

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.

Version History

  • 471c606 Current 2026-07-22 14:33

Same Skill Collection

exports/openclaw/360-feedback-template/SKILL.md
exports/openclaw/401k-plan-decoder/SKILL.md
exports/openclaw/ab-test-planner/SKILL.md
exports/openclaw/ab-test-readout/SKILL.md
exports/openclaw/accessibility-audit/SKILL.md
exports/openclaw/account-plan/SKILL.md
exports/openclaw/acquirer-red-team/SKILL.md
exports/openclaw/ad-copy/SKILL.md
exports/openclaw/aeo-optimizer/SKILL.md
exports/openclaw/agenda-or-cancel/SKILL.md
exports/openclaw/agent-design-review/SKILL.md
exports/openclaw/agent-observability-spec/SKILL.md
exports/openclaw/agent-spec/SKILL.md
exports/openclaw/ai-ethics-review/SKILL.md
exports/openclaw/ai-eval-plan/SKILL.md
exports/openclaw/ai-feature-prd/SKILL.md
exports/openclaw/ai-product-canvas/SKILL.md
exports/openclaw/air-quality/SKILL.md
exports/openclaw/altitude-shifter/SKILL.md
exports/openclaw/ambiguity-resolver/SKILL.md
exports/openclaw/analyst-relations-brief/SKILL.md
exports/openclaw/announcement-card/SKILL.md
exports/openclaw/api-docs-writer/SKILL.md
exports/openclaw/api-test-plan/SKILL.md
exports/openclaw/api-versioning-strategy/SKILL.md
exports/openclaw/apology-letter/SKILL.md
exports/openclaw/architecture-decision-record/SKILL.md
exports/openclaw/architecture-diagram/SKILL.md
exports/openclaw/archive-strategy/SKILL.md
exports/openclaw/assumption-bounty/SKILL.md
exports/openclaw/assumption-mapper/SKILL.md
exports/openclaw/async-update-format/SKILL.md
exports/openclaw/auto-repair-estimate-decoder/SKILL.md
exports/openclaw/autopilot-charter/SKILL.md
exports/openclaw/benefits-decoder/SKILL.md
exports/openclaw/bid-tender-review/SKILL.md
exports/openclaw/board-deck-narrative/SKILL.md
exports/openclaw/board-minutes/SKILL.md
exports/openclaw/board-pre-read/SKILL.md
exports/openclaw/bom-cost-review/SKILL.md
exports/openclaw/bookkeeping-categorization/SKILL.md
exports/openclaw/boolean-search-builder/SKILL.md
exports/openclaw/brag-doc/SKILL.md
exports/openclaw/brainstorming/SKILL.md
exports/openclaw/brief-builder/SKILL.md
exports/openclaw/briefing-note/SKILL.md
exports/openclaw/budget-builder/SKILL.md
exports/openclaw/budget-variance-analysis/SKILL.md
exports/openclaw/bug-diagnosis/SKILL.md
exports/openclaw/bug-report/SKILL.md

Metadata

Files
0
Version
471c606
Hash
9b271b9f
Indexed
2026-07-22 14:33

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-29 21:47
浙ICP备14020137号-1 $방문자$