- Home
- Skills
- Georgekhananaev
- Claude Skills Vault
- Token Formatter
token-formatter_skill
- Python
5
GitHub Stars
2
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-formatter- cheatsheet.md0 B
- SKILL.md11.2 KB
Overview
This skill converts verbose docs, markdown, and text into token-efficient formats while preserving essential meaning. It trims filler, applies abbreviations and symbols, restructures prose into compact lists/params, and offers compression levels for light to heavy reduction. Use it to shrink LLM context size and lower token costs without losing critical info.
How this skill works
The skill analyzes input to detect type (docs, code, config, JSON/YAML/XML) and finds redundancy and filler. It applies ordered rules: remove filler, replace terms with abbreviations/symbols, compress lists/tables/headings, and convert structured payloads to compact formats (including TOON for JSON/YAML/XML). It validates that meaning and required values (URLs, keys, versions, formulas) are preserved.
When to use it
- You need to reduce token count for LLM prompts or context windows
- Prepare long docs/READMEs for AI consumption or summarization
- Compress JSON/YAML/XML payloads into TOON for ~40% token savings
- Optimize API docs, tables, and code blocks without altering semantics
- Create compact summaries for PR descriptions or release notes
Best practices
- Preserve all security-critical values: API keys, signatures, exact versions, legal text
- Select compression level: Light (readable), Medium (structured), Heavy (max compactness)
- Keep code syntax valid; only shorten variable names/comments where safe
- Run validation step: ensure no critical info lost and readability maintained
- Prefer structured conversion (params/tables) over aggressive prose trimming for APIs
Example use cases
- Compress a 1,000-token README to a ~300-token version for an LLM prompt
- Convert large JSON arrays to TOON before sending to the model to reduce tokens
- Transform verbose API docs into param lists and compressed code snippets for quick dev reference
- Shrink changelogs and release notes while keeping versions and migration steps intact
- Prepare a large config file for inclusion in a prompt by shortening paths and removing filler
FAQ
No—code syntax is preserved. Compression shortens comments and simplifies expressions but avoids alterations that break syntax or semantics.
What should I never compress?
Do not compress API keys/secrets, exact version numbers, legal text, mathematical formulas, error codes, or any security-critical strings.