mostafamoq

Tooner β€” Data skill for Claude Code

Data community

πŸš€ 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