toon-format
Installation
SKILL.md
TOON Format Skill
TOON (Token-Oriented Object Notation) is a compact, human-readable, schema-aware encoding of JSON designed to be easy for LLMs to read and (with good prompting) to generate. It is especially effective for uniform arrays of objects (tabular data), where keys are declared once and rows carry values.
Quick decision: should I use TOON?
Use TOON when:
- You are passing large structured context (especially arrays of objects) to an LLM and want fewer tokens.
- You want structure guardrails (
[N]counts +{fields}headers) to reduce model drift and enable validation. - You need a format that stays close to CSV’s readability but is a lossless representation of JSON.
Prefer JSON (or JSONL/CSV) when:
- You need interoperability with systems that expect standard JSON.
- Data is extremely irregular (ragged objects) and the TOON representation won’t be more compact or readable.
- The task is primarily “machine ↔ machine” with no human/LLM in the loop.
For more detail: see reference/when-to-use.md.