Skip to main content
skill CX Codex

media-transformation — Claude Code skill: shrink JSON prompt tokens

media-transformation rewrites uniform JSON arrays as TOON v2.0, with field names declared once and rows after. Useful when repeated records fill your context.

LicenseRef-Proprietary 126 installs ★ 50 updated 2026-01-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add qodex-ai/ai-agent-skills --skill media-transformation -a claude-code
Open on GitHub

What media-transformation does

The skill takes structured data and lays it out as TOON v2.0: a single header carries the field names, each record becomes one line. Arrays of five or more similar objects lose 30-60% of their token weight. Event logs, API payloads, query results and metric tables all qualify, since the shape matters more than the labels.

Three layouts cover most input: a tabular block for objects that share fields, an inline list for plain values, an expanded form when they don't. Separators follow the data — comma by default, tab when values contain commas, pipe for a markdown-like look. Nested keys get folded flat (server.host, database.port) for another 25-35%.

The skill also refuses. Short arrays, deeply nested trees and objects with little field overlap stay in JSON, and it names the reason in the output. The fast route shells out to a Zig encoder at .claude/utils/toon/zig-out/bin/toon; on a fresh checkout that binary isn't built, so the manual step-by-step path is what you get. Terms sit in LICENSE.txt.

What it helps with

  • compress a user-list API response before it reaches the prompt
  • fit a database query result into context without dropping columns
  • turn per-route performance metrics into a compact block
  • flatten nested config keys into one level
  • pick a separator for street addresses containing commas

Example prompts for the agent

  • Convert this array to TOON with tab delimiters and folded keys.
  • Encode the /api/users response as TOON if the fields line up.
  • Decide between JSON and TOON for this payload and show the result.

How to install media-transformation

1Skills CLI (Vercel)

npx skills add qodex-ai/ai-agent-skills --skill media-transformation -a claude-code

2Manually: put the files in place

~/.claude/skills/media-transformation/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/media-transformation/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about media-transformation

How do I install media-transformation in Claude Code?

Run npx skills add qodex-ai/ai-agent-skills --skill media-transformation -a claude-code. The skill lands at ~/.claude/skills/media-transformation/SKILL.md.

What does media-transformation do?

It encodes uniform arrays and tables in TOON v2.0, declaring the fields once and writing one row per record. On large regular datasets that trims 30-60% of the tokens.

When does it keep JSON instead?

With short arrays, deep nesting or objects whose fields barely overlap. In those cases it states the reason and passes the data through unchanged.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set42

The whole set →
branch-finalization branch-finalization verifies tests, presents four clear next steps, and handles merging, pull requests, or branch cleanup. CX Codex +1 131installs autonomous-cloud-orchestration autonomous-cloud-orchestration walks your agent through AWS Bedrock AgentCore: picking the right service and wiring the deployment with the AWS CLI. CX Codex +1 131installs capability-documentation The capability-documentation skill helps document other skills with clear structure, examples, and behavior checks. It fits reusable agent guidance that needs verification. CX Codex +1 130installs workspace-isolation workspace-isolation creates separate Git worktrees for parallel branch work. Use it when changes need their own working directories and a verified starting state. CX Codex +1 130installs deployment-automation deployment-automation — a skill that automates Vercel deployments with build error fixes. The agent runs vercel --prod, reads logs via MCP tool, and patches code until deployment succeeds. CX Codex +1 129installs directive-synthesis directive-synthesis is a Claude Code skill for building slash commands, from arguments and frontmatter to Bash steps and testing. CX Codex +1 127installs feedback-application The feedback-application skill turns review comments into tracked code changes, tests, and documentation updates. Use it when an agent needs to work through feedback item by item. CX Codex +1 126installs infrastructure-code-synthesis infrastructure-code-synthesis synthesizes AWS Cloud Development Kit code and enforces pre-deployment validation rules for cloud stacks. CX Codex +1 125installs

Project sponsors

Companies that keep this analytics open