---
name: Paleo JSON
slug: paleo-json
category: AI Engineering
description: Compacts JSON and other structured data by removing whitespace, collapsing arrays, and shortening keys to reduce token usage in LLM outputs, without breaking parseability.
github: "https://github.com/mocasus/paleo/tree/main/skills/paleo-json"
language: Python
stars: 11
forks: 0
install: "git clone https://github.com/mocasus/paleo"
added: 2026-07-16T13:43:27.787Z
last_synced: 2026-07-17T07:10:03.038Z
canonical_url: "https://dirskills.com/skills/paleo-json"
---

# Paleo JSON

Compacts JSON and other structured data by removing whitespace, collapsing arrays, and shortening keys to reduce token usage in LLM outputs, without breaking parseability.

**Install:** `git clone https://github.com/mocasus/paleo`

## README

# paleo-json
Compact structured output. JSON / YAML / tables → minimal tokens, still valid.

## Rules
- Minify: remove whitespace between tokens (valid JSON stays parseable).
- Collapse arrays of repeated shapes into a count + 1 example when the consumer allows.
- Keep keys verbatim unless a documented short alias exists — never invent keys.
- Preserve: values, types, order where it matters, escaping.
- YAML: drop comments, shorten, keep indentation minimal but valid.
- Numbers/booleans/null: never reformat in ways that change type.

## Levels
- `lite`: minify whitespace only (safest).
- `full` (default): minify + collapse repetitive array tails.
- `ultra`: minify + alias keys per a provided map.

## Switch
- `paleo-json` / `compact json` / `minify` on. `pretty print` off.

## Gotchas
- Always return valid, parseable output — a broken payload costs more than the tokens saved.
- Don't alias keys unless the consumer expects them; default = keep keys.
- Streaming/chunked JSON: minify only after the full object is known.
