Undercut for Trae

Trae already reads SKILL.md files natively. Give it one that stops overpaying.

Undercut is a free, MIT-licensed policy file that drops straight into Trae's own .trae/skills/ directory — no adapter, no cross-tool alias. Cheap tier first, escalate only on evidence, never on a vibe. Trae is multi-model by design, wired up to whichever provider you configure; the rubric doesn't care which one that is, only whether the unit of work is mechanically verifiable.

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

How this maps onto Trae

.trae/skills/ is Trae's own native SKILL.md path.

Trae ships a documented Skills mechanism built on the exact same file: a skill is a folder containing a SKILL.md with YAML frontmatter (name, description), stored at .trae/skills/<name>/ for a project or ~/.trae/skills/ globally (%userprofile%\.trae\skills\ on Windows). Trae's own docs describe the load behavior in the same terms every other companion page on this site does: the agent scans every installed skill's short description first, and only loads the full SKILL.md body into context when the current task looks relevant — "dynamic on-demand loading," in Trae's own wording, to keep irrelevant skills from burning context.

Trae also documents a separate Rules mechanism — project rules under .trae/rules/, global rules under ~/.trae/user_rules — for always-on preferences like coding style or language. Trae's own comparison is explicit: "Rules are loaded in full: once a chat starts, all rules are injected into and continuously occupy the context window. Skills, by contrast, are loaded on demand." A scored routing rubric is conditional, invoked-by-relevance guidance, not a blanket always-on preference, so Skills is the documented fit and the path this page installs to.

Trae also recognizes the cross-tool .agents/skills/ convention directly — its docs call it "a convention-based directory specified by Agent Skills for storing skills," toggled on under Settings > Skills & Commands, with one documented tie-break: if a skill in .trae/skills/ shares a name with one in .agents/skills/, the native .trae/skills/ copy wins. Trae's docs also name a "find-skills" built-in skill that relies on "a command-line tool called skills," which is the same skills CLI this page's install command uses.

Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. Trae doesn't lock you to one vendor's model lineup; whichever provider you've configured, models.md resolves each tier to a real model for that family. Nothing about this sits between Trae and your model provider — it's a policy file the agent reads at dispatch time, no proxy, no network hop, nothing to route around if you remove the skill folder.

Install for Trae

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

Option 1 — copy the skill directory directly (recommended, confirmed path)

Clone or download undercutsh/firstpass, then copy skills/firstpass/ into .trae/skills/firstpass/ at the project root. This is Trae's own native skills path, not a compatibility shim.

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

Option 2 — install once, for every project

Trae also reads a global skills root, per its own docs: ~/.trae/skills/ on macOS/Linux, %userprofile%\.trae\skills\ on Windows.

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

Global skills also show up in Trae's Settings > Skills & Commands panel, where you can toggle each one on or off per project.

Option 3 — skills CLI, via the .agents/skills/ directory

$ npx skills add undercutsh/firstpass

Trae's own docs name the skills CLI directly — its built-in "find-skills" skill "relies on a command-line tool called skills" to install into .agents/skills/, the convention-based directory Trae recognizes for the open Agent Skills ecosystem. Turn that directory on first: Settings > Skills & Commands > Import Settings > Enable .agents Skills Directory.

What's still unverified: Trae's docs confirm .agents/skills/ support and name the same skills CLI this command uses, but they describe reaching it through Trae's own "find-skills" skill rather than documenting npx skills add run directly from a terminal. We haven't confirmed end-to-end that a bare npx skills add call lands in a spot Trae picks up without also running find-skills first — treat this option as likely-correct-but-unconfirmed, and use Option 1 or 2 (both directly matching Trae's documented native path) if you want a path we've checked against the docs word for word.

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 Trae's Settings > Skills & Commands panel on a repo with the skill installed and check whether it lists firstpass before starting mechanical work

Zero lock-in. It's a policy Trae's agent reads — delete 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 enforce anything at the network layer, and doesn't auto-flag in production — Trae's agent scores the flags itself (measured robust to getting them wrong, see above). Doesn't promise a dollar figure for your workload — savings are workload-dependent, and real workloads escalate more than benchmarks. Every figure on this page is an observation from our tasks and our graders, not a guarantee about your codebase — verification is not proof, it's a reproducible data point you can run yourself. The Skills-vs-Rules distinction and the .agents/skills/ support described above come straight from Trae's own docs, but we haven't independently run this skill inside a live Trae session end-to-end, and the bare npx skills add path is flagged unverified above for the same reason — treat those specific claims as unconfirmed until you check them against Option 1. 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 Trae's agent is currently doing with mechanical work.

View on GitHub