From AgentOne Token Compression
Use proactively when the user pastes a large block of content (1000+ chars of JSON, logs, code, file content), when context is getting full and Claude should compress before continuing, or when the user mentions tokens, cost, context limit, AgentOne, or compression. Routes to the right optimizer (JSON minify, dictionary/dedupe, AST body-drop, semantic cache) via AgentOne Token Compression by Iterate.ai.
How this skill is triggered — by the user, by Claude, or both
Slash command
/agentone-token-compression:agentone-token-compressionThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You have access to **AgentOne Token Compression** by Iterate.ai via either the
You have access to AgentOne Token Compression by Iterate.ai via either the AgentOne MCP server (Claude Desktop) or the bundled CLI (Claude Code / manual). In Claude Code, compression also runs automatically via hooks — this skill is for explicit, on-demand compression and for the Desktop MCP path.
Invoke BEFORE responding when ANY of these apply:
compress toolPass the content as text, plus mode arguments as appropriate:
compress({ text, codeMode: "ast" }) — for code you only need an overview of
(the clearest win; bodies dropped, retrievable).compress({ text }) — default; already strong on JSON and repetitive code, and
the correct choice for prose.compress({ text, aggressive: true }) — optional on JSON / structured data;
safe there, but don't count on a large extra gain. Never on prose (lossy).Use analyze({ text }) first if you want a type + savings estimate without
modifying anything.
The path points at the self-contained dist/ bundle (works without any
node_modules):
cat path/to/file.json | node "$HOME/.claude/plugins/agentone-token-compression/dist/scripts/compress-stdin.js" --aggressive
Flags:
--aggressive — aggressive content-type compression (JSON/structured).--ast — drop function bodies on code (signatures + types + doc comments kept;
reversible via the retrieve tool).Output:
---SUMMARY---
{ "detectedType": "json", "mode": {...}, "beforeTokens": 2274, "afterTokens": 903, "savedPct": 60.3, ... }
---COMPRESSED---
<the compressed content>
The engine auto-tunes the compression level via a learning "governor", so default mode is already strong on structured content. Pick a mode by content type — do not assume aggressive always helps:
| Content type | Mode | What to expect (measured) |
|---|---|---|
| Code — overview only | codeMode: "ast" (--ast) | the one deterministic lever — drops function bodies (retrievable); use for large/diverse code |
| Code — repetitive | default | dictionary/dedupe already ~80–90% |
| JSON / structured data | default (optionally aggressive) | default ~50%; aggressive is safe here but may add little (the governor already explores) |
| Logs | default | only exact-duplicate lines compress; logs with unique per-line values (ids/timestamps) may save ~0% |
| Prose / natural language | default — never aggressive | modest; aggressive is LOSSY on prose (rewrites wording) |
Rules:
ast only when the user wants to understand/navigate, not run or
debug the code (bodies are dropped; retrieve them on demand). This is the
clearest, most reliable win.aggressive is safe to add
(structural, not lossy) but treat any extra savings as a bonus, not a promise.savedPct. Savings vary by content and can vary run-to-run while the
governor is still learning.Protected (never modified), in every mode:
So users can safely compress content containing secrets — they survive verbatim.
ast on code the user needs to run/debug.savedPct from the
result.When code is compressed with ast, function bodies are replaced with a marker
like { /* AGENTONE-ELIDED:<id> — call retrieve("<id>") for the N-line body */ }.
Signatures, TS types, and doc comments are preserved; only the body is dropped.
When you see AGENTONE-ELIDED:<id> (or retrieve("<id>")) and you need the
implementation, call the retrieve tool with that id to get the exact original
body BEFORE relying on or modifying it. This makes AST compression lossless on
demand — navigate on signatures, retrieve bodies only when you actually need them.
/tokens — show lifetime stats and cost savings/compress <text or file> — manually compress something/tokens-config key=value — tune settings (e.g. pipeline.contentRouter.aggressive=true)/tokens-reset cache|stats|all — clear state/tokens-off / /tokens-on — temporarily disablenpx claudepluginhub iterateai/compression --plugin agentone-token-compressionGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.