token-optimizer

Compress task input to token budgets and recommend Claude model tiers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/infantesromeroadrian/arca-claude-code --skill token-optimizer-infantesromeroadrian
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-optimizer
Source: https://github.com/infantesromeroadrian/arca-claude-code/tree/main/skills/token-optimizer
Command: npx skills add https://github.com/infantesromeroadrian/arca-claude-code --skill token-optimizer-infantesromeroadrian

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Token budgets in large delegation systems are often exceeded, causing inefficient prompts and higher costs. The token-optimizer solves this by compressing context to tight token budgets and selecting the appropriate Claude model tier. It is designed to run as the first agent in a delegation and again before Engram storage to ensure compact, cost-efficient reasoning.

Core Features & Use Cases

  • Pre-delegation context compression to <=500 tokens and model tier recommendation.
  • Post-delegation compression of outputs to <=150 tokens before Engram storage.
  • Deterministic routing decisions and clear outputs for Engram storage and downstream agents.

Quick Start

Invoke the token-optimizer at the start of every delegation to compress context and determine the initial model tier.

Frequently Asked Questions about token-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compress prompt context to fit within a strict token budget for Claude?

To compress prompt context to fit a strict token budget, this tool applies pre-delegation compression to 500 tokens or fewer and post-delegation compression to 150 tokens or fewer, ensuring compact, cost-efficient reasoning before Engram storage.

How do I select the right Claude model tier to optimize prompt cost?

To select the right Claude model tier and optimize prompt cost, this tool assesses task type, context size, and output requirements, selecting Haiku by default and escalating to Sonnet or Opus only when needed.

What is the best way to prevent token budget overruns in large delegation systems?

The best way to prevent token budget overruns in large delegation systems is to invoke a token optimizer at the start of every delegation to compress context and determine the initial model tier before downstream processing.

Can I use token compression to reduce output size before storing it in Engram?

Yes, you can use token compression to reduce output size before Engram storage by applying post-delegation compression that condenses outputs to 150 tokens or fewer, ensuring deterministic routing and compact storage.

When should I escalate from Haiku to Sonnet or Opus for prompt engineering tasks?

You should escalate from Haiku to Sonnet or Opus when the token optimizer assesses that the task type, context size, or output requirements demand a more advanced model tier for accurate results.

Does the token-optimizer work without external dependencies for cost optimization?

Yes, the token-optimizer works without external dependencies for cost optimization, applying deterministic routing decisions and context compression entirely within your delegation workflow.