Gate Check — LLM Cost Triage Analysis
Finds pipeline decisions that don't need a frontier model and proposes the cheapest gate — rule, classic classifier, or small model — with fail-closed routing.
Dev & CodingIntermediate★ 815⑂ 128AI score 8/10Last updated: Sep 29, 2026
What it does
- Reads your pipeline's entry points and prompts, then lists every bounded decision: classification, routing, filtering, yes/no triage, priority, language, "is this even for us".
- Estimates today's cost per decision (calls/day, tokens per call, cost of a wrong answer) to surface one-bit questions burning frontier calls.
- Proposes the cheapest gate that can hold each decision, in rising order: rule (regex, allowlist, header check) → classic classifier (logistic regression on a few hundred labelled examples) → small / System One model when inputs are too varied for features.
- Requires a confidence threshold and an explicit fail-closed route for every gate: unsure escalates to the big model or a human, never guesses.
- Optionally generates a baseline scaffold:
label.pyto sample ~200 real examples for hand-labelling, andbaseline.pyto train the classic classifier and print held-out accuracy — the number every vendor claim must beat. - Emits a ranked report sorted by savings, and explicitly leaves alone decisions that genuinely need the big model.
Who it's for
- Teams running LLM agents or pipelines where API cost and latency hurt.
- Backend / ML engineers cleaning up a "send everything to the big model" architecture.
- Anyone adding a triage, routing, or filter layer in front of an agent.
Examples
- "Our support-ticket pipeline is too expensive — find what doesn't need the big model" → identifies spam filtering, language detection, and queue assignment, and maps them to rules plus a classifier.
- "I want a triage layer in front of my agent" → defines the label set, threshold, and escalation path for unsure cases.
- "A vendor claims 90% accuracy with their small model — is that good?" → builds a baseline on your own data with
label.pyandbaseline.pyfor a fair comparison.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/undefined-ui/second-brain-os/HEAD/plugins/agents-course/skills/gate-check/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the plugins/agents-course/skills/gate-check folder from the GitHub repo undefined-ui/second-brain-os into my ~/.claude/skills/gate-check/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/undefined-ui/second-brain-os.git && mkdir -p ~/.claude/skills && cp -r second-brain-os/plugins/agents-course/skills/gate-check ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal.
- Clone the repo:
git clone https://github.com/undefined-ui/second-brain-os.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r second-brain-os/plugins/agents-course/skills/gate-check ~/.claude/skills/ - Verify that
~/.claude/skills/gate-check/SKILL.mdexists. - Restart Claude Code, then ask something like "cut my model costs — run a gate check on this pipeline".
- Run it from the directory containing your pipeline code and prompts for the most accurate analysis.
View source on GitHub ↗License: MIT