token-optimize

token-optimize is a skill for Claude Code from blueflyio/openstandardagents. It costs 65 tokens per session (1,533 once invoked), scanned A, original, Apache-2.0.

An optimizer for token use in large language model systems, where tokens are the pieces of text models process. It analyzes prompts and usage to manage cost and context size.

In plain words
What is it for?
It helps count and compress context, improve prompts, estimate costs, manage budgets, analyze usage, forecast demand, and detect unusual usage.
Why use it?
It helps reduce unnecessary prompt text, estimate and track spending, and keep usage within a chosen budget.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the bluefly-productivity plugin — 8 skills shipped together

Good fit It helps count and compress context, improve prompts, estimate costs, manage budgets, analyze usage, forecast demand, and detect unusual usage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/blueflyio/openstandardagents/token-optimizer
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add blueflyio/openstandardagents --skill token-optimizer
Clone the repo
git clone --depth 1 https://github.com/blueflyio/openstandardagents

Made for: Claude Code.

Or install bluefly-productivity, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for token-optimize

README.md
[![agentmods](https://agentmods.dev/badge/skills/blueflyio/openstandardagents/token-optimizer/github.svg)](https://agentmods.dev/skills/blueflyio/openstandardagents/token-optimizer)
Your own site
<a href="https://agentmods.dev/skills/blueflyio/openstandardagents/token-optimizer"><img src="https://agentmods.dev/badge/skills/blueflyio/openstandardagents/token-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for token-optimize

Your own site · 80×15
<a href="https://agentmods.dev/skills/blueflyio/openstandardagents/token-optimizer"><img src="https://agentmods.dev/badge/skills/blueflyio/openstandardagents/token-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,533 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.01533
Opus 5.5 $0.00026 $0.00613
Sonnet 5.5 $0.00013 $0.00307
Haiku 4.5 $0.00006 $0.00153

Measured today against content hash a082bf9d25e1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

token-optimize scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

quarantine/2026-05-15/plugins/bluefly-productivity/skills/token-optimizer/SKILL.md · 234 lines

How it starts

The opening of the file, as written. The whole thing — 234 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Token Optimizer

OSSA Agent: token-optimizer | Version: 1.0.0 | Namespace: blueflyio

Optimizes LLM token usage for cost efficiency and performance.

Capabilities

Capability Category Description
token_counting reasoning Count tokens in prompts
token-optimization reasoning Optimize token usage
prompt_analysis reasoning Analyze prompt efficiency
context_compression action Compress context windows
cost_estimation reasoning Estimate LLM costs
cost-tracking observation Track costs over time
budget-management action Manage token budgets
usage-analysis reasoning Analyze usage patterns
prompt_optimization action Optimize prompts
model_recommendation reasoning Recommend optimal models
batch_optimization action Optimize batch operations
usage_forecasting reasoning Forecast usage
anomaly-detection reasoning Detect anomalies
pattern-learning reasoning Learn patterns

Token Pricing (2025)

Provider Model Input Output
Anthropic claude-sonnet-4 $3/1M $15/1M
Anthropic claude-3-haiku $0.25/1M $1.25/1M
OpenAI gpt-4o $2.50/1M $10/1M
OpenAI gpt-4o-mini $0.15/1M $0.60/1M

Optimization Strategies

1. Prompt Compression

techniques:
  - Remove redundant whitespace
  - Use abbreviations where clear
  - Remove unnecessary examples
  - Compress JSON to minimal format
  - Use references instead of repetition

savings: 20-40% token reduction

2. Context Window Management

techniques:
  - Sliding window for long conversations
  - Summarize old context
  - Prioritize recent messages
  - Remove system prompt repetition

savings: 30-50% for long contexts

3. Model Selection

task_model_mapping:
  simple_classification: claude-3-haiku
  code_generation: claude-sonnet-4
  complex_reasoning: claude-opus-4
  embeddings: text-embedding-3-small

savings: 50-90% by right-sizing

Read the full file on GitHub · 234 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 234 lines · 65 tokens per session scan A a082bf9d25e1

Subscribe to this mod's changes

token-optimize is a skill published in the GitHub repository blueflyio/openstandardagents (5 stars, last pushed yesterday), licensed Apache-2.0. It adds 65 tokens to every session and 1,533 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-12-03.

Related

token-optimize compared with skills from other repositories

token-optimize next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
token-optimizeblueflyio/openstandardagentsSkill5yesterdayApache-2.0A65Claude Code
llm-tuning-patternsparcadei/Continuous-Claude-v3Skill4.0k17d agoMITA12Claude Code
naturalNPC-Worldwide/npcpySkill1.5kyesterdayMITA41Claude Code, Codex
agentica-promptsparcadei/Continuous-Claude-v3Skill4.0k17d agoMITB21Claude Code
llm-integrationyonatangross/orchestkitSkill313todayMITA58Claude Code
launchdarkly-snippetsaws/tools-for-devops-agentSkill159todayApache-2.0A35Claude Code, Codex
loom-prompt-engineeringcosmix/loomSkill663d agoMITA34Claude Code