agentsclimarketplace

Model router

Skill philgoodvibe/aiai-mastermind-tools-and-skills/skills/model-router/skills/model-router

AiAi Mastermind Tools & Skills — shareable agent skills for Claude Code, Codex, Gemini & friends. First skill: wiki-llm (build a compounding Obsidian knowledge wiki from your documents).

Install
npx -y skills add philgoodvibe/aiai-mastermind-tools-and-skills --skill model-router

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

How to run Claude Code sessions, one-shot workers, and subagents on any model through the local proxy - model IDs, env config, and the three usage modes

SKILL.md

2.8 KB, as published. Nobody here has run it

Model Router - routing knowledge

This skill teaches the three ways to run work on a routed model (any model your proxy serves), and how to switch models. The proxy is CLIProxyAPI running locally; it holds the user's OTHER subscription logins (ChatGPT/Codex, Gemini, Grok, Kimi). The main Claude session always stays on its normal direct login.

Configuration (shared by everything in this plugin)

Env varDefaultMeaning
MODEL_ROUTER_URLhttp://127.0.0.1:8317proxy address
MODEL_ROUTER_KEYmy-proxy-keyan api-keys entry from the proxy's config.yaml
MODEL_ROUTER_MODELgpt-5.6-soldefault routed model
MODEL_ROUTER_EFFORTlowdefault worker effort

Mode 1 - orchestrator + worker (the flagship): /fabsol <brief>

Your main model plans and verifies; the routed model does 100% of the building via headless calls. Cheapest way to ship real builds - see the fabsol command.

Mode 2 - one-shot worker run (any model, one task)

ANTHROPIC_BASE_URL="${MODEL_ROUTER_URL:-http://127.0.0.1:8317}" \
ANTHROPIC_AUTH_TOKEN="${MODEL_ROUTER_KEY:-my-proxy-key}" \
claude -p "the task" \
  --model "${MODEL_ROUTER_MODEL:-gpt-5.6-sol}" \
  --effort "${MODEL_ROUTER_EFFORT:-low}" \
  --bare --max-turns 20 --permission-mode acceptEdits

Or use the wrapper: scripts/worker.sh "the task" [model] [effort] (scripts/worker.ps1 on Windows).

Mode 3 - full session on a routed model (terminal or VSCode)

scripts/session.sh [model] (or session.ps1) launches a whole Claude Code terminal session on the routed model. scripts/vscode.sh [folder] (or vscode.ps1) does the same for a VSCode window - it uses a separate VSCode profile dir because an already-running VSCode ignores new env vars. In such a session, the plugin's worker subagent also resolves, so subagents can run on routed models too.

Switching models

Any ID the proxy serves works everywhere a model is named. Discover what your proxy serves:

curl -s "${MODEL_ROUTER_URL:-http://127.0.0.1:8317}/v1/models" \
  -H "Authorization: Bearer ${MODEL_ROUTER_KEY:-my-proxy-key}"

Only logged-in providers appear. Set MODEL_ROUTER_MODEL to switch the default everywhere at once, or pass a model per call. See the README's model table for provider login commands.

Hard rule

NEVER set ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN on the main session's environment or route a Claude subscription login through the proxy - Anthropic's terms ban subscription OAuth in third-party tools. Routed env vars belong on individual headless calls (or a deliberate scripts/session launch for non-Claude models) only.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.