LaunchKit · 2026
Back to Skills

Cost-optimize AI agent operations by routing tasks to appropriate models based on complexity.

2
431 downloads
by @gigabit-eth

Setup & Installation

openclaw skills install @gigabit-eth/router

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install router

Version History

v1.0.2Feb 16, 2026 - Version note by skill developer:

- Added manifest.json and skill.json files for improved metadata and compatibility. - Updated documentation to include a privacy note about model logging and a warning not to route sensitive data through free/unmoderated models. - No changes to routing logic or classification guidance.

What This Skill Does

Routes AI agent tasks to the cheapest model capable of handling them. Classifies work into routine, moderate, and complex tiers, then maps each to free through premium model options with pricing tables. Includes a decision algorithm and OpenClaw configuration for mid-session model switching and sub-agent spawning.

Reduces AI API costs 6-10x by matching task complexity to model capability instead of running everything on a premium model.

When to use it

  • Switching to a cheap model mid-session for bulk file reformatting
  • Spawning a DeepSeek sub-agent to fetch and parse 50 URLs
  • Escalating to Opus when a Sonnet-level model gets stuck on a multi-step bug
  • Running overnight endpoint health checks on free-tier models at zero cost
  • Batching agentic coding sub-tasks through Qwen3 Coder to cut monthly API spend

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: refactor these 30 test files to use the new shared helper

AGENT
  1. 1Classify the task as routine file operations, targeting Tier 1
  2. 2Select deepseek/deepseek-chat or qwen/qwen3-coder-next as the dispatch model
  3. 3Spawn a sub-agent with an explicit model field set to the Tier 1 choice
  4. 4Sub-agent executes refactoring and reports results back to the parent session
  5. 5Parent session resumes on its original model without cost bleed from routine work
OUTPUT

30 test files refactored at roughly $0.03 instead of $0.45 on Claude Sonnet

Requirements

Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.

OpenRouter API key from openrouter.ai/keys