Undercut for Factory

Droid already has a native Skills folder. Give it one that stops overpaying.

Undercut is a free, MIT-licensed routing policy you drop straight into .factory/skills/, the directory Factory's own docs say Droid discovers automatically — cheap tier first, escalate only on evidence, never on a vibe. Droid has no built-in per-task cost dial of its own to compare against; this exists because the same overpay-by-default pattern we measured elsewhere in the agent ecosystem (see the Claude Code page) shows up anywhere an agent defaults every task to its strongest model.

Install for Factory See the benchmarks
Works anywhere a routing policy can be read
Claude Code Codex Cursor Copilot OpenCode Gemini CLI Factory

How this maps onto Factory

.factory/skills/ is Droid's documented, first-class Skills mechanism.

Per Factory's own Skills reference, Droid discovers Skills from a defined precedence of locations — a folder-specific .factory/skills/ nearest the working directory, the project-level .factory/skills/ at the repo root, a personal ~/.factory/skills/, installed plugins, built-ins, and mission-scoped skill folders, with legacy compatibility paths at .agents/skills/ and .agent/skills/. Each skill is a directory containing an entry point that must be named exactly SKILL.md — the same filename and frontmatter shape (name, description, plus optional fields like disable-model-invocation) that Undercut already ships. Droid reads every skill's name and description up front, matches them against what you're asking it to do, and loads the full body only when a skill applies — the same progressive-disclosure model as Claude Code's own Skills.

That's a genuinely good fit: of every client this site covers, Factory is one of the few with a documented, native SKILL.md-shaped discovery path rather than a repurposed rules file. Factory separately documents AGENTS.md discovery — Droid also walks up to the git root checking .factory/, .agents/, and .agent/ directories (plus personal equivalents in your home folder) for an always-on rules file named AGENTS.md, agents.md, Agents.md, or (for compatibility) CLAUDE.md/Claude.md — but Factory's own docs draw the line clearly: AGENTS.md is for "always-on repository instructions, commands, conventions, and safety rules," while a Skill is a "reusable workflow Droid can choose or the user can invoke." Undercut's routing rubric is a reusable workflow, not a standing house rule, so the Skills path is the better-fitting home for it — with an AGENTS.md append as a belt-and-suspenders option below.

Undercut's tier names — cheap, standard, frontier, apex — are generic on purpose. Factory is model-agnostic, letting you pick from several provider models per session, so models.md gives a rule of thumb rather than a fixed slug: cheap resolves to the smallest/fastest model your Factory workspace has enabled, standard to the default work model, frontier to the highest-reasoning production model, and apex to a single batched tie-break call. Nothing here sits between Droid and its model backend — it's plain markdown text Droid reads into context, no proxy, no network hop, nothing to route around if you remove the folder.

Install for Factory

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

Option 1 — the skills CLI picker (fastest)

skills.sh lists Droid as a supported install target. Run this from your project root and pick Droid when the picker asks which agent to install for:

$ npx skills add undercutsh/firstpass

Option 2 — copy it by hand (confirmed path)

Directly confirmed against Factory's Skills docs: the folder name must match the name field in SKILL.md (firstpass), and the entry point must be named exactly SKILL.md.

$ mkdir -p .factory/skills/firstpass && curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md -o .factory/skills/firstpass/SKILL.md && curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/models.md -o .factory/skills/firstpass/models.md

Prefer it available in every repo instead of just this one? Copy the same folder to ~/.factory/skills/firstpass (personal scope) rather than the project's .factory/skills/.

Option 3 — also append to AGENTS.md

Belt-and-suspenders: if you'd rather the rubric read as a standing rule than a workflow Droid has to choose to invoke, append the same text to the project's AGENTS.md, one of the files Droid's documented discovery walk reads automatically from the repo root.

$ curl -fsSL https://raw.githubusercontent.com/undercutsh/firstpass/main/skills/firstpass/SKILL.md >> AGENTS.md

What's still unverified: we have confirmed .factory/skills/, its precedence, and the SKILL.md shape against Factory's own docs, and skills.sh independently lists Droid as a supported install target — but we have not run npx skills add against a live Droid session ourselves to confirm it writes to that exact path rather than, say, .agents/skills/. If Option 1 lands somewhere unexpected, Option 2's manual copy is the one we've checked directly against Factory's documentation. We also have not independently confirmed whether Droid invokes this skill on its own initiative for mechanical batch work or mostly waits for an explicit request — Factory's docs describe both model-triggered and user-invoked selection, but a skill's real-world pickup rate depends on how closely your prompts match its description.

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. 3Ask Droid to run /firstpass (or describe a batch of mechanical work) on one small task and check which tier it names — a single smoke test is pennies

Zero lock-in. It's a folder Droid reads — delete it 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 (Droid scores the flags itself — measured robust to getting them wrong, see above), and doesn't promise a dollar figure for your workload. It also doesn't prove your number until you run it — every figure here is an observation from our tasks and our graders, not a guarantee about yours. We've confirmed .factory/skills/ and its SKILL.md shape against Factory's own docs, but we haven't run the npx skills add picker or a live Droid session ourselves end-to-end, and we haven't verified how reliably Droid self-invokes this skill versus waiting to be asked — see the install callout above for the specifics. 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 Droid is currently doing with mechanical work.

View on GitHub