Agent skill · Data & Analytics

token-optimizer

Reduce token count in prompts, docs, and prose. Covers prompt compression (40-60% savings), doc formatting, TOON data serialization, and Strunk's prose clarity rules. Use when compressing prompts, optimizing docs for LLM context, or writing clear technical prose.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill token-optimizer --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 9 KB
Bundled scripts: none
Declared author: George Khananaev
Path: skills/ai-llm/token-optimizer/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Token Optimizer Reduce tokens in prompts, docs, and prose while preserving meaning. ## When to Use - Prompt >1500 tokens or contains redundant phrasing - Docs/markdown need compression for LLM context - Writing prose for humans (docs, commits, PRs, error messages) - Converting JSON/YAML/XML data for LLM input (TOON) ## Quick Routing | Input Type | Go To | |-----------|-------| | User prompt / chat message | Section 1: Prompt Compression | | Docs / markdown / README | Section 2: Doc Formatting | | Commits / PRs / error messages | Section 3: Prose Clarity | | JSON / YAML / XML data | Section 4: TOON Format | ## Compression Levels | Level | Reduction | Use When | |-------|-----------|----------| | Light | 20-30% | Keep readability, human-facing prose | | Medium | 40-50% | Default for LLM context | | Heavy | 60-70% | Max compression, symbols over words | --- ## 1. Prompt Compression ### Process 1. Identify core intent 2. Extract essential context only 3. Remove filler phrases 4. Apply abbreviations & symbols 5. Output compressed version w/ token savings % ### Remove Phrases | Remove | Transform To | |--------|--------------| | "Please help me with" | (delete) | | "I need you to" | (d

What's inside
Steps it walks through
  1. When to Use
  2. Quick Routing
  3. Compression Levels
  4. 1. Prompt Compression
  5. Process
  6. Remove Phrases
  7. Transform Patterns
  8. Example
  9. 2. Doc Formatting
  10. Remove Filler Words
  11. Compress Lists
  12. Structured Data Over Prose
  13. Heading Compression
  14. Table Compression
Ships with 1 file
  • metadata.json
Commands it runs
Compress text
python scripts/compress.py input.md > compressed.md
python scripts/compress.py input.md --stats
python scripts/compress.py --level 2 < input.md
Count tokens
python scripts/count_tokens.py document.md
Compress prompt
python scripts/compress_prompt.py "your prompt text"
python scripts/compress_prompt.py --file prompt.txt --level heavy
More from claude-skill-registry
All skills →
About this skill
What does the token-optimizer skill do?

Reduce token count in prompts, docs, and prose. Covers prompt compression (40-60% savings), doc formatting, TOON data serialization, and Strunk's prose clarity rules. Use when compressing prompts, optimizing docs for LLM context, or writing clear technical prose.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill token-optimizer --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going