Help us improve
Share bugs, ideas, or general feedback.
From to-toon
Converts structured data (JSON, XML, YAML) to compact TOON format (Token-Oriented Object Notation) with 30-60% token savings. Use when compressing API responses, Figma MCP output, config files, or any structured data for token efficiency.
npx claudepluginhub alexey1312/agents-plugins --plugin to-toonHow this skill is triggered — by the user, by Claude, or both
Slash command
/to-toon:to-toonThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Convert any structured data (JSON, XML, YAML) to compact TOON format for efficient LLM processing.
Provides syntax rules, quoting conventions, examples, and validation for writing, parsing, and generating TOON files including org-patterns.toon and JSON conversions.
Transforms, manipulates, analyzes JSON: parse/validate, reshape/flatten/unnest, merge/filter/map, query (JSONPath/JMESPath), convert (CSV/YAML/XML), diff/compare.
Creates, reads, edits, and analyzes .docx files using docx-js for new documents, pandoc for text extraction, Python scripts for XML unpacking/validation/changes, and LibreOffice for conversions.
Share bugs, ideas, or general feedback.
Convert any structured data (JSON, XML, YAML) to compact TOON format for efficient LLM processing.
# Direct conversion
npx @toon-format/cli input.json -o output.toon
# From stdin
echo '{"name": "Ada", "age": 30}' | npx @toon-format/cli
# With token savings stats
npx @toon-format/cli data.json --stats
npx @toon-format/cli data.toon -o output.json
# Use included script for XML (e.g., Figma MCP output)
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh input.xml
# Or manual: XML → JSON → TOON
cat input.xml | node ${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-json.mjs | npx @toon-format/cli
# Encode JSON to TOON (auto-detected by extension)
npx @toon-format/cli input.json -o output.toon
# Decode TOON to JSON (auto-detected)
npx @toon-format/cli data.toon -o output.json
# Pipe from stdin
cat data.json | npx @toon-format/cli
echo '{"name": "Ada"}' | npx @toon-format/cli
# Output to stdout
npx @toon-format/cli input.json
# Show token savings
npx @toon-format/cli data.json --stats
TOON combines YAML-like syntax with CSV-style tabular arrays:
# Key-value pairs
name: Ada
age: 30
# Nested objects
address:
city: Berlin
zip: 10115
# Uniform arrays (most compact!)
users[3]{id,name,email}:
1,Alice,alice@example.com
2,Bob,bob@example.com
3,Carol,carol@example.com
| Input Format | JSON Tokens | TOON Tokens | Savings |
|---|---|---|---|
| Simple object | 50 | 30 | 40% |
| Array of 10 objects | 500 | 200 | 60% |
| Nested config | 1000 | 450 | 55% |
| Figma design context | 10000 | 4000 | 60% |
curl -s https://api.example.com/users | npx @toon-format/cli --stats
npx @toon-format/cli package.json --stats
npx @toon-format/cli tsconfig.json -o tsconfig.toon
After get_design_context call:
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh figma-output.xml --stats
cat users.json | npx @toon-format/cli > users.toon
Full pipeline for XML data (Figma, HTML, SVG, etc.):
# Basic usage
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh input.xml
# With output file
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh input.xml -o output.toon
# Show stats
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh input.xml --stats
# JSON only (skip TOON step)
${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh input.xml --json-only
Convert XML to JSON (Node.js):
cat input.xml | node ${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-json.mjs
When you receive structured data, consider:
npx @toon-format/cli directlyxml-to-json.mjs then CLI# Add to ~/.zshrc or ~/.bashrc
alias toon='npx @toon-format/cli'
alias xml2toon='${CLAUDE_PLUGIN_ROOT}/scripts/xml-to-toon.sh'
@read reference.md for detailed format specification and edge cases.