toon-format
使用 TOON 標記法高效格式化資料
JSON 在 LLM 提示中浪費標記。TOON 可減少 30-60% 的標記使用量,同時保持資料的可讀性。將表格資料轉換為針對 AI 使用最佳化的緊湊格式。
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "toon-format". 將 API 端點清單轉換為 TOON 格式
Resultado esperado:
- api_endpoints[3]{method,path,description,auth}:
- GET,/users,List all users,none
- POST,/users,Create new user,bearer
- DELETE,/users/{id},Delete user,bearer
- meta:
- version: 1.0
- last_updated: 2025-01-10
A utilizar "toon-format". 格式化包含中繼資料的函式庫索引
Resultado esperado:
- meta:
- category: libraries
- count: 3
- items[3]{id,name,description,path}:
- baml,BAML,Structured LLM outputs,lib/baml
- mcp,MCP,Tool integration,lib/mcp
- prisma,Prisma,Database ORM,lib/prisma
Auditoria de Segurança
SeguroPure documentation skill containing only markdown files with format rules and validation examples. No executable code, scripts, or network operations. All 142 static findings are false positives from the scanner misinterpreting documentation code blocks as executable shell commands and example hash values as cryptographic operations.
Fatores de risco
⚙️ Comandos externos (105)
🌐 Acesso à rede (7)
📁 Acesso ao sistema de arquivos (4)
Pontuação de qualidade
O Que Você Pode Construir
最佳化 LLM 提示資料
在傳送給語言模型之前,以 TOON 格式編碼文件和索引,以降低標記成本。
建立高效的文件索引
建立結構化索引和清單,在 AI 系統處理時消耗更少的標記。
格式化表格資料供 AI 處理
將類似 CSV 的資料集轉換為 TOON,以實現更高效的 LLM 使用和分析。
Tente Estes Prompts
Convert this JSON array to TOON format with proper syntax: use explicit count, 2-space indentation, and add blank line after arrays. Here's the JSON: [paste your data]
Validate this TOON file and fix any syntax errors: missing counts, wrong indentation, or formatting issues. Show the corrected version: [paste your TOON]
Help me design a TOON format for this data. Show how to structure it as tabular arrays with proper column definitions: [describe your data]
Create a script to convert these documentation files to TOON format. Include validation and error handling: [list your files]
Melhores Práticas
- 在生產環境使用前,務必使用 npx @toon-format/cli --decode 進行驗證
- 盡可能設計適合表格表示的資料結構
- 將 JSON 保留為標準來源,並生成 TOON 用於 LLM 傳輸
Evitar
- 對深度巢狀或不規則的資料結構使用 TOON
- 在 TOON 檔案中包含註解或 YAML 風格的清單
- 忘記在表格陣列後加入空白行
Perguntas Frequentes
TOON 與標準 JSON 解析器相容嗎?
相較於 JSON,標記節省量為何?
我可以將 TOON 用於配置檔案嗎?
如何處理驗證錯誤?
TOON 支援所有 JSON 功能嗎?
何時應選擇 TOON 而非 JSON?
Detalhes do Desenvolvedor
Autor
ConsiliencyLicença
MIT
Repositório
https://github.com/Consiliency/treesitter-chunker/tree/main/.ai-dev-kit/skills/toon-formatReferência
main
Estrutura de arquivos