toon
Token-Oriented Object Notation (TOON) format for LLM-optimized data encoding. Converts JSON to compact, human-readable format that minimizes tokens (~40% reduction) while improving LLM comprehension accuracy.
npx skills add majiayu000/claude-skill-registry --skill toon-georgekhananaev-claude-skills-vault-3 --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.
# TOON Format Guide ## Overview TOON (Token-Oriented Object Notation) is a compact encoding of JSON designed for LLM input. Combines YAML-style indentation w/ CSV-style tables for uniform arrays. **Key benefits:** - ~40% fewer tokens vs JSON - 73.9% accuracy vs 69.7% for JSON in retrieval tasks - Explicit length declarations for validation - Lossless JSON round-trips ## Syntax ### Objects (YAML-style indentation) ```toon user: name: John age: 30 address: city: NYC zip: 10001 ``` ### Uniform Arrays (Tabular) ```toon users[3]{id,name,email}: 1,John,john@ex.com 2,Jane,jane@ex.com 3,Bob,bob@ex.com ``` - `[N]` = array length (req for validation) - `{fields}` = column schema (declared once) ### Scalar Arrays ```toon tags[4]: api,rest,json,toon ``` ### Non-uniform Arrays (Nested) ```toon items: - id: 1 type: book meta: pages: 200 - id: 2 type: video meta: duration: 3600 ``` ## Conversion Rules ### JSON to TOON 1. **Objects** => indented key-value pairs 2. **Uniform arrays** => tabular `[N]{fields}:` format 3. **Mixed/nested arrays** => `-` list notation 4. **Scalars** => quote only when containing `,` or special chars ### Examples **JSON:** ```json {"orders":[{"id":1,"item":"Book","qty":2
- Overview
- Syntax
- Objects (YAML-style indentation)
- Uniform Arrays (Tabular)
- Scalar Arrays
- Non-uniform Arrays (Nested)
- Conversion Rules
- JSON to TOON
- Examples
- When to Use TOON
- Formats to convert → TOON:
- Do NOT convert to TOON:
- TOON sweet spot:
- Key insight:
npm install -g @toon-format/cli toon encode input.json > output.toon toon decode input.toon > output.json Validate TOON file python .claude/skills/document-skills/toon/scripts/validate.py input.toon Check JSON compatibility for TOON conversion python .claude/skills/document-skills/toon/scripts/validate.py --json input.json Quiet mode (errors only) python .claude/skills/document-skills/toon/scripts/validate.py -q input.toon Install official library
What does the toon skill do?
Token-Oriented Object Notation (TOON) format for LLM-optimized data encoding. Converts JSON to compact, human-readable format that minimizes tokens (~40% reduction) while improving LLM comprehension accuracy.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill toon-georgekhananaev-claude-skills-vault-3 --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.
