token-optimizer

Route bulk work to Explore or token-manager to minimize token usage.

Updated May 12, 2026
One-click install
npx skills add https://github.com/RorySullivan1/claudeBrain --skill token-optimizer-rorysullivan1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-optimizer
Source: https://github.com/RorySullivan1/claudeBrain/tree/main/example-project/.claude/skills/token-optimizer
Command: npx skills add https://github.com/RorySullivan1/claudeBrain --skill token-optimizer-rorysullivan1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Keeps Claude Code sessions token-efficient by deciding where work runs before it floods the main context, triaging context when sessions get heavy, and routing bulk work to specialized agents (token-manager or Explore). It triggers even if tokens aren't mentioned, to prevent token bloat.

Core Features & Use Cases

  • Routing decisions that move bulk work to Explore or the token-manager to minimize main-context growth.
  • Slices and partial reads of large files, with memory flushes to keep session memory lean.
  • Safe fallbacks for high-volume workflows and long-running conversations that risk token explosion.

Quick Start

Tell token-optimizer to route a heavy operation to the token-manager to preserve context.

Frequently Asked Questions about token-optimizer

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

FAQPage Schema
How do I reduce token usage when processing large files in Claude Code?

To reduce token usage when processing large files, this Skill implements a decision layer that slices large reads and routes bulk work to specialized agents, preventing context flooding. It automatically triggers smart task routing to keep session memory lean.

What is smart task routing for context management in Claude Code?

Smart task routing for context management is a mechanism that decides where work executes before it floods the main context. It triages heavy sessions by routing bulk operations like reading large files or running test suites to Explore or the token-manager.

How do I prevent context window bloat during long-running Claude Code sessions?

You can prevent context window bloat by applying task routing that flushes state to memory and moves high-volume operations to specialized agents. This triaging layer triggers even when tokens are not explicitly mentioned to avoid memory pressure.

Can I route test suites and log processing to a separate agent to save tokens?

Yes, you can route test suites and log processing to a separate agent to save tokens. The Skill intercepts high-volume workflows and redirects them to the token-manager or Explore, providing safe fallbacks to minimize main-context growth.

Do I need to explicitly mention tokens to trigger context optimization in Claude Code?

No, you do not need to explicitly mention tokens to trigger context optimization. The routing decision layer activates automatically when it detects high-volume operations or heavy session memory, preventing token bloat proactively.

What is the best way to handle fetching large documentation without exceeding token limits?

The best way to handle fetching large documentation is to route the operation to the token-manager, which slices the reads and flushes state to memory. This preserves the main context and ensures long-running conversations stay token-efficient.