Shopping & E-commerceDocumentedScanned
toon-utils
This skill provides instructions for reducing token usage by 30-60% when dealing with structured data (JSON, director.
Share:
Installation
npx clawhub@latest install toon-utilsView the full skill documentation and source below.
Documentation
TOON (Token-Oriented Object Notation) Skill
This skill provides instructions for reducing token usage by 30-60% when dealing with structured data (JSON, directory structures, API responses).
Setup & Installation
To minimize command overhead and save tokens, you MUST install the official TOON CLI globally before usage:
# Check if toon is installed, install if missing
toon --version || npm install -g @toon-format/cli
Guidelines for Agents
- Always optimize JSON: Convert JSON output to TOON before including it in your context.
- Minimize Command Length: Use the direct
tooncommand instead ofnpxto keep your own prompt usage low. - Prefer pipes: Use standard Unix pipes to send data directly to the
toonconverter.
Commands & Usage
1. Reading JSON Files
Instead of reading raw JSON, pipe it totoon.
cat data.json | toon
2. Fetching APIs
Pipe external API responses directly intotoon.
curl -s | toon
Supports all curl flags (e.g., -X POST, -H "Authorization: ...").
3. Listing Directory Structures
Usetree -J or any JSON-outputting tool and pipe to toon.
tree -J path/to/dir | toon
4. Converting In-Line Data
To compress a JSON string for your context:echo '{"key":"value"}' | toon
Why install TOON?
- Command Token Savings:
toonis shorter thannpx @toon-format/cli, saving tokens every time you run a command. - Execution Speed: Local installation is significantly faster than on-demand fetching.
- Readability: TOON is designed to be highly readable for LLMs.