Undercut for Kiro

Kiro already reads steering files and Agent Skills. Give it one that stops overpaying.

Undercut is a free, MIT-licensed routing policy for Kiro, AWS's agentic IDE — cheap tier first, escalate only on evidence, never on a vibe. Kiro has no built-in per-task cost dial to compare against; this exists because the same overpay-by-default pattern we measured elsewhere in the agent ecosystem (one self-reported ccusage breakdown from a different agent showed 93.8% of tokens going to the top-tier model by default, anthropics/claude-code#27665 — one account's data, not Kiro's own) shows up anywhere an agent defaults every task to its strongest model.

Install for Kiro See the benchmarks
Works anywhere a SKILL.md or rules file can be read
Claude Code Codex Cursor Copilot OpenCode Kiro

How this maps onto Kiro

Two confirmed paths: steering files, and native Agent Skills.

Kiro's documented, always-on mechanism is steering: plain markdown files at .kiro/steering/*.md (workspace scope) or ~/.kiro/steering/*.md (global scope), with workspace steering taking priority when the two conflict — per Kiro's own steering docs. Each file opens with a required YAML front-matter block (it must be the very first content in the file, no blank line before it) setting an inclusion mode: always (the default — loaded into every interaction), fileMatch (loaded only when a matching file pattern is open), or manual (pulled in on demand via a #steering-file-name reference). Kiro also auto-reads a root AGENTS.md as always-on, with no inclusion modes to configure.

Kiro separately ships native Agent Skills support — the same open, portable SKILL.md standard this repo already targets. Per Kiro's own skills docs, a skill is a folder containing a SKILL.md whose front matter must declare a name (lowercase letters, numbers, hyphens, matching the folder name) and a description Kiro uses to decide when to load it automatically. Skills live at .kiro/skills/<name>/SKILL.md (workspace) or ~/.kiro/skills/<name>/SKILL.md (global) — note Kiro requires the subfolder; it won't recognize a SKILL.md dropped straight into the skills directory. Undercut's skill folder is already named firstpass with that exact front-matter shape, so it copies across with nothing rewritten — see Install below.

Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. Kiro can run against more than one underlying model, so models.md gives the rule of thumb rather than a fixed slug for Kiro specifically. Nothing about this sits between Kiro and its model backend — it's plain markdown Kiro reads into context, no proxy, no network hop, nothing to route around if you remove the block.

Install for Kiro

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

Option 1 — install as a native Agent Skill (recommended, confirmed path, no edits needed)

Clone or download undercutsh/firstpass, then copy the skill folder straight into Kiro's workspace skills directory — the front matter already matches what Kiro's Agent Skills docs require, so nothing needs rewriting.

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

Option 2 — install once, for every workspace

Same folder, global scope. Kiro also reads ~/.kiro/skills/<name>/SKILL.md — useful if you want the policy available in every project without touching individual repos.

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

Option 3 — append as an always-on steering file

Prefer Kiro's steering mechanism instead? Save the policy under .kiro/steering/ with an inclusion: always front-matter block as the very first line of the file (Kiro requires no content before it), and it loads into every session the same way a project rules file would.

$ mkdir -p .kiro/steering && { echo '---'; echo 'inclusion: always'; echo '---'; echo; } > .kiro/steering/undercut.md && curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md >> .kiro/steering/undercut.md

What's still unverified: the cross-agent npx skills add undercutsh/firstpass picker lists a kiro-cli agent flag, and its maintainers describe it writing to .kiro/skills/ and ~/.kiro/skills/ — the same paths Kiro's own docs list — but we haven't confirmed against a real Kiro session whether kiro-cli targets this IDE or a separate CLI product of the same name. Use Option 1 or 2 above instead; both are copy-pasted directly from Kiro's own documentation. Kiro's Agent Skills feature is also newer than its steering mechanism, so double-check behavior against whatever Kiro version you're running.

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. 3Open Kiro against a repo with the skill installed and check whether it references the routing policy before starting mechanical work

Zero lock-in. It's markdown text Kiro reads — delete the folder or the block 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 (Kiro scores the flags itself — measured robust to getting them wrong, see above), and doesn't promise a dollar figure for your workload. It's a routing policy, not a proof of savings on your workload — the benchmark numbers above show what the rubric measured on public tasks, not a guarantee for yours. Full list, 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 Kiro is currently doing with mechanical work.

View on GitHub