toonlisted
Install: claude install-skill hackermanishackerman/claude-skills-vault
# 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,"price":29.99},{"id":2,"item":"Pen","qty":10,"price":1.99}]}
```
**TOON:**
```toon
orders[2]{id,item,qty,price}:
1,Book,2,29.99
2,Pen,10,1.99
```
**Neste