Agent skill

Gate Check

by undefined-ui in undefined-ui/second-brain-os

Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing.

MITAuto-check passedKnowledge Management

Install Gate Check

skills CLI
$ npx skills add undefined-ui/second-brain-os --skill gate-check -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install undefined-ui/second-brain-os gate-check --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/undefined-ui/second-brain-os.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/agents-course/skills/gate-check .claude/skills/gate-check && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gate-check
GitHub stars
999
Token cost
~861 tokens
SKILL.md length
391 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
MIT

At a glance

Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing.

  • Works in 5 steps: Map the decisions. Read the pipeline's… → Count what each costs today. For each… → Propose the cheapest gate that can hold… → …
  • The user asks to cut model costs
  • SKILL.md covers Workflow and Output format
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gate Check is an agent skill from undefined-ui/second-brain-os. Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing. Use when the user asks to cut model costs or latency, says the big model handles everything, or wants a triage / routing / filter layer in front of an agent. Analysis plus an optional baseline scaffold. Do NOT use for auditing context layout (context-audit) or for building eval suites (evals-bootstrap).

Its SKILL.md is about 860 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management, covering LLM evaluation. The repository describes itself as: An AI second brain that maintains itself. Full guide, starter vault, agent skills and scripts for a self-organizing knowledge base in Claude Code and Obsidian. The licence is MIT.

When your agent uses it

  • The user asks to cut model costs
  • Says the big model handles everything
  • Wants a triage / routing / filter layer in front of an agent
  • Auditing context layout (context-audit)

Example prompts

  • “/gate-check”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Map the decisions. Read the pipeline's entry points and prompts and
  2. Count what each costs today. For each decision currently made by the
  3. Propose the cheapest gate that can hold it, in rising order of cost
  4. Route fail-closed. Every gate needs a confidence threshold, and doubt
  5. Offer the baseline scaffold. If the user wants to proceed, generate

What it can do on your machine

Read from SKILL.md and the folder at commit d6861cc. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • undefined-ui.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gate Check loads about 861 tokens when it runs. Until then it costs about 123 tokens; SKILL.md has 391 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~861

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from undefined-ui/second-brain-os at commit d6861cc, republished under its MIT licence (© undefined-ui). 391 words, ~861 tokens.

Download SKILL.mdSave it as .claude/skills/gate-check/SKILL.md (or your agent's skills folder).
name
gate-check
description
Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing. Use when the user asks to cut model costs or latency, says the big model handles everything, or wants a triage / routing / filter layer in front of an agent. Analysis plus an optional baseline scaffold. Do NOT use for auditing context layout (context-audit) or for building eval suites (evals-bootstrap).

Find the gates

Theory: Cheap decisions and Gate practice. An agent does two kinds of work: it writes, which needs a big model, and it decides — is this spam, which queue, does this need a person — which is a bounded question the answer to which comes from a set you already know. A gate is a cheap decision layer that sorts the stream so the expensive model only sees the items that actually need judgement.

Workflow

  1. Map the decisions. Read the pipeline's entry points and prompts and list every decision made before or during a model call: classification, routing, filtering, yes/no triage, priority, language, "is this even for us". Ignore the writing — only bounded decisions with a known label set.
  2. Count what each costs today. For each decision currently made by the big model: calls per day if known, tokens per call, and what a wrong answer costs. A decision worth one bit that burns a frontier call is the headline finding.
  3. Propose the cheapest gate that can hold it, in rising order of cost:
    • a rule — regex, allowlist, header check: free, instant, blind to anything unanticipated; always the first layer, never the last
    • a classic classifier — logistic regression or similar over simple features, trained on a few hundred labelled examples: milliseconds, fractions of a cent, and the baseline every fancier option must beat
    • a small / System One model — when the input is too varied for features but the output is still a label with a confidence score
  4. Route fail-closed. Every gate needs a confidence threshold, and doubt goes down the safe path: unsure means escalate to the big model (or a person), never means guess. Say explicitly what each gate's unsure route is.
  5. Offer the baseline scaffold. If the user wants to proceed, generate the module's thirty-minute exercise for their data: a label.py that samples ~200 real examples for hand-labelling, and a baseline.py that trains the classic classifier and prints accuracy against a held-out split. Every vendor claim and small-model option must beat this number on their data before it earns a place in the pipeline.
Show full SKILL.md (39 more words)Show less

Output format

Gate check — <pipeline>
decisions found: <n>, currently on the big model: <n>

1. <decision> — <where in the code>
   today: <who decides, est. cost>   label set: <the labels>
   gate: <rule | classifier | small model> — <why this tier>
   unsure -> <escalation path>
   saves: <est. calls/tokens diverted>
...

Rank by savings. If a decision genuinely needs the big model — open-ended, no stable label set, wrong answers are cheap to fix — say so and leave it alone; a gate that guesses is worse than no gate.

© undefined-ui, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/agents-course/skills/gate-check of undefined-ui/second-brain-os.

Open the folder on GitHubat commit d6861cc

Compare with similar skills

Gate Check next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gate Check compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gate Check this skillundefined-ui/second-brain-os999—~861Automated safety check: PassMIT
SDK AI Bot Run EvaluationAzure/azure-sdk-tools134—~1.1kAutomated safety check: NotesMIT
Qmdalsk1992/CloddsBot2.9k3 repos~1.2kAutomated safety check: PassMIT
Gitnexus CLIaws-samples/sample-kolya-br-proxy10610 repos~822Automated safety check: PassMIT-0
Ragu BuildRaguTeam/RAGU135—~3.8kAutomated safety check: NotesMIT
Analyze Id Eval Rankingopen-thoughts/OpenThoughts-Agent301—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • SDK AI Bot Run Evaluation

    Azure/azure-sdk-tools

    Official

    Run Azure SDK QA bot evaluations on curated datasets locally, including a single test case.

    134 GitHub stars~1.1k tokensUpdated yesterday
    Knowledge ManagementAuto-check: notes
  • Qmd

    alsk1992/CloddsBot

    Local hybrid search for markdown notes and docs. An agent skill from alsk1992/CloddsBot.

    2.9k GitHub starsUsed in 3 repos~1.2k tokens
    Knowledge ManagementAuto-check passed
  • Gitnexus CLI

    aws-samples/sample-kolya-br-proxy

    Official

    A skill your agent uses when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos.

    106 GitHub starsUsed in 10 repos~822 tokens
    Knowledge ManagementAuto-check passed
  • Ragu Build

    RaguTeam/RAGU

    Interview the user about their RAGU use case, select an appropriate RAGU pipeline, and generate a validated ragubuild.yaml plus a runnable build<name.py script.

    135 GitHub stars~3.8k tokensUpdated 3 days ago
    Knowledge ManagementAuto-check: notes
  • Analyze Id Eval Ranking

    open-thoughts/OpenThoughts-Agent

    Given a list of models (HF name stubs) that have valid agentic ID eval scores in Supabase, build a ranking table: raw per-benchmark accuracy on the 3 ID benchmarks (SWE-Bench-100…

    301 GitHub stars~3.1k tokensUpdated 9 days ago
    Research & ScienceAuto-check passed
  • Using Mineecho Skills

    Health-Yang/MineEcho

    技能系统导航。当用户询问"你能做什么"、"有什么功能"、"有什么技能"或不确定如何完成某个任务时,使用此技能列出所有可用技能并建议最合适的技能。此技能是每个对话开始时默认加载的,用于技能发现。

    220 GitHub stars~124 tokensUpdated 4 mo ago
    Knowledge ManagementAuto-check passed

More from undefined-ui/second-brain-os

All 23 skills in this repo
  • Context Audit

    undefined-ui/second-brain-os

    Audit an agent's context layout against the four places: system prompt, tools, history, tail.

    999 GitHub stars~810 tokensUpdated 8 days ago
    Auto-check passed
  • Evals Bootstrap

    undefined-ui/second-brain-os

    Scaffold a first eval suite for an agent: mine real failures into cases, write behavioural checks over traces, and generate the runner.

    999 GitHub stars~793 tokensUpdated 8 days ago
    Auto-check passed
  • Goal Test

    undefined-ui/second-brain-os

    Turn a vague task into a testable definition of done and generate an executable goal-test script for it, optionally with a bounded retry loop around a headless agent.

    999 GitHub stars~761 tokensUpdated 8 days ago
    Auto-check passed
  • Harness Audit

    undefined-ui/second-brain-os

    Audit an agent's harness against the four rings: containment, guides, sensors, permissions.

    999 GitHub stars~862 tokensUpdated 8 days ago
    Auto-check passed
  • Second Brain Chat Import

    undefined-ui/second-brain-os

    Triage an exported chat history into what to ingest, what to archive and what to delete, with a privacy pass first.

    999 GitHub stars~527 tokensUpdated 8 days ago
    Auto-check passed
  • Second Brain Graph

    undefined-ui/second-brain-os

    Analyse the vault's link graph and report on its shape: orphan rate, average degree, components, hubs, bridges and clusters, with what each number means for retrieval.

    999 GitHub stars~533 tokensUpdated 8 days ago
    Auto-check passed

Questions about Gate Check

What does Gate Check do?

Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing. Gate Check is an agent skill from undefined-ui/second-brain-os. Find the decisions in a pipeline that do not need the expensive model and propose the gate for each: a rule, a classic classifier, or a small model, with fail-closed routing.

When should I use Gate Check?

Gate Check fits situations like: the user asks to cut model costs; says the big model handles everything; wants a triage / routing / filter layer in front of an agent; auditing context layout (context-audit).

How do I install Gate Check in Claude Code?

Run `npx skills add undefined-ui/second-brain-os --skill gate-check -a claude-code`. Or copy the skill folder (plugins/agents-course/skills/gate-check in undefined-ui/second-brain-os) into .claude/skills/gate-check in your project. Claude Code loads it when a task matches its description.

How do I install Gate Check in Codex?

Run `npx skills add undefined-ui/second-brain-os --skill gate-check -a codex`. Or copy the skill folder (plugins/agents-course/skills/gate-check in undefined-ui/second-brain-os) into .agents/skills/gate-check in your project. Codex loads it when a task matches its description.

Can I use Gate Check in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add undefined-ui/second-brain-os --skill gate-check -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gate-check, .gemini/skills/gate-check, .github/skills/gate-check and .opencode/skills/gate-check in your project.

What does Gate Check need to run?

SKILL.md names no scripts, command-line tools or credentials: Gate Check is instructions for the agent only.

Does Gate Check access the network?

SKILL.md names 1 domain. As links in the text: undefined-ui.github.io. This is read from the text; nothing was executed.

Is Gate Check safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gate Check use?

Gate Check is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gate Check use?

About 861 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gate Check?

Skills that share tags, products or a category with Gate Check: SDK AI Bot Run Evaluation (Azure/azure-sdk-tools, 134 stars), Qmd (alsk1992/CloddsBot, 2.9k stars), Gitnexus CLI (aws-samples/sample-kolya-br-proxy, 106 stars) and Ragu Build (RaguTeam/RAGU, 135 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gate Check?

undefined-ui (a GitHub user) maintains it in undefined-ui/second-brain-os, which has 999 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on September 29, 2026.

Source: undefined-ui/second-brain-os on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.