Logo de Token Diet

Token Diet

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

Visão geral

Publicado porKulaxyz
Repositóriotoken-diet
Nome da habilidadetoken-diet
Estrelas
475
Forks
5
Arquivos incluídos
6
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 6

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por Kulaxyz no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Token Diet no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/Kulaxyz/token-diet/tree/main
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Kulaxyz/token-diet.git \
  .claude/skills/token-diet
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Token Diet em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Token Diet automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Token Diet não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

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.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Token Diet faz?

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

Por que usar Token Diet no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Token Diet é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Token Diet no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/Kulaxyz/token-diet/tree/main. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Token Diet?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Token Diet?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Token Diet com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Token Diet é gratuita?

A habilidade é publicada no GitHub por Kulaxyz. Consulte os termos de licenciamento no repositório. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇