¢ frugal

Claude Code plugin · MIT · no runtime

Stop paying reasoning rates for grep.

Frugal turns Claude Code's main model into a router. Every sub-task goes to the cheapest tier that can do it, and it escalates only when a real check fails.

session ledgerfrugal
locate filesscout · haiku
read + summariseextractor · haiku
mechanical editsmechanic · sonnet
design + reviewmain loop

all on top tier$1.00
delegated, routed$0.15
saved on delegated work~85%

Illustrative. Applies to the delegated portion of a session, not the whole bill. Every install measures its own numbers locally.

the routing ladder

Cheapest capable tier first. Expensive only when earned.

One decision table the main model reads on every sub-task. A deterministic shell command beats any model; a model is called only when reasoning is actually required.

tier what it handles cost per task
shell command no model
A grep, jq, git or test command answers it. No model call at all.
~$0
scout · extractor haiku
Locate, map, find usages. Pull fields, classify, summarise one source.
low
mechanic · builder sonnet
Mechanical edits from a spec. Implement one scoped task from a plan.
mid
main loop session model
Design, debugging, reviews, ambiguity, anything risky. Expensive on purpose.
high
sage fable
Reached only via high-risk rows or after escalation exhausts. One attempt, final.
max

Verification first. A worker climbs a tier only when a real check fails, never on a cheap model's self-reported doubt.

what it actually is

Not a framework. A plugin.

The main model already reads every request, so it routes at zero marginal cost. Everything else is small.

one

routing skill

A decision table plus the escalation protocol. The whole policy.

five

agent definitions

scout, extractor, mechanic, builder, sage. Each a tier, each a plain markdown file.

two

fail-open hooks

What turns advice into enforcement. A broken hook never breaks a session.

Depends on: stdlib Python and bash. No runtime, no API keys, no network calls, no telemetry.


enforcement, not vibes

A prompt can suggest. A hook can prevent.

Routing policy in a skill is advisory. Frugal backs it with two hooks so it does not quietly drift back to expensive habits.

PreToolUse

Inline-exploration budget

Counts search-type calls in the main loop. Past the budget it denies the next one and points at the cheap workers. Resets when you delegate.

fail-open by design
PreToolUse · Agent

Expensive-tier guard

Blocks reasoning-tier agent spawns at the source, so locate and extract work is not handed to a top-tier model by reflex. One env var overrides it per session.

fail-open by design

it measures itself

Numbers from your machine, not this page.

A hook logs one local line per worker run: agent, model, tokens, escalation flag. A report then shows cost per tier, escalation rate, and savings versus your session's own main-loop model.

Learning is deliberately offline. High escalations on one agent means its row routes too low. Near-zero savings means work is not being delegated. You edit the decision table, not a model.

In the author's own measurements the delegated portion of a session runs about 85% cheaper than the same work on the top tier. Reasoning stays on the expensive model by design.

/frugal:router-stats
# one jsonl line per worker run
tier        runs   model    net
scout        41    haiku    $0.02
extractor    23    haiku    $0.03
mechanic     11    sonnet   $0.19
main loop     7    fable    $2.90
escalation rate ............ 6%
saved vs top tier ..... $3.41

install

Two commands. Then work normally.

Rollout is per person and needs no workflow change. Routing is automatic. Uninstall keeps no state beyond the local metrics file.

claude code
# add the marketplace
/plugin marketplace add ThomasLangbroek/frugal

# install the plugin
/plugin install frugal@frugal-marketplace

honest trade-offs

What it does not pretend to be.

Claude Code only

It leans on the harness: the Agent tool, hooks, parallel delegation. Multi-provider is a documented recipe, not a tested code path.

Advisory without the guard

The skill steers routing well, but only the guard hook enforces it. Turn the hook on for a hard ceiling.

Metrics are bounded

Limited to what hook events and transcripts expose. Escalations without the marker are not counted.