Skip to content
Agentmart
Submit a tool

token-saviour

Route each sub-task to the cheapest adequate tool across a 4-layer routing table (serena / rtk / caveman / Ponytail), cutting overall token spend by ~70%.

Skill by Lesile-Yin

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lesile-yin-token-saviour

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Route each sub-task to the cheapest adequate tool across a 4-layer routing table (serena / rtk / caveman / Ponytail), cutting overall token spend by ~70%. Use when an agent loop's context is ballooning, when choosing between heavy and light tooling for a sub-task, or when budgeting a long-running job.

Use cases: productivity, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/token-saviour

What's inside

Skill name
token-saviour
Description
Route each sub-task to the cheapest adequate tool across a 4-layer routing table (serena / rtk / caveman / Ponytail), cutting overall token spend by ~70%. Use when an agent loop's context is ballooning, when choosing between heavy and light tooling for a sub-task, or when budgeting a long-running job.
License
MIT
Instructions
55 lines in SKILL.md · view on GitHub

Files (2)

  • SKILL.md
  • routing-table.md · references/

SKILL.md (first lines)

# Token Saviour

Token discipline is a routing problem, not a willpower problem. token-saviour
picks the lightest tool that can still do the job, then compresses what must be
sent. It is the operational layer beneath token-warden's budget accounting.

## When to use

- Before spinning up an expensive coding agent for a small, well-scoped edit.
- When a conversation history exceeds a token threshold and must be trimmed.
- When deciding which model/agent should own a sub-task.
- When a task can be done by a formatter, a linter, or a grep instead of a chat.

## Workflow

### Step 1 — Classify the sub-task
Tag it on two axes: **token-cost sensitivity** (how much context it drags) and
**adequacy floor** (minimum capability needed). A rename is high-sensitivity,
low-floor; an architecture decision is high-sensitivity, high-floor.

### Step 2 — Consult the 4-layer routing table
See `references/routing-table.md` for the full matrix. In short:
- **Layer 1 — serena**: structural/semantic code ops (symbol rename,
  find-usages) that a language server does cheaper than an LLM.
- **Layer 2 — rtk** (regex/toolkit): deterministic text transforms, search,
  bulk edits a script handles without a model.
- **Layer 3 — caveman**: compress any context *before* it reaches a model.
- **Layer 4 — Ponytail** (heavy agent): only when lower layers cannot meet the
  adequacy floor.

### Step 3 — Compress inputs, cap history
Run Layer 3 on everything that crosses into Layer 4. Cap rolled-up history to
the last N meaningful turns; archive the rest to a retrievable note, not the
live context.

### Step 4 — Measure and report
After the sub-task, report the delta vs. the naive "send everything to the heavy
agent" baseline. A good call shows savings; a bad call shows where the floor was
missed.

## Anti-patterns (never do these)

- Routing everything to Layer 4 "just to be safe" — that is the bug it fixes.
- Compressing load-bearing context to hit a number — adequacy first, thrift
  second.
- Skipping the measurement — unseen savings aren't savings.
- Treating the table as fixed — re-tune thresholds per project.

## Output contract

Return a routing decision: chosen layer(s), the estimated token delta vs.
baseline, and one line of rationale. If no layer meets the adequacy floor, say
so explicitly and escalate rather than guessing.

From Lesile-Yin/agent-skills, MIT.

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from Lesile-Yin

Cite this page

token-saviour skill. Agent Mart. https://agentmart.dev/skills/lesile-yin-token-saviour (last updated 2026-10-24)