Skip to main content
skill CX Codex

toon-format — Claude Code skill: what it does, how to install

Encodes JSON data into compact TOON syntax to trim prompt tokens by roughly 40%. Helps agents format inputs efficiently for language models.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/trending-skills --skill toon-format -a claude-code
Open on GitHub

What toon-format does

TOON transforms standard JSON structures into a lighter textual representation. Nested maps use spacing similar to YAML, while arrays of matching records collapse into comma-separated rows under a single header. Repetitive keys disappear. Stripping repetitive field names and bracket syntax lowers token consumption by around 40%.

The skill guides your agent on using the @toon-format/toon package. Run toon encode input.json in the terminal to process files. The --stats flag outputs token savings. In TypeScript, scripts import encode and decode functions directly.

Language models need a brief explanation of TOON conventions in their system instructions. Without that primer, models misread tabular rows.

What it helps with

  • shrink token overhead when feeding large JSON datasets into LLM prompts
  • serialize uniform object collections into tabular rows with shared headers
  • convert JSON files to TOON via CLI using toon encode
  • parse TOON strings back to JavaScript objects using decode

Example prompts for the agent

  • Convert users.json into TOON format and print token savings using --stats.
  • Serialize this list of recent transactions into TOON notation for the prompt.
  • Use encode from @toon-format/toon to structure the customer dataset.

How to install toon-format

1Skills CLI (Vercel)

npx skills add reason-machines/trending-skills --skill toon-format -a claude-code

2Manually: put the files in place

~/.claude/skills/toon-format/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/toon-format/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about toon-format

How do I install the toon-format skill in Claude Code?

Run npx skills add reason-machines/trending-skills --skill toon-format -a claude-code in your terminal.

What does toon-format do?

It teaches coding assistants how to encode JSON data into TOON notation, shrinking prompt size by about 40%.

How can I measure token reduction from the terminal?

Install the package globally with npm install -g @toon-format/toon and execute toon encode input.json --stats.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set139

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor