toon-syntax

Convert JSON-like data into compact, token-efficient TOON notation.

1|Updated May 6, 2025
One-click install
npx skills add https://github.com/riskirills66/dofiles --skill toon-syntax
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: toon-syntax
Source: https://github.com/riskirills66/dofiles/tree/main/.config/opencode/skills/toon-syntax
Command: npx skills add https://github.com/riskirills66/dofiles --skill toon-syntax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TOON provides a compact, human-readable encoding for JSON-like data, dramatically reducing token usage in prompts and data interchange.

Core Features & Use Cases

  • Indentation-based syntax that replaces braces and brackets with clear structure.
  • Minimal quoting rules to save tokens while preserving readability.
  • Explicit array lengths via [N] headers and support for tabular arrays.
  • Flexible delimiters (comma, tab, or pipe) to optimize token efficiency across contexts.
  • Use Case: encode structured data for AI prompts, logs, or data exchange with strict size constraints.

Quick Start

Encode a simple JSON object into TOON by applying indentation, using [N] array headers for lists, and minimizing quotes.

Frequently Asked Questions about toon-syntax

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

FAQPage Schema
How do I reduce token usage when embedding JSON data in LLM prompts?

You can reduce token usage in LLM prompts by encoding JSON data into a compact notation using indentation, explicit array lengths, and minimal quoting to save tokens. This approach replaces bulky braces and brackets with clear structural hierarchy.

What is the best way to serialize structured data for token-constrained AI workflows?

The best way to serialize structured data for token-constrained AI workflows is using a compact, token-efficient notation. It converts JSON-like data by applying indentation, defining objects and arrays with clear rules, and supporting optional key folding for compact paths.

Does TOON support custom delimiters for data interchange serialization?

TOON supports flexible delimiters for data interchange, allowing you to use commas, tabs, or pipes. This delimiter flexibility helps optimize token efficiency across different contexts and structured data encoding environments.

How do I encode arrays compactly to save tokens in prompt engineering?

You can encode arrays compactly to save tokens by using explicit [N] array length headers instead of traditional brackets. This notation also supports tabular arrays, dramatically reducing token usage while preserving data readability.

Can I use minimal quoting rules for JSON data encoding in strict size constraints?

You can use minimal quoting rules for JSON data encoding to save tokens while preserving readability. By applying indentation-based syntax and only quoting where strictly necessary, you can effectively interchange structured data under strict size constraints.

What are the limitations of indentation-based data encoding for LLM prompting?

Limitations of this indentation-based data encoding include relying heavily on consistent whitespace for structural hierarchy instead of explicit braces. You should not use this approach if your downstream parser cannot strictly preserve indentation or tab characters.