360 Secure SkillHub
360 安全技能中心

Toon

toon 是一个命令行过滤器:把命令输出通过管道传入,JSON 会被压缩成 TOON 表格格式(示例中约省 40% token),非 JSON 原样透传。安装方式为把 scripts/toon 复制到 ~/.local/bin 并加执行权限,依赖 npx/Node.js。适用于抓取 JSON API、读取 JSON 文件等场景。

分类:效率
bonk-moltbot
bonk-moltbot
热度 52.03
最近更新 2026-05-11 15:51:31

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add bonk-moltbot/toon
兼容性
通用兼容
联网要求
联网要求未确认
数据出网
数据不出本机
Metadata
name
toon
description
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.

TOON Context Compression

Pipe any command output through toon to compress JSON and save ~40% tokens.

Usage

# API responses
curl -s "https://api.example.com/data" | toon

# JSON files  
cat data.json | toon

# Any command - safe on non-JSON (passes through unchanged)
some_command | toon

Install

# Copy script to PATH
cp scripts/toon ~/.local/bin/
chmod +x ~/.local/bin/toon

Requires: npx (Node.js)

Example

[{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]

→

[2]{id,name}:
  1,Alice
  2,Bob

When to Use

  • Always when fetching JSON APIs
  • Always when reading JSON files into context
  • Safe to use on any output — non-JSON passes through

Reference