toon

Convert JSON data into compact TOON notation to reduce token usage.

68|1|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/knoopx/pi --skill toon-knoopx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: toon
Source: https://github.com/knoopx/pi/tree/main/agent/skills/toon
Command: npx skills add https://github.com/knoopx/pi --skill toon-knoopx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps reduce JSON payload sizes by converting JSON into a compact TOON notation, making data easier to inspect and cheaper to transmit to LLMs.

Core Features & Use Cases

  • Token-efficient JSON: Converts standard JSON into TOON to minimize token usage in prompts.
  • CLI-based workflow: Operates via the Toon CLI for easy scripting and automation.
  • Use Case: When dealing with large JSON APIs or logs, convert payloads to TOON to save tokens and bandwidth.

Quick Start

Use the toon CLI to convert data.json to output.toon, or pipe data from streams to generate compressed representations.

Frequently Asked Questions about toon

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce JSON token usage when preparing large API payloads for LLM prompts?

You can reduce JSON token usage by converting standard JSON data into a compact TOON notation. This format minimizes token consumption in AI prompts, making large API payloads significantly cheaper to transmit and easier for LLMs to process.

What is the best way to compress JSON data for AI prompts via command line?

The best way to compress JSON data for AI prompts is using the Toon CLI to encode standard JSON into compact TOON notation. You can convert files directly or pipe data streams to generate compressed representations for your LLM workflows.

Can I convert compact TOON notation back to standard JSON?

Yes, the Toon CLI supports decode modes to convert compact TOON notation back into standard JSON. You can easily reverse the encoding process to restore your original JSON data structure when needed.

Does the Toon CLI provide token statistics for converted JSON payloads?

Yes, the Toon CLI provides token statistics to measure token reduction when converting JSON to compact TOON notation. This allows you to verify exactly how much token economy you gain before passing data to LLM prompts.

Can I fold JSON keys with a delimiter to control the compact representation?

Yes, the Toon CLI supports optional key folding with a delimiter feature to control representation. This allows you to further compact JSON keys and optimize token savings when encoding large data payloads.

When should I avoid using compact encoding for JSON data?

You should avoid compact encoding when your downstream system requires strict JSON syntax or lacks a compatible TOON decoder. Since TOON is a specialized notation, target systems must support decoding to interpret the compressed payload correctly.