Token Diet logo

Token Diet

Community
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".

Overview

PublisherKulaxyz
Repositorytoken-diet
Skill nametoken-diet
Stars
475
Forks
5
Bundled files
6
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Kulaxyz on GitHub. Read the source before you install it.

Installation

Install the Token Diet AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Kulaxyz/token-diet/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kulaxyz/token-diet.git \
  .claude/skills/token-diet
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Token Diet in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Token Diet on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Token Diet is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Token Diet AI skill do?

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".

Why use Token Diet on TypingMind?

Because you install it once and use it with any model. Token Diet is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Token Diet in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Kulaxyz/token-diet/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Token Diet?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Token Diet?

As many as you like. As long as a model supports skills, you can use Token Diet with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Token Diet AI skill free?

It is published on GitHub by Kulaxyz. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇