Overview
- Skill Key
- astralwaveorg/smart-router-skill
- Author
- astralwaveorg
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/astralwaveorg/smart-router-skill
- Latest Commit SHA
- 9a78914222d2d02da3c4c79be1e5a8ddf6c990e2
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 Smart Router Skill 技能。 若已安装,则直接安装 Smart Router Skill 技能。
# 智能路由器技能
## 概述
智能路由器是一个先进的模型调度系统,它超越了简单的关键词匹配,使用多维度分析来为每个消息选择最合适的模型。系统包含成本优化、自动模型扫描和性能监控功能。
## 功能特性
### 🎯 智能路由
- **多维度分析**:消息长度、内容复杂度、模式识别
- **动态模型选择**:基于任务类型自动选择最佳模型
- **成本感知**:优先使用免费模型,复杂任务才用付费模型
- **上下文感知**:考虑对话历史和用户偏好
### 💰 成本优化
- **预算控制**:设置每日/每月预算限制
- **自动降级**:简单任务自动使用免费模型
- **使用统计**:实时监控各模型成本
- **智能提醒**:成本接近阈值时预警
### 🔄 自动化管理
- **定期扫描**:自动发现OpenRouter免费模型
- **性能监控**:实时监控路由性能和系统健康
- **自动备份**:定期备份配置和日志
- **规则优化**:基于使用数据自动优化路由规则
## 安装和配置
### 前提条件
- OpenClaw 2026.2.13 或更高版本
- Node.js 18+
- OpenRouter API密钥(用于模型扫描)
### 快速安装
```bash
# 1. 复制技能文件到OpenClaw技能目录
cp -r smart-router-skill /opt/homebrew/lib/node_modules/openclaw/skills/
# 2. 更新OpenClaw配置以启用技能
openclaw config patch --json '{"skills":{"entries":{"smart-router":{"enabled":true}}}}'
# 3. 重启OpenClaw
openclaw gateway restart
```
### 详细安装步骤
1. **环境变量设置**:
```bash
export OPENROUTER_API_KEY="your-openrouter-api-key"
export DEEPSEEK_API_KEY="your-deepseek-api-key"
```
2. **初始化系统**:
```bash
cd /Users/nora/.openclaw/users/main/workspace
node enhanced-intent-router.js init
```
3. **运行集成测试**:
```bash
./test-integration.sh
```
4. **部署系统**:
```bash
node update-openclaw-config.js update
openclaw gateway restart
```
## 使用方法
### 基本路由
```javascript
// 使用智能路由器路由消息
const { SmartIntentRouter } = require('./enhanced-intent-router.js');
const router = new SmartIntentRouter();
await router.initialize();
const decision = router.analyzeMessage("帮我写一个Python函数");
console.log(decision);
// 输出: { agentId: 'code-agent', model: '4sapi-anthropic/claude-sonnet-4-5-20250929', ... }
```
### 命令行工具
```b...
human-pages-ai
Search and hire real humans for tasks — photography, delivery, research, and more
zseven-w
Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.
capt-marbles
Web scraping and crawling with Firecrawl API. Fetch webpage content as markdown, take screenshots, extract structured data, search the web, and crawl documentation sites. Use when the user needs to scrape a URL, get current web info, capture a screenshot, extract specific data from pages, or crawl docs for a framework/library.
caqlayan
Tweet Processor Skill
carlosarturoleon
Connect to Windsor.ai MCP for natural language access to 325+ data sources including Facebook Ads, GA4, HubSpot, Shopify, and more.
capt-marbles
Attio CRM integration for managing companies, people, deals, notes, tasks, and custom objects. Use when working with Attio CRM data, searching contacts, managing sales pipelines, adding notes to records, creating tasks, or syncing prospect information.