token-formatter
Convert verbose docs/markdown/text into token-efficient formats. Use when user wants to reduce token count, compress content for LLM context, or optimize for AI consumption.
npx skills add majiayu000/claude-skill-registry --skill token-formatter-georgekhananaev-claude-skills-vault-f17572b9 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Token Formatter Skill Convert verbose documentation, markdown, and text files into token-efficient formats while preserving essential information. ## When to Use Invoke this skill when: - User wants to reduce token count in documentation - User needs to compress markdown/text for LLM context - User asks to optimize content for AI consumption - Commands: `/token-format`, `/compress`, `/toon` ## Token Reduction Rules ### 1. Remove Redundancy **Before:** ```markdown ## Introduction In this document, we will explore and discuss the various different ways that you can implement authentication in your application. We will cover multiple approaches and methods that are available to developers. ``` **After:** ```markdown ## Auth Implementation Methods covered: - JWT tokens - Session-based - OAuth2 ``` ### 2. Use Symbols & Abbreviations | Verbose | Compressed | |---------|------------| | function | fn | | return | ret | | string | str | | number | num | | boolean | bool | | array | arr | | object | obj | | parameter | param | | configuration | config | | environment | env | | authentication | auth | | authorization | authz | | application | app | | database | db | | repository | repo | |
- When to Use
- Token Reduction Rules
- 1. Remove Redundancy
- 2. Use Symbols & Abbreviations
- 3. Compress Lists
- 4. Remove Filler Words
- 5. Structured Data Format
- 6. Code Block Compression
- 7. Table Compression
- 8. Heading Compression
- 9. URL & Path Compression
- 10. Error Message Compression
- Compression Process
- Step 1: Analyze Content
pip install tiktoken Compress a file python .claude/skills/token-formatter/scripts/compress.py input.md > compressed.md Compress input from pipe cat input.md | python .claude/skills/token-formatter/scripts/compress.py --level 2 Show stats python .claude/skills/token-formatter/scripts/compress.py input.md --stats Count tokens in files python .claude/skills/token-formatter/scripts/count_tokens.py document.md README.md Count tokens from pipe
What does the token-formatter skill do?
Convert verbose docs/markdown/text into token-efficient formats. Use when user wants to reduce token count, compress content for LLM context, or optimize for AI consumption.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill token-formatter-georgekhananaev-claude-skills-vault-f17572b9 --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.
