LLM Council on Fireworks AI
dair-ai/dair-academy-plugins
Has several open-weight models answer a question, rank each other's anonymized answers, then lets a chairman model write the final response through Fireworks AI.
9-tier model routing system with cascading classifier fallback and result auto-evaluation
$ npx skills add alinaqi/maggy --skill model-routing -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install alinaqi/maggy model-routing --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/model-routing .claude/skills/model-routing && rm -rf skills-srcUse ~/.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/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .claude/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/alinaqi/maggy/tree/main/skills/model-routingType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add alinaqi/maggy --skill model-routing -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install alinaqi/maggy model-routing --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/model-routing .agents/skills/model-routing && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .agents/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill model-routing -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install alinaqi/maggy model-routing --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/model-routing .cursor/skills/model-routing && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .cursor/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/alinaqi/maggy.git --path skills/model-routing--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add alinaqi/maggy --skill model-routing -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install alinaqi/maggy model-routing --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/model-routing .gemini/skills/model-routing && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .gemini/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install alinaqi/maggy model-routingInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add alinaqi/maggy --skill model-routing -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/model-routing .github/skills/model-routing && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .github/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add alinaqi/maggy --skill model-routing -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install alinaqi/maggy model-routing --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/alinaqi/maggy.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/model-routing .opencode/skills/model-routing && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "model-routing" agent skill from https://github.com/alinaqi/maggy/tree/main/skills/model-routing into .opencode/skills/model-routing/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-routing", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
model-routing9-tier model routing system with cascading classifier fallback and result auto-evaluation
Model Routing is an agent skill from alinaqi/maggy. 9-tier model routing system with cascading classifier fallback and result auto-evaluation
Its SKILL.md is about 1.5k 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 AI & LLM Engineering, covering Model routing and gateways. It works with Kimi, DeepSeek and Qwen. The repository describes itself as: What started as an opinionated Claude Code setup kit is now an autonomous AI engineering command center. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 72a456e. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
geminiclaudecodexollamaFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
DEEPSEEK_API_KEYGEMINI_API_KEYOPENAI_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Model Routing loads about 1.5k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 472 words of instructions outside code blocks.
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.
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.
The full file from alinaqi/maggy at commit 72a456e, republished under its MIT licence (© alinaqi). 472 words, ~1,508 tokens.
.claude/skills/model-routing/SKILL.md (or your agent's skills folder).Every user prompt goes through a 9-tier classification pipeline before any AI model processes it. The system answers three questions:
User types prompt
↓
UserPromptSubmit hook fires (~/.claude/hooks/route-task-hook)
↓
Classifier: qwen3 (local, free) classifies into tier
↓ (fails?)
Classifier: kimi (local, free) retries
↓ (fails?)
Classifier: deepseek-flash (~$0.0001) retries
↓ (fails?)
Classifier: cached tier from last success
↓
Hook injects routing decision into Claude's context
↓
Claude delegates to the right model or handles directly| Tier | Model | Input (per M) | Output (per M) | Handles |
|---|---|---|---|---|
| 0 | Qwen3 (local) | $0 | $0 | grep, find, shell, syntax, log reading |
| 1 | Gemini 2.5 Flash-Lite | $0.10 | $0.40 | Bulk extraction, classification, CIG pipelines |
| 2 | DeepSeek V4 Flash | $0.14 | $0.28 | Simple code, CRUD, test writing, small fixes |
| 3 | DeepSeek V4 Pro | $0.44 | $0.87 | Multi-file features, refactors, debugging (~80% of work) |
| 4 | Gemini 2.5 Flash | $0.15 | $0.60 | Multimodal (images, video, audio), brand analysis |
| 5 | Kimi K2.6 | $0.60 | $2.50 | Code review, commit messages, diff summaries |
| 6 | Gemini 3.1 Pro + Search | $1.25 | $10.00 | Deep research, Google grounding, 2M context |
| 7 | Codex | varies | varies | Bulk generation, code review |
| 8 | Claude Sonnet/Opus | $3-5 | $15-25 | Architecture, security, quality-critical |
When the hook says "delegate to X", run the matching command and return its output:
# Tier 0 — Qwen3
~/bin/qwen3 "prompt"
# Tier 1 — Gemini Flash-Lite
~/bin/gemini --flash-lite "prompt"
# Tier 2 — DeepSeek Flash
~/bin/deepseek --flash "prompt"
# Tier 3 — DeepSeek Pro
~/bin/deepseek --pro "prompt"
# Tier 4 — Gemini Flash
~/bin/gemini --flash "prompt"
# Tier 5 — Kimi
~/bin/kimi --quiet -p "prompt"
# Tier 6 — Gemini Pro Search
~/bin/gemini --pro-search "prompt"
# Tier 7 — Codex
codex exec "prompt"
# Tier 8 — Claude
# Handle directly (no delegation)Every ~/bin/ script follows the same pattern:
script "what is 2+2"--flash, --pro, --flash-lite, --pro-search--quiet (where applicable)~/bin/
├── qwen3 # Shell: curl to local Ollama API
├── kimi # Shell: execs Kimi CLI binary
├── deepseek # Python: httpx to DeepSeek Anthropic-compat API
├── gemini # Python: httpx to Gemini OpenAI-compat API
├── research # Python: multi-backend research with auto-evaluation
└── route-task # Shell: qwen3-powered task classificationThe classifier itself can fail. When it does, cascading fallback kicks in:
| Level | Classifier | Cost | Threshold |
|---|---|---|---|
| 1 | qwen3 (Ollama) | $0 | 2s connect, 8s classify |
| 2 | kimi CLI | $0 | Local process |
| 3 | deepseek-flash | ~$0.0001 | API call |
| 4 | Cached tier | $0 | From ~/.claude/routing-cache.json |
The cache (~/.claude/routing-cache.json) saves the last successful tier and timestamp. After compaction, when Ollama may be briefly unreachable, the cache ensures routing continues without dropping to CLAUDE by default.
When Claude's built-in tools fail, external backends take over:
| Failed Tool | Fallback 1 | Fallback 2 |
|---|---|---|
| WebSearch / WebFetch | ~/bin/research "query" | ~/bin/deepseek --pro "query" |
| Read / file access | cat via Bash | — |
| Grep | grep -r via Bash | — |
~/bin/research)Multi-backend research with auto-evaluation:
~/bin/research --eval~/.claude/research-eval.jsonlMaggy's model_router.py mirrors the same 9-tier structure in DEFAULT_TIERS. The PiAdapter uses the same delegation scripts for execution. Task type overrides in routing_rules_defaults.py ensure:
research, competitor → Gemini Pro Search (Google grounding)bulk → Gemini Flash-Lite (cheapest)security, architecture, planning → Claude (quality-critical)docs, tests → DeepSeek Pro (cost-efficient)review → Claude (security + architecture depth)# Required for delegation scripts (in ~/.zshrc)
export DEEPSEEK_API_KEY="sk-..."
export GEMINI_API_KEY="..." # For gemini delegator
export OPENAI_API_KEY="sk-..." # For codex CLI
# Ollama must be running locally for qwen3
ollama serve # or launch at startup~/.claude/routing-log.jsonl — every classification with tier, classifier used, tokens saved~/.claude/routing-cache.json — last tier for post-compact recovery~/.claude/research-eval.jsonl — per-query backend scoring© alinaqi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/model-routing of alinaqi/maggy.
Open the folder on GitHubat commit 72a456e
Model Routing 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Model Routing this skillalinaqi/maggy | 707 | — | ~1.5k | Automated safety check: Pass | MIT | |
| LLM Council on Fireworks AIdair-ai/dair-academy-plugins | 614 | — | ~5k | Automated safety check: Notes | MIT | |
| Claude Maintain ModelsKiln-AI/Kiln | 5.2k | — | ~15k | Automated safety check: Notes | Custom licence | |
| LLM Pipeline Profiler AnalysisBBuf/AI-Infra-Auto-Driven-SKILLS | 938 | — | ~3.9k | Automated safety check: Pass | None | |
| Update Ollama Cloud Modelsheypinchy/pinchy | 182 | — | ~3.9k | Automated safety check: Notes | AGPL-3.0 | |
| OmniRoute Chat CLIdiegosouzapw/OmniRoute | 75k | — | ~345 | Automated safety check: Pass | MIT |
dair-ai/dair-academy-plugins
Has several open-weight models answer a question, rank each other's anonymized answers, then lets a chairman model write the final response through Fireworks AI.
Kiln-AI/Kiln
Add new AI models to Kiln's mlmodellist.py and produce a Discord announcement.
BBuf/AI-Infra-Auto-Driven-SKILLS
Breaks LLM torch profiler traces down by forward pass, layer and kernel, with timing tables and Perfetto time ranges for the layers you want to inspect.
heypinchy/pinchy
A skill your agent uses when a new Ollama Cloud model is announced or available (e.g.
diegosouzapw/OmniRoute
Sends chat completions, streams responses, and opens an interactive REPL against any OmniRoute-routed model provider.
davila7/claude-code-templates
Implements the NOWAIT technique for efficient reasoning in R1-style LLMs.
alinaqi/maggy
AI Engine Optimization - semantic triples, page templates, content clusters for AI citations
alinaqi/maggy
Claude Code Agent Teams - default team-based development with strict TDD pipeline enforcement
alinaqi/maggy
Latest AI models reference - Claude, OpenAI, Gemini, Eleven Labs, Replicate
alinaqi/maggy
Android Java development with MVVM, ViewBinding, and Espresso testing
alinaqi/maggy
Android Kotlin development with Coroutines, Jetpack Compose, Hilt, and MockK testing
alinaqi/maggy
AI-driven testing agent that auto-discovers, generates, executes, evaluates, and fixes tests for any project type
Categories
9-tier model routing system with cascading classifier fallback and result auto-evaluation. Model Routing is an agent skill from alinaqi/maggy.
Model Routing fits situations like: tasks that involve Model routing and gateways.
Run `npx skills add alinaqi/maggy --skill model-routing -a claude-code`. Or copy the skill folder (skills/model-routing in alinaqi/maggy) into .claude/skills/model-routing in your project. Claude Code loads it when a task matches its description.
Run `npx skills add alinaqi/maggy --skill model-routing -a codex`. Or copy the skill folder (skills/model-routing in alinaqi/maggy) into .agents/skills/model-routing in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alinaqi/maggy --skill model-routing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/model-routing, .gemini/skills/model-routing, .github/skills/model-routing and .opencode/skills/model-routing in your project.
Going by SKILL.md and its folder, Model Routing needs the command-line tools its instructions call (gemini, claude, codex and ollama) and credentials named DEEPSEEK_API_KEY, GEMINI_API_KEY and OPENAI_API_KEY. Our summary lists: A credential in DEEPSEEK_API_KEY; A credential in GEMINI_API_KEY.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
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.
Model Routing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Model Routing: LLM Council on Fireworks AI (dair-ai/dair-academy-plugins, 614 stars), Claude Maintain Models (Kiln-AI/Kiln, 5.2k stars), LLM Pipeline Profiler Analysis (BBuf/AI-Infra-Auto-Driven-SKILLS, 938 stars) and Update Ollama Cloud Models (heypinchy/pinchy, 182 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
alinaqi (a GitHub user) maintains it in alinaqi/maggy, which has 707 GitHub stars. The repository holds 71 skills in this directory. The repository was last updated on September 24, 2026.
Source: alinaqi/maggy on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.