Undercut for Roo Code

Roo Code already reads a SKILL.md. Give it one that stops overpaying.

Undercut is a free, MIT-licensed policy file Roo Code's own Agent Skills feature discovers and loads — cheap tier first, escalate only on evidence, never on a vibe. Roo Code is a Cline fork with its own model picker across many providers; this exists because the same overpay-by-default pattern we measured elsewhere in the agent ecosystem (one self-reported ccusage-style breakdown of default routing behavior in a different agent showed 93.8% of tokens going to the top-tier model by default, anthropics/claude-code#27665 — one account's data, from Claude Code rather than Roo Code) shows up anywhere an agent defaults every task to its strongest model.

Install for Roo Code See the benchmarks
Works anywhere a SKILL.md is read
Claude Code Codex Cursor Copilot OpenCode Roo Code

How this maps onto Roo Code

A Cline fork with its own Agent Skills feature.

Roo Code is a VS Code extension forked from Cline, and it ships its own dedicated Agent Skills feature (added in Roo Code 3.38) built around the same SKILL.md layout Undercut ships in. Roo discovers skills from a project-level .roo/skills/<name>/SKILL.md (highest priority) and the cross-agent .agents/skills/<name>/SKILL.md, plus global equivalents at ~/.roo/skills/ and ~/.agents/skills/ for every workspace, with mode-scoped skills-{modeSlug}/ variants (e.g. skills-code/) at any of those locations. Each SKILL.md's frontmatter needs a name that exactly matches its directory (lowercase letters, digits, and hyphens only) and a description Roo indexes at startup; loading is "progressive disclosure" — Roo matches your request against that indexed description first, then uses its own read_file tool to pull in the full instructions on demand, never loading skills it doesn't need. Undercut's skill is already named firstpass, which satisfies that naming rule as-is.

Separately, Roo Code also reads a plain-instructions .roo/rules/ directory (and legacy .roorules / Cline's own .clinerules single-file fallbacks) for general repo conventions that aren't skill-shaped — that's a different, older mechanism, unrelated to where the Undercut skill itself lives, and not the path this page installs to.

Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. models.md gives the rule of thumb rather than a fixed slug for Roo Code specifically, since Roo Code is provider-agnostic across its model picker: cheap maps to the smallest/fastest model in whatever family you've configured, standard to your default work model, frontier to the highest-reasoning production model, apex to the single batched tie-break call. Nothing about this sits between Roo Code and your model provider — it's a policy file Roo Code's own skill loader reads on demand, no proxy, no network hop, nothing to route around if you remove the directory.

Install for Roo Code

Free. MIT. Nothing installs, nothing proxies your traffic.

Option 1 — project skills directory (recommended, confirmed path)

Run this from the repo root. Roo Code indexes every SKILL.md under .roo/skills/ at startup and loads the full file on demand when a request matches its description — the folder name has to match the name: field in the file's frontmatter. Undercut's is already named firstpass, so the directory copies straight across.

$ mkdir -p .roo/skills && cp -r firstpass/skills/firstpass ./.roo/skills/firstpass

Option 2 — install globally for every workspace

Same folder, user scope. Roo Code also indexes ~/.roo/skills/ for every project.

$ mkdir -p ~/.roo/skills && cp -r firstpass/skills/firstpass ~/.roo/skills/firstpass

Option 3 — skills CLI

$ npx skills add undercutsh/firstpass

skills.sh lists Roo Code as a supported target. If it writes to the cross-agent .agents/skills/ convention — the same one it uses for Codex and Amp — that lands directly on one of Roo's own two documented discovery paths, no translation needed. We haven't independently run the installer against a live Roo Code session to confirm the exact directory it targets, so if it doesn't show up, use Option 1 above, which we checked directly against Roo Code's own docs.

Validate it yourself

  1. 1Read the published results — testing/README.md and the raw JSON in testing/results/
  2. 2Reproduce for free, no API key, no spend: node src/main.js --mock
  3. 3Run live on whichever provider you've configured Roo Code against — a single-vendor smoke test is pennies

Zero lock-in. It's a policy Roo Code's skill loader reads — remove the directory and you're back to status quo.

How it works

The Undercut Rubric · v1

Six flags assign a tier. Three triggers are the only way up.

This is a named, versioned spec — not internal logic we could quietly change. When the rubric changes (a new flag, a different cap), the version number moves and the changelog says why.

Every unit of work gets scored against six flags, then assigned the cheapest tier that can plausibly handle it. It only moves up a tier when something objective proves it needs to — a failed check, a measured disagreement, an explicit uncertainty flag. It never moves up on a guess, and it never moves back down mid-task.

unit of work
6-flag rubric
0 flags
cheap~90% of units land here ✓
1–2
standard
3+/own
frontier
↑ escalate +1 tier only on: fail ×2 · two runs disagree · tagged "uncertain" residue only — never redoes the batch
See the rubric

Step 1 — Base tier, six-flag rubric

Unverifiable — can output be checked mechanically? (tests, schema, diff, grep)
Ambiguous — one right answer, or several defensible ones?
Blast — reversible? touches money, auth, user data, production, deletes?
Cross-cutting — one file/source, or reasoning across many?
Novel — pattern-following, or genuinely new design?
Format-strict — must output match an exact schema?

0 flags → cheap · 1–2 → standard · 3+ or any ownership/judgment call → frontier. Apex only when you can write one sentence stating why the marginal intelligence pays for the cost.

The override — single biggest lever

Cheap-to-verify ⇒ cheap-to-generate. If output can be checked mechanically, it starts at the lowest tier regardless of how hard it looks — verification catches failure. Only unverifiable work needs to start high.

Step 2 — Escalate exactly one tier, on evidence only

  • Verification fails twice at the current tier
  • Two cheap-tier runs disagree on ambiguous-flagged work
  • The worker tags an item "uncertain"

Residue-only handoff

The next tier up gets only the failed or uncertain items, plus verification notes. It resolves the residue — it never redoes the batch.

Hysteresis — guardrails

Never de-escalate mid-task. Max one retry per tier. Anything still unresolved goes to a single batched apex tie-break call. One hard file in a 700-file job doesn't drag the other 699 up a tier.

 unit of work
      |
  6-flag rubric
      |
  +---+----+
  | 0 flags|--> cheap
  | 1-2    |--> standard
  | 3+/own |--> frontier
  +---+----+
      | fail x2 / disagree / uncertain
      v
  escalate +1 tier
  (residue only)
      |
  still unresolved?
      v
  single batched
  apex tie-break

Why it holds up

Flags steer. Verification and escalation decide.

Even when the rubric flags are scored imperfectly, the escalator still routes work to the right tier almost every time — because a wrong flag only ever costs one extra cheap attempt, never a wrong answer or a big bill.

See the data

A stock dispatcher model reproduces the rubric flags imperfectly — Haiku hits 90% agreement, Sonnet 93%. The weakest flag (format-strict) is only 60%. None of that matters: under the shipped policy, both dispatchers still route 100% of units to the correct tier. A wrong flag changes the ladder cap, never the base tier — worst case, one extra cheap attempt.

Haiku dispatcher
90% flag agreement
100% tier-match
Sonnet dispatcher
93% flag agreement
100% tier-match

The rules are about the work, not the model.

Every rule is a property of the unit of work — verifiable, ambiguous, blast-radius — never a specific model's known weakness. Vendor cards go stale as models change; work properties don't. It's also hard-won — a format-strict rule that worked on Anthropic backfired on Gemini, which is exactly why the rubric no longer encodes per-vendor behavior.

Honest limits

What this doesn't do.

Not a proxy, not a gateway, doesn't auto-flag in production (Roo Code scores the flags itself — measured robust to getting them wrong, see above), and doesn't promise a dollar figure for your workload. The skills-CLI target directory for Roo Code specifically is documented on skills.sh but hasn't been independently confirmed end-to-end by us against a live session — treat that one detail as unverified until tested; the .roo/skills/ path above is the one we checked directly against Roo Code's own docs. Full list of general limits, with the finance/procurement note and the paid-tier disclosure, is on the main page.

Undercut the top tier. Not the quality bar.

Nothing about this page expires. What does keep happening is the token bill, one session at a time, on whatever Roo Code is currently doing with mechanical work.

View on GitHub