360 Secure SkillHub
360 安全技能中心

TOON

该 Skill 说明 TOON(Token-Oriented Object Notation)的缩进嵌套、最小引号、数组长度和表格数组语法,建议用 .toon 文件存储日志、日程和长期数据,在压缩历史或笔记时减少 token 占用;未包含解析器、转换脚本或外部服务调用。

nelohenriq
nelohenriq
热度 53.54
最近更新 2026-05-11 17:28:11
分类:效率依赖:纯提示词应用场景:数据处理 / 摘要总结 / 笔记整理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add toon-adoption-skill
Metadata
name
toon-adoption
description
Optimize token usage by adopting the compact TOON format for data storage and context.
version
1.0.0
author
Agent Zero Community
tags
["token-optimization","toon","format","efficiency"]

TOON Adoption Skill

Description

Efficiently parse, generate, and store data using Token-Oriented Object Notation (TOON). TOON is designed for LLMs as a lossless, drop-in representation of JSON data that reduces token usage by approximately 40% through indentation, minimal quoting, and tabular layouts.

TOON Syntax Rules

1. Indentation-based Nesting

  • Use 2-space indentation to define hierarchy, similar to YAML.
  • Avoid curly braces {} and square brackets [] for nesting unless defining a tabular schema.

2. Minimal Quoting

  • Keys and values do not require quotes unless they contain commas or significant leading/trailing whitespace.

3. Explicit Array Lengths

  • Declare the number of items in an array using the [N] notation (e.g., friends[3]).

4. Tabular Arrays (Arrays of Objects)

  • For uniform arrays of objects, use the format: key[N]{field1,field2,...}:.
  • List the field names once in the header, followed by rows of values separated by commas.

5. Encoding

  • Always use UTF-8.

Guidelines for Agent Use

  1. Storage: Prioritize .toon files for logs, schedules, and long-term data tracking.
  2. Context Compression: When summarizing history or notes, use TOON to fit more information into the context window.
  3. Parsing: Interpret indentation as nested object levels and CSV rows as objects matching the header schema.

Example Document

metadata:
  name: Sample Configuration
  format: TOON
  efficiency_gain: 0.4
goals[3]{id,title,category}:
  1,Lose weight,health
  2,Increase self-esteem,personal
  3,Get out of loneliness,social