/get-toony:json-to-toonfrom get-toony
Convert a JSON file (or JSON on stdin / pasted into chat) into TOON format using the @toon-format/toon CLI. Verifies losslessness via round-trip decode and reports the token-count saving.
Ships in get-toony. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Convert one JSON document into TOON.
.json file.curl to a temp file..toon extension, in the same directory as the source. For pasted inline JSON, default to a temp file and print the result.Validate the source is well-formed JSON: python3 -c "import json,sys; json.load(open(sys.argv[1]))" <path>. If it fails, surface the parser error and stop — don't try to "fix" the JSON.
Convert: npx -y @toon-format/toon encode --input <src> --output <dst> (or pipe via stdin if the input is inline).
Round-trip check — decode the result back to JSON and compare against the source with key-order canonicalisation:
npx -y @toon-format/toon decode --input <dst> --output /tmp/toon-rt.json
python3 -c "import json; a=json.load(open('<src>')); b=json.load(open('/tmp/toon-rt.json')); import sys; sys.exit(0 if a==b else 1)"
If the round-trip differs, stop and report the diff — do not present a lossy output as success.
Token delta — count tokens on both files and report:
# Prefer ttok if available, otherwise tiktoken
npx -y ttok < <src>; npx -y ttok < <dst>
Report: original tokens, TOON tokens, absolute delta, percentage saving.
Tell the user where the file is and the token saving. If the saving is negative or trivial (<10%), point it out — TOON isn't always the right format (deeply nested or non-uniform JSON; see toon-reference).
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
6 skills in this plugin
/batch-to-toonConvert a directory of JSON / CSV / YAML files into TOON in one pass. Per-file round-trip checks, aggregate token-saving report, and a manifest so partial runs are resumable. Use when the user has a folder of structured data destined for LLM prompts./csv-to-toonConvert a CSV file into TOON. CSV is already token-efficient for flat tables, but TOON adds explicit array-length and field-header guardrails that improve LLM accuracy on the same data. Use this when the destination is an LLM prompt, not when CSV itself is the final consumer./setup-toolingInstall or verify TOON ecosystem tooling — the JS reference CLI (@toon-format/toon), Python implementations (xaviviro/python-toon, ScrapeGraphAI/toonify), the Java port (toon-format/toon-java), and adjacent JSON libraries like jdereg/json-io. Picks the right tool for the user's runtime and records what's installed in plugin config./structure-long-promptUse when the user wants to convert CLAUDE.md, a system prompt, or any long instruction file into TOON — or asks how to compress / restructure a long prose prompt. Pushes back on TOON for prose (wrong tool) and recommends XML-tag section delimiters, the Anthropic-recommended pattern for long/complex prompts. Acts as a guardrail against TOON-ifying instruction files where the format would degrade comprehension./toon-referenceReference for the TOON (Token-Oriented Object Notation) format — what it is, when it helps, when it doesn't, and how to invoke the @toon-format/toon CLI. Read this before using the other skills in this plugin if the user is unfamiliar with TOON.get-toony@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin get-toony