Compact, schema-aware JSON encoding that cuts LLM prompt tokens by roughly 40 percent.

CCM score
48 of 100
skills.sh installs
1.3K
GitHub stars
98
last updated
Jul 14, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers encoding and decoding between JSON and TOON through a JavaScript API and a toon CLI
  • Includes an encode and decode API, pipe support, --pretty and --stats flags, and token-count comparison utilities
  • Encodes uniform object arrays as compact tables with declared field headers and array length markers
  • Designed for prompt construction, RAG context injection, and bulk data passed to LLM calls

Install

$ npx -y skills add reason-machines/trending-skills --skill toon-format -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Token-Oriented Object Notation (TOON)

Skill by ara.so — Daily 2026 Skills collection.

TOON is a compact, human-readable encoding of the JSON data model that minimizes tokens for LLM input. It combines YAML-style indentation for nested objects with CSV-style tabular layout for uniform arrays, achieving ~40% token reduction while maintaining or improving LLM comprehension accuracy.

Installation

# npm
npm install @toon-format/toon

# pnpm
pnpm add @toon-format/toon

# yarn
yarn add @toon-format/toon

CLI

# Install globally
npm install -g @toon-format/toon

# Convert JSON file to TOON
toon encode input.json
toon encode input.json -o output.toon

# Convert TOON back to JSON
toon decode input.toon
toon decode input.toon -o output.json

# Pipe support
cat data.json | toon encode
cat data.toon | toon decode

# Pretty-print JSON output
toon decode input.toon --pretty

# Show token count comparison
toon encode input.json --stats

Core API

encode / stringify

import { encode, decode } from '@toon-format/toon';

Details

Repository
github.com/reason-machines/trending-skills
Categories
Memory & Context, AI Agents & LLM Apps
First seen
Apr 16, 2026

More from reason-machines/trending-skills

All 163

Similar to Toon Format

More Memory & Context