toon-formatter

Convert structured data arrays and tables into TOON v2.0 format with selectable delimiters and array types.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/synqing/Lightwave-Ledstrip --skill toon-formatter-synqing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: toon-formatter
Source: https://github.com/synqing/Lightwave-Ledstrip/tree/main/.claude/skills/toon-formatter
Command: npx skills add https://github.com/synqing/Lightwave-Ledstrip --skill toon-formatter-synqing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires zig.

What problem does it solve?

TOON v2.0 aggressively reduces token usage for structured data, enabling lean prompts and faster processing.

Core Features & Use Cases

  • Three array types: Tabular, Inline, Expanded for different data shapes.
  • Three delimiters: Comma, Tab, Pipe to fit various outputs.
  • Key folding: Flatten nested data to maximize savings.
  • Usage scenarios: RAG pipelines, API responses, and database results.

Quick Start

Provide a dataset and show the TOON-encoded output, then compare token savings.

Frequently Asked Questions about toon-formatter

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

FAQPage Schema
How do I reduce token usage for structured data in RAG pipelines?

TOON v2.0 compresses structured data by converting arrays, tables, and API responses into a compact encoded format. It detects suitable datasets (5+ items, 60%+ field uniformity) and applies tabular, inline, or expanded array encoding with configurable delimiters to minimize token count while preserving data integrity.

What data formats does TOON encoding work with?

TOON v2.0 handles arrays, tables, logs, events, transactions, analytics records, API responses, and database results. It automatically detects structured data with uniform fields and supports three array types (tabular, inline, expanded) and three delimiters (comma, tab, pipe) to fit various output shapes.

Can I flatten nested objects when formatting structured data?

Yes. TOON v2.0 includes key folding to flatten nested objects, maximizing token savings by collapsing hierarchical data into a single level before encoding. This is especially useful for complex API responses and database results with nested fields.

When should I use TOON formatting instead of raw structured data?

Use TOON v2.0 when handling arrays with at least 5 items and consistent field structure (60%+ uniformity). It's most effective in agent workflows, tool calls, RAG systems, and batch processing where token efficiency directly reduces latency and cost without sacrificing data accuracy.

What's the difference between tabular, inline, and expanded TOON array formats?

TOON v2.0 offers three array encoding types optimized for different data shapes: tabular for dense columnar data, inline for compact single-line output, and expanded for hierarchical or sparse records. Choose based on your data structure and delimiter preference (comma, tab, or pipe).