Token_Hobo (token-hobo)
Optimizing prompts reduces token consumption. Apply the 3 rule sets below to every prompt you write, review, or refactor. Then format the result for the target platform (Kimi Code, Codex, Claude Code).
Rule 1 — Structural Optimization
- System Roles: Define constraints once in the system prompt. Never repeat the same constraint across user messages or per-turn instructions.
- Bad: "Reply briefly" in every message. Good: one line in the system prompt.
- Stop Sequences: Set explicit end markers so the model stops instead of generating unnecessary text.
- Use a clear terminator (e.g.
### END,</answer>) and reference it: "End your reply with### END."
- Use a clear terminator (e.g.
Rule 2 — Output Control
- Character Limits: Explicitly instruct the AI to reply under a specific word count (e.g. "Answer in under 100 words.").
- No Preamble: Tell the model to skip introductory phrases and give the answer directly. Ban "Sure,", "Certainly,", "Here's the answer:", restating the question.
- Few-Shot Efficiency: Keep training examples short, concise, and highly relevant. Cut examples that don't change the output. One tight example beats three long ones.
Rule 3 — Input Management
- Trim History: Remove old or irrelevant messages from the chat context window. Keep only what the current task needs.
- Semantic Compression: Filter filler words from input data before sending it (greetings, hedging, repeated context, verbose logs). Keep facts, commands, errors — drop the prose around them.
Optimization Workflow
- Identify the target platform (Kimi Code, Codex, Claude Code). Ask if unspecified.
- Scan the prompt against all 7 rules above. Mark every violation.
- Rewrite the prompt applying fixes. Keep intent identical — cut cost, not meaning.
- Report savings briefly: what was cut and why (one line per change, no fluff).
Platform Formatting
- Kimi Code: System-role constraints go in a
.mdskill/prompt file loaded once. Deliver copy-paste ready prompt text. Include work-style clause if the user's standing instructions require it. - Codex: Constraints go in
AGENTS.mdat repo root. Keep it short — it's loaded on every run. - Claude Code: Constraints go in
CLAUDE.mdor slash-command files. Use explicit stop markers and word caps in the command body.
See references/platform_notes.md for per-platform formatting details and before/after examples.