token-optimizer_skill

This skill reduces token count in prompts, docs, and prose while preserving meaning, improving LLM context and readability.
  • Python

9

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill georgekhananaev/claude-skills-vault --skill token-optimizer

  • SKILL.md9.5 KB

Overview

This skill reduces token count in prompts, documentation, and prose while preserving meaning and intent. It provides layered compression (light, medium, heavy), document formatting rules, TOON data serialization for structured payloads, and prose clarity guidance based on Strunk-style principles. Use it to shrink LLM context, speed up iterations, and produce clearer human-facing text.

How this skill works

The optimizer detects input type (prompt, doc, prose, or structured data) and applies targeted transformations: remove filler phrases, compress lists and headings, abbreviate patterns, or convert JSON/YAML/XML into TOON. It reports estimated token savings and supports configurable compression levels (light/medium/heavy) so you can trade readability for maximum token reduction. Sensitive values and exact code/stack traces are preserved per "never compress" rules.

When to use it

  • Compress prompts longer than ~1500 tokens or with redundant phrasing
  • Shrink documentation or READMEs before feeding into an LLM context window
  • Tighten commits, PR descriptions, error messages, and user-facing prose
  • Serialize JSON/YAML/XML payloads into TOON when sending data to models
  • Maximize throughput or lower cost by minimizing token usage

Best practices

  • Choose compression level: Light for humans, Medium for LLM contexts, Heavy for max savings
  • Always preserve secrets, URLs, version numbers, code blocks, and stack traces
  • Convert structured data to TOON but keep value strings exact (never mutate sensitive tokens)
  • Run a quick human review on heavy compressions to ensure clarity where needed
  • Use standardized abbreviations and symbols consistently across a project

Example use cases

  • Compress a multi-paragraph prompt to a Goal/Context/Constraints bullet list for an LLM
  • Convert API response JSON into TOON to reduce tokens by ~40% when querying a model
  • Shorten long docs and tables by abbreviating headers, compressing lists, and tightening prose
  • Rewrite verbose commit messages into specific, active-voice summaries
  • Transform verbose error messages into concise error codes with actionable steps

FAQ

No. The tool preserves auth tokens, URLs, version numbers, code blocks, SQL, and stack traces by design.

How much token savings can I expect?

Typical savings: Light 20-30%, Medium 40-50% (default for LLM use), Heavy 60-70% for symbolic compression.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational