toon

A compact data format for representing structured information passed to language models. It uses short punctuation-based forms for key-value pairs, arrays, ordered lists, and nested objects.

In plain words
What is it for?
Use it to encode simple objects, values containing spaces, unordered arrays, ordered lists, and nested data when sending structured information to an LLM.
Why use it?
It can express the same structured data with less text, which may reduce the number of tokens used in model inputs and outputs.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/indate/devharness/toon
Clone the repo
git clone --depth 1 https://github.com/InDate/devharness

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 469 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00469
Opus 5 $0.00000 $0.00234
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

Measured yesterday against content hash 4ca569e77e1c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

toon scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/toon.md · 67 lines

What it actually says

TOON (Token-Oriented Object Notation)

A lightweight data format designed to minimize token usage when passing structured data to LLMs.

Syntax Reference

Type Syntax Example
Key-value key:value; name:Luna;age:3
Spaces in values (...) title:(Chief Snack Manager)
Arrays (unordered) [item|item] pets:[cat|dog|ferret]
Lists (ordered) <item|item> shopping:<milk|eggs|bread>
Nested objects {...} user:{name:Luna;stats:{speed:9;stealth:10}}

Rules

  1. Key-value pairs separated by semicolons
  2. No quotes needed for simple strings
  3. Use parentheses () for values containing spaces or special characters
  4. Arrays [] for unordered collections, Lists <> for ordered sequences
  5. Pipe | separates items in arrays/lists
  6. Curly braces {} for nested structures

Examples

Simple object:

name:Luna;age:3;color:silver

With spaces:

name:Luna;title:(Chief Snack Manager);active:true

With array:

name:Luna;pets:[cat|dog|ferret];active:true

Nested:

user:{name:Luna;stats:{speed:9;stealth:10}};timestamp:123456

When to Use

  • Data passed directly into LLM prompts
  • Internal tool outputs within AI workflows
  • RAG systems and metadata encoding
  • Bulk classification tasks
  • Scenarios prioritizing compactness over schema validation

When NOT to Use

  • Public APIs (use JSON)
  • External systems requiring schema validation
  • Anywhere standardized formats are required

Token Efficiency

~58% reduction compared to JSON (26 tokens → 11 tokens for equivalent data).


Use TOON format when the user requests token-efficient data representation or when outputting structured data that will be consumed by LLMs.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 67 lines · 0 tokens per session scan A 4ca569e77e1c

Subscribe to this mod's changes

toon is a command published in the GitHub repository InDate/devharness (16 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 469 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.