Token Dietのロゴ

Token Diet

コミュニティ
Kulaxyz
token-diet

Cut token usage across the whole session without losing correctness or substance — concise user replies, lean tests/docs/plans/comments, tight code, disciplined context and tool use, and cheap sub-agent delegation. Load when the user wants less verbosity, lower cost, fewer tokens, or a "token diet" / "lean mode"; also triggered by /token-diet or "token diet on".

概要

公開者Kulaxyz
リポジトリtoken-diet
スキル名token-diet
スター
475
フォーク
5
同梱ファイル
6
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 6個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    KulaxyzがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Token Diet」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Kulaxyz/token-diet/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kulaxyz/token-diet.git \
  .claude/skills/token-diet
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでToken Dietを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にToken Dietを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Token Dietは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Token Diet

Reduce tokens by cutting wasted words, not substance. Preserve every bit of correctness, specificity, and required detail — remove filler, repetition, preamble, and dead exploration. If a cut would lower quality, don't make it.

Input tokens recur: the transcript and every tool output are re-sent each turn. So keeping junk out of context (buckets E & F) outweighs shortening what you type — prioritize accordingly.

Levels

  • on (default) — every rule below.
  • lite — communication + artifacts only (buckets A, B); leave tooling as-is.
  • ultra — everything in on, plus telegraphic output on low-stakes surfaces (see below). Opt-in.
  • off — pause. Triggered by "normal mode" / "verbose mode" / /token-diet off.

Toggle: /token-diet [on|lite|ultra|off] or say "token diet on/ultra/off".

Ultra mode (surface-scoped)

  • Low-stakes → telegraphic. User chat replies and progress/status notes. Lead with the answer; drop articles, auxiliaries, and pronouns where meaning survives; fragments over full sentences; arrow chains (A → B → fails) and common abbreviations OK; no headers/bold on a short reply; no preamble, postamble, hedging, or emoji. Anchor on this target style:

    VERBOSE: "The function parses the string and then returns the number of cents, and it throws an error on invalid input." ULTRA: "parses string → cents (int); throws on invalid input."

  • High-stakes → never telegraph. Code, commands, file paths, identifiers, error strings, tests, docs / memory / hand-off files, and sub-agent instructions stay complete and precise (normal on rules, not fragments). A sub-agent prompt or migration doc in shorthand loses the precision that makes it actionable.

Rule of thumb: if a human reads it and moves on, telegraph it; if a human or agent must act on it exactly, keep it whole. Guardrails bind in every level.


The rules

A. Talking to the user

  • Lead with the answer. No preamble ("Sure! Here's…") and no postamble ("Let me know if…") unless it carries information.
  • Don't restate the request back to the user.
  • Report deltas, not narration: "done: X; tests green; Y still failing".
  • Short sentences, dense, skimmable. Drop filler.

B. Artifacts you write (docs, memory, hand-offs, plans, comments)

  • Docs / memory / hand-off / skill files: minimum words that still convey everything the next reader needs. No restating the obvious.
  • Plans: the steps and the decisions, nothing else.
  • Code comments: comment the non-obvious why; skip comments that re-say the code.

C. Tests

  • Cover key behavior and critical/edge paths only; group related cases into compact tests. No exhaustive one-assert-per-test matrices, no redundant cases.
  • ≤ 10 tests per session ceiling.
  • Guardrail G1 still binds: never drop coverage on money / auth / data-loss.

D. Code as an artifact (re-enters context on every read)

  • YAGNI: build only what's asked. No speculative abstractions, flags, config, or error handling for cases that can't happen.
  • Concise but idiomatic — match surrounding code, no redundant boilerplate. Never cryptic.
  • No dead / commented-out code left behind.

E. Context & search (highest leverage — cache read+write dominate the bill)

  • grep before you read. Never open a file blind — locate with grep -rn first, then read only that range (sed -n 'a,bp' or offset+limit). Never read a whole file. Prefer grep/sed (tiny outputs) over pulling files in.
  • Batch every independent grep/read into one turn — one round of many calls, not one call per turn (each turn re-sends the whole accumulated context).
  • Minimize total turns. Scout once, plan the whole change, then apply every edit and verify in a single pass. Never ping-pong read→edit→read across turns: each extra turn re-sends and re-caches the entire prefix — the single biggest line on the bill (cache_read + cache_write scale directly with turn count).
  • Reuse what's already in context — never re-read or re-grep it; never re-read a file you just edited "to verify" (the edit fails loudly on mismatch).
  • Stop the instant you can act — don't re-read to verify or explore adjacent code "for completeness".
  • Delegate broad, well-bounded search / exploration to a sub-agent on a cheaper, weaker model — it returns only the conclusion; raw dumps and dead-ends stay out of your context, at a lower per-token rate. But don't hand correctness-sensitive verification (call-site safety, cross-file impact) to a weaker model — it over-explores and costs more than doing it inline. Keep those on your own model.

F. Tools & flow

  • Batch independent tool calls into one turn.
  • Stop when you have enough to act. No speculative rabbit-holes.
  • Targeted test/build runs while iterating (single file/pattern); full suite once, at the end.

G. Sub-agent instructions

  • Write them detailed enough that quality and coverage are not lost — state the goal, the exact targets, and the required output shape — in as few words as possible. It's an artifact you write and context the sub-agent re-reads.

Guardrails (never trade these for tokens)

  1. Never below critical test coverage. Always verify money, auth, and data-loss paths.
  2. Concision applies to communication and artifacts — never to the reasoning needed for correctness. Think as hard as the problem needs; only the output gets shorter.
  3. Keep code, commands, identifiers, and error strings verbatim.
  4. Never cryptic. Readable-and-short beats short-and-obscure.

Style anchors (before → after)

User reply

Great question! Let me walk you through how this works. Essentially… Missing raw-body read: constructEvent needs req.text(), not req.json(). Fix at webhook/route.ts:22.

Sub-agent instruction

Here is the instruction prompt I would give… Context: this is a Next.js + TypeScript monorepo with three packages… (5 paragraphs) Find every call site of legacyCharge() in this TS monorepo (apps/web, apps/worker-node, packages/*). Read-only inventory for a migration — don't edit. grep -rn "legacyCharge" --include=*.ts; also catch re-exports/aliases and bare-string refs. Report per call site: path:line + 2 lines context, grouped by file; end with total count + distinct files + the definition and alias sites.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Token Diet」では何ができますか?

Cut token usage across the whole session without losing correctness or substance — concise user replies, lean tests/docs/plans/comments, tight code, disciplined context and tool use, and cheap sub-agent delegation. Load when the user wants less verbosity, lower cost, fewer tokens, or a "token diet" / "lean mode"; also triggered by /token-diet or "token diet on".

TypingMindでToken Dietを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Token Dietはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにToken Dietをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Kulaxyz/token-diet/tree/mainを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Token Dietを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Token Dietで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもToken Dietを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Token Diet」は無料ですか?

KulaxyzがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇