Tooner
Description
๐ 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.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data Financial Services
Reference agents, skills, and data connectors for the financial-services workflows we see most โ investment ba
Data