# Token Hobo

> Prompt optimization for reducing token consumption in AI coding agents. Use when writing, reviewing, or refactoring prompts for Kimi Code, Codex, or Claude Code to cut token cost — e.g. "optimize this prompt", "make this prompt cheaper", "reduce token usage", "tighten this system prompt". Applies three rule sets — Structural Optimization (system roles, stop sequences), Output Control (character limits, no preamble, few-shot efficiency), and Input Management (trim history, semantic compression) — and outputs platform-formatted prompts.

- Skill: `kimiguel/token-hobo` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add kimiguel/token-hobo`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kimiguel/token-hobo/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: KiMiGuel (https://skillmd.com/u/kimiguel)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kimiguel/token-hobo

---


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

## 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

1. Identify the target platform (Kimi Code, Codex, Claude Code). Ask if unspecified.
2. Scan the prompt against all 7 rules above. Mark every violation.
3. Rewrite the prompt applying fixes. Keep intent identical — cut cost, not meaning.
4. Report savings briefly: what was cut and why (one line per change, no fluff).

## Platform Formatting

- **Kimi Code**: System-role constraints go in a `.md` skill/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.md` at repo root. Keep it short — it's loaded on every run.
- **Claude Code**: Constraints go in `CLAUDE.md` or slash-command files. Use explicit stop markers and word caps in the command body.

See [references/platform_notes.md](references/platform_notes.md) for per-platform formatting details and before/after examples.

