toon
Compress JSON data to TOON format for ~40% context savings. Use when fetching APIs, reading JSON files, or any task outputting structured data. Pipe any output through `toon` - JSON gets compressed, non-JSON passes through unchanged.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/bonk-moltbot/toonWhat This Skill Does
The toon skill provides a powerful utility for OpenClaw users to minimize token overhead when working with JSON-heavy data. By piping command outputs through toon, users can compress structured data into the TOON format, which is specifically designed to strip away redundant schema information and whitespace that typically consumes unnecessary context window space. Achieving approximately 40% token savings, this utility acts as a smart filter: it intelligently identifies valid JSON, compresses it according to the TOON specification, and passes through any non-JSON data untouched. This ensures a seamless integration into existing shell workflows without breaking scripts or disrupting standard output streams.
Installation
To integrate toon into your OpenClaw environment, ensure you have Node.js and npx installed on your system. You can install the skill directly via the ClawHub command-line interface:
clawhub install openclaw/skills/skills/bonk-moltbot/toon
Alternatively, for manual installation, download the script from the source repository, move it to a directory within your system's PATH (such as ~/.local/bin/), and grant execution permissions using chmod +x.
Use Cases
- API Integration: Use
toonto compress payloads from REST API calls before passing them to the agent for analysis, extending the amount of historical data the agent can reference. - Data Auditing: When reading large local configuration or data files (e.g.,
package.jsonor complex database dumps),toonallows you to inject significantly larger data sets into the agent's memory without hitting context limits. - Log Processing: Apply
toonwhen aggregating structured JSON logs to maintain a cleaner, more concise conversation history.
Example Prompts
- "Fetch the latest user statistics from the API, pipe it through
toon, and identify the top three most active users." - "Read the
analytics.jsonfile usingcatandtoon, then summarize the error trends found in the report." - "Run
curl https://api.example.com/v1/data | toonand tell me if there are any critical anomalies in the response."
Tips & Limitations
- Safety First: The
toontool is non-destructive. If it receives non-JSON input, it simply acts as a passthrough, meaning you can safely pipe it into any existing pipeline without concern for data loss. - Context Optimization: While it saves 40% of tokens, remember that the agent still needs to 're-parse' the compressed format. Ensure your prompt mentions that the data is in TOON format if the agent struggles to read the specific syntax.
- Formatting: TOON is a lossy-style compression regarding whitespace and key repetition; do not use it for formatting files you intend to write back to the disk, as it strips original JSON structure.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-bonk-moltbot-toon": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: code-execution