GreenPT Docs
Token compression

Token compression

Coding-agent skills that cut LLM token usage — and cost — without losing correctness.

Token compression tools make AI coding agents emit less — less code, less prose — while keeping correctness intact. Fewer generated tokens means lower API cost, faster responses, and lower energy use per request, in line with GreenPT's sustainability goals.

Three open-source skills, from most to least comprehensive:

ToolFocusHeadline
HoneyLess code and less prose, plus dense agent-to-agent handoffs~49% fewer code tokens at 98% of baseline quality
PonytailMinimal code (YAGNI)~54% less code (up to 94%), ~20% cheaper, ~27% faster
CavemanTerse prose~75% fewer output tokens, full technical accuracy

Honey combines what Ponytail (minimal code) and Caveman (terse prose) do separately, then adds auto-intensity, safety carve-outs, and compressed subagent handoffs.

Use via the API

You don't need a coding agent to benefit: the Chat Completion API serves the same rulesets as compression variants of glm-5.2. Pick one by model id. These ids carry their own system prompt; if your request sends one too, the two are merged into a single system message with yours first. Full reference: Compression models.

{
  "model": "glm-5.2-honey",
  "messages": [{ "role": "user", "content": "Why does my React component re-render?" }]
}

Use glm-5.2-caveman, glm-5.2-honey or glm-5.2-ponytail, each with an optional -lite or -ultra suffix to dial the intensity down or up. The injected ruleset (roughly 275 to 565 tokens depending on the family) is billed as input like the rest of your prompt.

The headline figures above are each skill's own benchmark, measured on a coding agent. GreenPT measured the same rulesets as model ids against a raw glm-5.2 chat answer, where the verbose baseline leaves more to cut. Combining both sources gives a plausible span of 22% to 87% fewer output tokens for Caveman, 6% to 77% for Honey and 22% to 94% for Ponytail. Each family comes in three intensities — -lite at the low end of its range, unsuffixed in the middle, -ultra at the high end. Per-family numbers, methodology and guidance on which to pick are in Compression models.

On this page