ai-model-router

ai-model-router is a skill for Claude Code, Codex from LeoYeAI/openclaw-master-skills. It costs 0 tokens per session (794 once invoked), scanned A, a copy of ai-model-router, MIT.

A tool that chooses between configured local and cloud AI models based on the task and privacy needs. It can detect local models such as Ollama and LM Studio and list available models.

In plain words
What is it for?
Use it to route simple and complex requests, switch between local and cloud models, and inspect available model configurations.
Why use it?
It removes the need to manually choose a model for every request. Sensitive information can stay with a local model, while harder tasks can use a cloud model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to route simple and complex requests, switch between local and cloud models, and inspect available model configurations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/leoyeai/openclaw-master-skills/ai-model-router
About the project

OpenClaw Master Skills is a curated, regularly updated collection of skills that extends an AI personal assistant platform with capabilities such as research, browser automation, presentation creation, and prompt work. It is intended for people using OpenClaw or MyClaw.ai to give their agents additional tasks and workflows. The catalogue contains many skills and agents from this collection.

LeoYeAI/openclaw-master-skills · 2,141 stars · on GitHub · myclaw.ai

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LeoYeAI/openclaw-master-skills --skill ai-model-router
Clone the repo
git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai-model-router

README.md
[![agentmods](https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/ai-model-router/github.svg)](https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-model-router)
Your own site
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-model-router"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/ai-model-router/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ai-model-router

Your own site · 80×15
<a href="https://agentmods.dev/skills/leoyeai/openclaw-master-skills/ai-model-router"><img src="https://agentmods.dev/badge/skills/leoyeai/openclaw-master-skills/ai-model-router.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00794
Opus 5 $0.00000 $0.00397
Sonnet 5 $0.00000 $0.00159
Haiku 4.5 $0.00000 $0.00079

Measured 9d ago against content hash 1c03995ca5ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

ai-model-router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (skill/context.py, skill/detector.py, skill/router.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to ai-model-router — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/ai-model-router/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.


name: ai-model-router description: Intelligent AI model router that automatically switches between two configured models (local for simple tasks, cloud for complex ones). Detects local models (Ollama, LM Studio) automatically, routes based on task complexity and privacy. Use when users ask to "switch model", "use local/cloud model", or mention API keys/passwords (triggers privacy mode). Trigger on: sensitive data detection (forces local), complex tasks like "design architecture" (uses cloud), or configuration requests. version: 1.0.0

AI Model Router

Compact, intelligent model routing that just works.

Quick Start

# Install
npx clawhub@latest install ai-model-router

# First run - auto-detects your models
python3 skill/core/router.py "What is Python?"

# List available models
python3 skill/core/router.py --list

How It Works

Your Request → Analyze → Select Model
                          ↓
                    Simple? → Primary (fast/cheap)
                    Complex? → Secondary (capable)
                    Private? → Primary (forced)

Scoring (from model-router-premium)

Pattern Points
Microservices, architecture +10
Design, implement, optimize +5
Explain, analyze, compare +3
Syntax, example, "what is" -3

Threshold: 5 (simple vs complex)

Features

Feature Status
Auto-detect local models ✓ (Ollama, LM Studio)
Cloud model registry ✓ (7 built-in)
Privacy detection ✓ (API keys, passwords)
Context tracking ✓ (conversations)
JSON config ✓ (optional)
CLI interface
Core code size ~200 lines

CLI

# Route a task
python3 skill/core/router.py "Design a system"
python3 skill/core/router.py "What is a for loop?"

# Options
--json                    # JSON output
--force primary           # Force primary model
--list                    # List all models
--status                  # Show status

Read the full file on GitHub · 120 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 120 lines · 0 tokens per session scan A 1c03995ca5ae

Subscribe to this mod's changes

ai-model-router is a skill published in the GitHub repository LeoYeAI/openclaw-master-skills (2,141 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 794 tokens. A static security scan graded it A with 0 findings. It is 100% identical to ai-model-router, differing in 0 lines, and is treated as a copy.