Model routing

SkillAI & models

Your AI can split its Plan/Act/Verify loop across three model tiers: a frontier model plans the work, a cheap model carries it out, and a frontier model judges the results. Each stage of the loop runs on the model tier you assign to it. You choose which models fill each role through environment variables that run.sh reads.

Available today. Use it from your connected AI after setup.

After adding the skill, set the environment variables that name the model for each tier, then run run.sh to start the loop.

Then ask your AI: use the Model routing skill

What your AI can do with it

  • Plan each step with a frontier model
  • Carry out the acting steps on a cheap model
  • Judge the results with a frontier model
  • Assign a different model tier to each stage of the loop
  • Set which models to use through environment variables

What this skill tells your AI

The instructions your AI receives, as published by archive228/loopkit in skills/model-routing/SKILL.md and read by ahel’s review.

run.sh reads three optional env vars and threads them into each claude invocation as --model. All default to unset, in which case the CLI default model is used (behaviour unchanged from a bare run).

The three knobs

  • CLAUDE_PLANNER_MODEL — reserved for /spec workflows that draft PROMPT.md up front. Not read by the current run.sh loop, but claimed here so future planner passes bind to it.
  • CLAUDE_EXECUTOR_MODEL — used on the "do the next step" call. This is the workhorse; it runs on every iteration. Pick something cheap and fast.
  • CLAUDE_JUDGE_MODEL — used on the /verify call. Runs once per iteration to adversarially check the executor's diff. Pick a frontier model — a weak judge is worse than no judge.

Recommended shape

planner  = frontier   (Opus-class, runs once at /spec time)
executor = cheap-fast (Haiku-class, runs every turn)
judge    = frontier   (Opus-class, runs every turn but on a small diff)

Example

export CLAUDE_PLANNER_MODEL="claude-opus-4-7"
export CLAUDE_EXECUTOR_MODEL="claude-haiku-4-7"
export CLAUDE_JUDGE_MODEL="claude-opus-4-7"
./run.sh

The Elvis Executor+Judge finding

A cheap executor paired with a frontier judge outperforms a frontier executor with no judge on long loops. The judge catches the executor's premature-victory claims that a mono-model run rationalises away when it runs out of context. Cost stays low because the judge only sees the diff, not the working history.

Signals

GitHub stars
754
Forks
126
Last commit
Jul 2026
Advanced
Catalog kind
skill
Gateway key
model-routing-archive228
Source
github.com/archive228/loopkit