bambu-studio-ai
Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Intelligent model routing for sub-agent task delegation. Choose the optimal model based on task complexity, cost, and capability requirements. Reduces costs by routing simple tasks to cheaper models while preserving quality for complex work.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install bowen31337/intelligent-router打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
CORE SKILL: This skill is infrastructure, not guidance. Installation = enforcement. Run
bash skills/intelligent-router/install.shto activate.
Automatically classifies any task into a tier (SIMPLE/MEDIUM/COMPLEX/REASONING/CRITICAL) and recommends the cheapest model that can handle it well.
The problem it solves: Without routing, every cron job and sub-agent defaults to Sonnet (expensive). With routing, monitoring tasks use free local models, saving 80-95% on cost.
python3 skills/intelligent-router/scripts/router.py classify "task description"
python3 skills/intelligent-router/scripts/spawn_helper.py "task description"
# Outputs the exact model ID and payload snippet to use
python3 skills/intelligent-router/scripts/spawn_helper.py --validate '{"kind":"agentTurn","message":"..."}'
# Cron job without model = Sonnet default = expensive waste
{"kind": "agentTurn", "message": "check server..."} # ← WRONG
# Always specify model from router recommendation
{"kind": "agentTurn", "message": "check server...", "model": "ollama/glm-4.7-flash"}
| Tier | Use For | Primary Model | Cost |
|---|---|---|---|
| 🟢 SIMPLE | Monitoring, heartbeat, checks, summaries | anthropic-proxy-6/glm-4.7 (alt: proxy-4) |
$0.50/M |
| 🟡 MEDIUM | Code fixes, patches, research, data analysis | nvidia-nim/meta/llama-3.3-70b-instruct |
$0.40/M |
| 🟠 COMPLEX | Features, architecture, multi-file, debug | anthropic/claude-sonnet-4-6 |
$3/M |
| 🔵 REASONING | Proofs, formal logic, deep analysis | nvidia-nim/moonshotai/kimi-k2-thinking |
$1/M |
| 🔴 CRITICAL | Security, production, high-stakes | `anthropic... |
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
Version: 2.0.0
License: MIT
An intelligent model routing system for AI agent task delegation. Optimize costs by routing simple tasks to cheaper models while preserving quality for complex work.
The Intelligent Router helps AI agents make smart decisions about which LLM model to use for different tasks. By classifying tasks into four tiers (SIMPLE, MEDIUM, COMPLEX, CRITICAL) and routing them to appropriate models, you can reduce costs by 80-95% without sacrificing quality on important work.
Key benefits:
# Via ClawHub (recommended)
clawhub install intelligent-router
# Or manually
cd skills/
git clone <this-repo> intelligent-router
Edit config.json to define your available models:
{
"models": [
{
"id": "openai/gpt-4o-mini",
"alias": "GPT-4o Mini",
"tier": "MEDIUM",
"provider": "openai",
"input_cost_per_m": 0.15,
"output_cost_per_m": 0.60,
"context_window": 128000,
"capabilities": ["text", "code", "vision"],
"notes": "Great balance of cost and capability"
}
]
}
Required fields:
id — Model identifier (e.g., "provider/model-name")alias — Human-friendly nametier — One of: SIMPLE, MEDIUM, COMPLEX, CRITICALinput_cost_per_m — Cost per million input tokens (USD)output_cost_per_m — Cost per million output tokens (USD)Recommended: Include at least one model per tier for full coverage.
Use the CLI to classify tasks and get model recommendations:
# Classify a task
python scripts/router.py classify "fix aut...
# Intelligent Router — Core Skill
> **CORE SKILL**: This skill is infrastructure, not guidance. Installation = enforcement.
> Run `bash skills/intelligent-router/install.sh` to activate.
## What It Does
Automatically classifies any task into a tier (SIMPLE/MEDIUM/COMPLEX/REASONING/CRITICAL)
and recommends the cheapest model that can handle it well.
**The problem it solves:** Without routing, every cron job and sub-agent defaults to Sonnet
(expensive). With routing, monitoring tasks use free local models, saving 80-95% on cost.
---
## MANDATORY Protocol (enforced via AGENTS.md)
### Before spawning any sub-agent:
```bash
python3 skills/intelligent-router/scripts/router.py classify "task description"
```
### Before creating any cron job:
```bash
python3 skills/intelligent-router/scripts/spawn_helper.py "task description"
# Outputs the exact model ID and payload snippet to use
```
### To validate a cron payload has model set:
```bash
python3 skills/intelligent-router/scripts/spawn_helper.py --validate '{"kind":"agentTurn","message":"..."}'
```
### ❌ VIOLATION (never do this):
```python
# Cron job without model = Sonnet default = expensive waste
{"kind": "agentTurn", "message": "check server..."} # ← WRONG
```
### ✅ CORRECT:
```python
# Always specify model from router recommendation
{"kind": "agentTurn", "message": "check server...", "model": "ollama/glm-4.7-flash"}
```
---
## Tier System
| Tier | Use For | Primary Model | Cost |
|------|---------|---------------|------|
| 🟢 SIMPLE | Monitoring, heartbeat, checks, summaries | `anthropic-proxy-6/glm-4.7` (alt: proxy-4) | $0.50/M |
| 🟡 MEDIUM | Code fixes, patches, research, data analysis | `nvidia-nim/meta/llama-3.3-70b-instruct` | $0.40/M |
| 🟠 COMPLEX | Features, architecture, multi-file, debug | `anthropic/claude-sonnet-4-6` | $3/M |
| 🔵 REASONING | Proofs, formal logic, deep analysis | `nvidia-nim/moonshotai/kimi-k2-thinking` | $1/M |
| 🔴 CRITICAL | Security, production, high-stakes | `anthropic...# Intelligent Router
**Version:** 2.0.0
**License:** MIT
An intelligent model routing system for AI agent task delegation. Optimize costs by routing simple tasks to cheaper models while preserving quality for complex work.
## Overview
The Intelligent Router helps AI agents make smart decisions about which LLM model to use for different tasks. By classifying tasks into four tiers (SIMPLE, MEDIUM, COMPLEX, CRITICAL) and routing them to appropriate models, you can reduce costs by 80-95% without sacrificing quality on important work.
**Key benefits:**
- 📉 **Massive cost savings** — Route simple tasks to cheap models
- 🎯 **Quality where it matters** — Use premium models for critical work
- 🚀 **Simple to use** — Clear tier system and CLI tools
- 🔧 **Fully customizable** — Bring your own models and pricing
- 📊 **Cost estimation** — Know before you spend
## Quick Start
### 1. Installation
```bash
# Via ClawHub (recommended)
clawhub install intelligent-router
# Or manually
cd skills/
git clone <this-repo> intelligent-router
```
### 2. Configuration
Edit `config.json` to define your available models:
```json
{
"models": [
{
"id": "openai/gpt-4o-mini",
"alias": "GPT-4o Mini",
"tier": "MEDIUM",
"provider": "openai",
"input_cost_per_m": 0.15,
"output_cost_per_m": 0.60,
"context_window": 128000,
"capabilities": ["text", "code", "vision"],
"notes": "Great balance of cost and capability"
}
]
}
```
**Required fields:**
- `id` — Model identifier (e.g., "provider/model-name")
- `alias` — Human-friendly name
- `tier` — One of: SIMPLE, MEDIUM, COMPLEX, CRITICAL
- `input_cost_per_m` — Cost per million input tokens (USD)
- `output_cost_per_m` — Cost per million output tokens (USD)
**Recommended:** Include at least one model per tier for full coverage.
### 3. Classify Tasks
Use the CLI to classify tasks and get model recommendations:
```bash
# Classify a task
python scripts/router.py classify "fix aut...Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...
Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...
Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.
Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.