Ultra-dense token optimizer for LLM agents — maximize prompt caching, prune input, and compress output.
Framework-agnostic markdown rules for Claude Code, Antigravity, Gemini CLI, Cline, Roo Code, Hermes & more.
⭐ If you find ZipAI helpful for reducing LLM API token costs, please consider giving it a star on GitHub! ⭐
- 🧹 Zero Filler — strips conversational padding, enforces telegraphic grammar.
- 💾 Prompt Caching — static-first ordering preserves prefix cache hits (up to 90%).
- ✂️ Input Pruning — log compression, AST skeletal inspection, JSON/YAML minification.
- 🔬 Surgical Output — localized diffs only, no full-file reprints.
- 🧠 Reasoning Budget — adaptive Chain-of-Thought depth based on task complexity.
- 📐 Schema Enforcement — JSON Schema replaces verbose format instructions.
- 🗜️ Semantic Compression — lossless context reduction (50–90% savings).
- 🧭 ARM-style Reasoning — task-aware reasoning mode selection.
- ⚡ KV Cache Optimization — structured inter-tool communication, dynamic eviction.
- 📊 TAAC — domain-specific compression ratios (code vs math vs NL).
| Category | Before | After | Reduction |
|---|---|---|---|
| Log Files (traceback + context) | ~4,500 | ~225 | -95% |
| MCP Payloads (minified JSON) | ~1,800 | ~180 | -90% |
| Code Inspection (AST + lines) | ~6,200 | ~480 | -92% |
| Session Context (static-first) | 30,000 | ~3,000 | -90% |
| Agent Generation (telegraphic) | ~450 | ~95 | -79% |
Install the rules into your AI agent. Pick the path for your tool:
# Antigravity IDE (Gemini Agent Skill)
mkdir -p ~/.gemini/config/skills/zipai
cp SKILL.md ~/.gemini/config/skills/zipai/SKILL.md
# Claude Code CLI
cp CLAUDE.md /path/to/your/project/CLAUDE.mdRestart your agent — it now applies ZipAI rules automatically. ✅
mkdir -p ~/.gemini/config/skills/zipai
cp SKILL.md ~/.gemini/config/skills/zipai/SKILL.mdThe IDE lists zipai-optimizer as an available skill and applies the rules automatically.
cp CLAUDE.md /path/to/your/project/CLAUDE.mdClaude Code reads this file at startup and applies the rules for the workspace session.
mkdir -p /path/to/your/project/.agents/rules/
cp .agents/rules/zipai.md /path/to/your/project/.agents/rules/zipai.mdcp SKILL.md /path/to/your/project/GEMINI.mdThese rules are framework-agnostic markdown. Load SKILL.md into any system-instructions template:
- Hermes Agent: append to the agent's system instructions profile or
config.yaml. - Custom loops: reference
SKILL.mddirectly in system instructions.
ZipAI is a ruleset, not a runtime — once installed, your agent self-applies the optimizations. Verify behavior by prompting normally and observing denser, cache-friendly output:
# In your agent session
"Summarize this 50-line log and propose a fix." # expect ~225 tokens, not ~4,500Tip:
CLAUDE.mdand.agents/rules/zipai.mdare mirrors ofSKILL.md. UpdateSKILL.mdfirst, then propagate.
ZipAI compresses tokens at every stage of the agent loop:
flowchart LR
A[Raw Prompt / Output] --> B[Zero Filler]
B --> C[Prompt Caching]
C --> D[Input Pruning]
D --> E[Semantic Compression]
E --> F[Ultra-Dense Tokens]
F --> G[LLM Context + Cache]
ZipAI/
├── SKILL.md # Canonical rules (v15.0) — single source of truth
├── CLAUDE.md # Mirror for Claude Code auto-detection
├── .agents/rules/zipai.md # Mirror for VS Code agent extensions
├── README.md # This file
├── LICENSE # MIT License
├── .pre-commit-config.yaml # Git hooks
├── .gitattributes # Git merge strategies
└── .github/
├── scripts/ai-pr-reviewer.cjs
└── workflows/
├── ai-pr-reviewer.yml
└── auto-resolve-pr-conflicts.yml
- Brainstorming: disable during creative / open-ended design phases.
- Grep Blindness: key context may fall outside filter boundaries.
- Overshadowing: aggressive pruning may drop micro-variables in long sessions.
- Math Fragility: numerical reasoning chains resist aggressive compression.
If ZipAI helped optimize your agent workflows or slashed your API bill, leave a star ⭐ to help other developers discover it!
ZipAI ships markdown rules only — no executable code. See SECURITY.md for the vulnerability-reporting policy.
This project is licensed under the MIT License.