documentation
SLIM Engine Docs
Complete reference for the Semantic Lossless Intelligence Minimizer — the open-source token compression engine for Claude Code.
Installation
OPTION 1 — curl installer
curl -fsSL https://slim.sh/install | bashOPTION 2 — manual (GitHub)
# 1. Download the skill
git clone https://github.com/hyperbridgedigital/slim
cd slim
# 2. Copy skill to Claude
cp -r skills/token-engine ~/.claude/skills/
# 3. Copy agent
cp agents/slim-engine.md ~/.claude/agents/
# 4. Done — activate in any Claude Code session:
# /token-engineOPTION 3 — project-level only
# Install SLIM into a single project
mkdir -p .claude/skills/token-engine .claude/agents
curl -fsSL https://raw.githubusercontent.com/hyperbridgedigital/slim/main/skills/token-engine/SKILL.md \
-o .claude/skills/token-engine/SKILL.md
curl -fsSL https://raw.githubusercontent.com/hyperbridgedigital/slim/main/agents/slim-engine.md \
-o .claude/agents/slim-engine.mdUsage
/token-engineActivate SLIM-COMPACT (default mode). All three axes enforced. Persists for the session./token-engine nanoSLIM-NANO mode. 1-sentence responses. No tool calls. Best for quick Q&A./token-engine structuredSLIM-STRUCTURED mode. Axes 1+3 enforced; code output unrestricted. Best for multi-file features.normal mode / offSay either phrase to deactivate SLIM and return to default behavior.AXIS 1
Input Compression
1A — Grep Before Read
Never open a file to "see what's in it." Locate the exact symbol first, then read only surrounding lines.
# WRONG — reads 400 lines
Read("src/auth/middleware.ts")
# RIGHT — targeted
grep -n "validateToken" src/auth/middleware.ts
# → line 87
Read("src/auth/middleware.ts", offset=82, limit=30)1B — Read Size Limits
< 100 lines
Full read allowed
100–500 lines
Max 80 lines per read
500–2000 lines
Max 50 lines per read
> 2000 lines
Max 30 lines; grep first
1F — Parallel Batching
All independent tool calls in one message. One round-trip, not three.
# WRONG — 3 sequential round-trips
Read(fileA) → Read(fileB) → Read(fileC)
# RIGHT — 1 round-trip (same message)
Read(fileA) + Read(fileB) + Read(fileC)AXIS 2
Output Compression
2A — No Preamble
✕ WRONG
I'll help you with that! Let me update the config file to include the new value...
✓ RIGHT
Done. Config updated.
2B — No Trailing Summary
✕ WRONG
In summary, I made the following changes to resolve the issue you reported...
✓ RIGHT
(nothing — the diff is visible)
2F — Terse Confirmation
✕ WRONG
I've successfully completed the task and the changes are now saved. (32 tokens)
✓ RIGHT
Done. (8 tokens)
AXIS 3
Context Hygiene
3A — Memory-First
Check ~/.claude/projects/.../memory/ before any research. A memory hit costs ~0 tokens; a research pass costs 500–2000 tokens.
3B — Progressive Disclosure
Default to Level 1 (direct answer, 1–3 sentences). Only go deeper if the user asks 'why' or 'explain fully'.
3C — Delegate + Compress
Spawn the slim-engine agent for breadth exploration. It returns compressed structured JSON — never raw dumps.
3D — Context Checkpoint @ 50%
At 50% context: identify the 3 most token-heavy items. If non-load-bearing, prune them mentally — stop referencing them.
AUTO — 60% → SLIM-COMPACT
At 60% context fill, SLIM-COMPACT auto-activates even without /token-engine. Emits one line: 'Context 60%+ — SLIM-COMPACT activated.'
Token Budget Reference
Compatibility
SLIM is compatible with all other Claude Code skills. When another skill is active (e.g., /kynetraprime, /code-review), SLIM's compression rules apply to the delivery of that skill's output — not its substance. Never compress away accuracy. Compress away padding.
File Structure
~/.claude/
├── skills/
│ └── token-engine/
│ └── SKILL.md # skill playbook — invoke with /token-engine
└── agents/
└── slim-engine.md # compression-aware sub-agent executor
# Source (GitHub)
github.com/hyperbridgedigital/slim
├── skills/token-engine/SKILL.md
├── agents/slim-engine.md
├── README.md
└── install.sh