五层 Token 优化模型+3 个课堂 Demo——先把 Prompt 写确定,再只加载需要的工具,长对话及时压缩,重复任务做成模板和 Skill。
RRay
AI 全栈工程师、AI 产品实践者、Token 优化研究者

Token optimization is not about saying a few words less — it is about making every token that enters the model context useful. This course walks the five-layer model (cognition → input → tools → context → system) starting from whichever layer wastes the most, with 3 demos run live.
| 1 metric | 1 structure | 5 layers | 3 demos |
|---|---|---|---|
| Useful tokens ÷ total tokens | Goal / Input / Rules / Output / Limits | From knowing where the money goes to making it sustainable | Prompt diet, context slimming, log compression |
Every session delivers three things: hands-on practice, slides and notes, and homework.
The problem is usually not that you typed too much — it is that the context holds too much that has nothing to do with this task.
First, work out which blocks a single task spends tokens on, and recognize the four most common kinds of waste. Then move into the four input-layer actions, using three examples (turning a guessed metric into an executable formula, slimming a system prompt, limiting output) and one universal template to replace shorter is better with more certain is better.
Model tiering and script-first filtering; the four tool principles and RTK; the four context-layer moves (one task one session, handoff summary, fetch files on demand, let scripts do deterministic filtering); three live demos covering prompt dieting, long-conversation compression, and tool-output compression; plus two advanced ideas: Context Mode and CodeGraph.
The four system-layer habits (keep measuring, template it, batch it, stay cache-friendly); a 25-item self-check list and a four-question quick pass; the tool map and two copy-paste prompts; three closing moves (feed less, emit less, reuse more); and an extension: turn your prompt optimizer into your first Skill.
This course has 3 lessons and 1 assignment, climbing the five-layer token optimization model from the bottom up. No need to fix everything at once — start where the waste is worst.
The token composition of a single task and the two things worth remembering first; four common kinds of waste; the four input-layer actions; three example prompts and one universal template; Demo 1: the prompt diet.
Model tiering and script-first filtering; the four tool principles and RTK; the four context-layer moves; Demo 2 and Demo 3; advanced ideas — keep raw data out of the context with Context Mode, and stop Agents from digging through the repo with CodeGraph.
The four system-layer habits; the 25-item checklist and four-question quick pass; the tool map; three closing moves and the memory line; two copy-paste prompts; and an extension: turn a demo into your own Skill and publish it.
In one sentence: get the highest quality result with as few wasted tokens as possible.
Optimization is not a one-off diet but a measurable loop: find the biggest leak first, then fix it, then measure again.
What you are really reducing: model guesswork, irrelevant history, repeated background, excessive tool definitions, verbose logs, useless output, and rework.
Remember the line: cut what should be cut, split what should be split, compress what should be compressed.