Tooner β Data skill for Claude Code
π Claude Code hook that automatically compresses JSON data by up to 60% using Toon format before sending to LLMs.
How to install Tooner
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open mostafamoq/tooner and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Tooner does
π Claude Code hook that automatically compresses JSON data by up to 60% using Toon format before sending to LLMs. Save tokens, reduce costs, same results.
Alternatives in Data
- Context Mode β Benchmark Results β Benchmarked against real outputs from popular Claude Code MCP servers, Skills, and dev tools 5.6k β
- Query Token Info β Search tokens and fetch metadata, real-time market data, and K-Line candlestick charts by keyword or contract 483 β
- Create Short β Create a short-form vertical video (TikTok, Instagram Reels, YouTube Shorts) 113 β
README
Tooner - Claude Code Hook
**Reduce LLM token usage by up to 60% with automatic JSON compression**
Tooner is a Claude Code hook that automatically compresses structured JSON data into the efficient [Toon format](https://github.com/toon-format/toon) before sending to LLMs. Uses the official [toon-python library](https://github.com/toon-format/toon-python) for compression. Perfect for working with large datasets, API responses, and tabular data.
**π Quick Navigation:** [Installation](#-installation) Β· [Testing](#-testing-with-mcp-server-optional) Β· [How It Works](#-how-it-works) Β· [Development](#-development) Β· [Contributing](#-contributing)
β‘ Get Started
**Install the hook:** Follow the [installation steps](#-installation) to automatically compress JSON data in Claude Code.
**Want to test the compression first?** [Use the MCP test server](#-testing-with-mcp-server-optional) with Claude Desktop to explore how Toon compression works.
π Quick Overview
**What it does:** Converts verbose JSON arrays into compact Toon format, dramatically reducing tokens.
**Example:**
// Before (100 tokens)
[
{"id": 1, "name": "Alice", "role": "admin", "status": "active"},
{"id": 2, "name": "Bob", "role": "user", "status": "active"},
{"id": 3, "name": "Carol", "role": "admin", "status": "inactive"}
]
// After (55 tokens) - 45% savings!
data[3]{id,name,role,status}:
1,Alice,admin,active
2,Bob,user,active
3,Carol,admin,inactive
π¦ Installation
Requirements
- Python 3.10+ (required for toon-python library)
- pip (Python package manager)
- Claude Code CLI
**Note:**
- The installer automatically handles externally-managed Python environments using
pip --user - If you have Python < 3.10, the installer will warn you and skip compression (hook still installs but won't compress)
Automatic Installation (Recommended)
Run this one command to install everything:
curl -fsSL https://raw.githubusercontent.com/mostafamoq
Related Skills
Source Backed Numbers
Claude Code skill: never hand-type experiment numbers into docs β save results as per-item JSON, generate LaTe
Drachometer
A Claude Code hook that logs every turn and tool call to a local SQLite database, with a browser dashboard for
Pulse Analytics
Local-first analytics for Claude Code, OpenAI Codex and OpenCode. Track tokens, costs, cache efficiency and ac
Claude Guard Hook
A global Claude Code hook that intercepts sensitive data before it reaches the LLM β secrets, API keys, PII, a
Create Hook Dtd
Invoke create-hooks-dtd for a hook whose payload is data and whose guard is tripped before it ships
n8n Publish Check
Scan n8n workflow exports for secrets and private data before publishing. Claude skill, Python CLI and git pre
Related Agents
Weather Reporter
Fetches current weather and a 3-day forecast for a city from Open-Meteo's free public API (no key required), t
Memory Distiller
Compresses memory-sessions.md older entries into a rolling archive to reduce context load. Safe to run monthly
Continuity Archivist
Keeps long-project memory bounded β compresses closed volumes into summaries and consolidates story-bible Fact