Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计通过

hive-task-router配置单元任务路由器

Agent Skill

hive-task-router 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

7,776

周安装

334

GitHub Stars

公开资料未说明

下载量

2,725
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hive-task-router(配置单元任务路由器)
来源仓库:https://github.com/qiongqiongcaocao/hive-task-router
安装命令:
openclaw skills install hive-task-router
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install hive-task-router

简介

智能识别任务类型并路由至最优执行模型。hive-task-router 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适用于混合 Web/代码/数据任务的自动化调度。
  • 支持子代理与主代理协作模式,提升整体效率。
  • 路由策略需定期评估,适应新出现的任务类别。
  • 失败任务应有降级机制,避免阻塞主流程。

SKILL.md

name
Hive Task Router
slug
hive-task-router
version
1.0.0
description
Intelligent task routing system that identifies task types (web/code/data/doc/chat) and routes to optimal models with appropriate execution mode (subagent/main session). Supports any AI model provider via environment variables.
author
qiongcao
requires
os
tags

Hive Task Router

Smart task distribution system for OpenClaw — Automatically routes tasks to optimal models and execution modes based on task type recognition.

Universal Model Support — Works with any AI model provider (Bailian, OpenAI, Anthropic, etc.) via environment variable configuration.


When to Use

Automatic Trigger Rules (For AI Agents)

Use this skill automatically when the user's message contains ANY of these patterns:

Trigger PatternKeywordsAction
Code tasks代码、编程、脚本、函数、nodejs、react、vue、typescript、javascript、html、css、前端、后端、api、接口、调试、bug、优化、重构Run router.sh → Execute with code model + subagent
Web research搜索、查找、调研、研究、github、项目、趋势、报告、分析、对比、评测、最新、2026、新闻、动态Run router.sh → Execute with web model + subagent
Data tasks数据、分析、统计、图表、可视化、excel、csv、json、处理、转换Run router.sh → Execute with data model + subagent
Documentation文档、说明、教程、指南、手册、readme、wiki、注释、文档化Run router.sh → Execute with doc model + subagent
Batch tasks多个、批量、同时、并行、一起Run router.sh for each → Execute in parallel

Do NOT use this skill when:

  • Simple chat/conversation (你好、谢谢、安排、计划、汇报、总结)
  • Quick questions (what is, how to, explain)
  • Tasks already in progress
  • User explicitly says "don't use subagent" or "just answer directly"

Manual Trigger (For Users)

Users can explicitly trigger this skill by:

  • Running router.sh "task description" directly
  • Saying "use hive router" or "analyze this task"
  • Asking "which model should I use for this task"

Decision Flow for AI Agents

Receive user message
    ↓
Contains specific trigger keywords? (code/web/data/doc/batch)
    ↓
YES → Run router.sh to analyze
    ↓
Get recommended model + execution mode
    ↓
Execute with recommended configuration
    ↓
Report result to user
    ↓
NO → Check for vague task keywords? (任务、帮忙、处理、搞定、完成)
    ↓
YES → Ask clarifying question (see "Vague Task Handling")
    ↓
User clarifies → Re-analyze with new info
    ↓
NO → Handle directly (no routing needed)

Vague Task Handling

When user message is vague (e.g., "做个任务", "帮忙处理一下", "搞定这件事"):

Step 1: Acknowledge and ask

好的主人,请问是什么类型的任务?

💻 写代码/脚本?
   - 例如:"写个 Python 脚本"、"开发一个 API"

🔍 搜索调研?
   - 例如:"搜索最新趋势"、"调研竞品"

📊 数据处理?
   - 例如:"分析 Excel 数据"、"转换 JSON 格式"

📄 写文档?
   - 例如:"写 API 文档"、"编写教程"

💬 还是只是聊天?
   - 例如:"今天有什么安排"、"帮我总结一下"

或者您直接告诉我具体内容,我来判断!

Step 2: User clarifies

User: "写个脚本处理数据"
  ↓
Now contains: "脚本" (code) + "数据" (data)
  ↓
Priority: code > data
  ↓
Execute with: qwen3-coder-plus + subagent

Vague Keywords (trigger clarification):

  • 任务、帮忙、处理、搞定、完成、做一下、弄一下
  • 这个、那个、一件事、一个东西

Specific Keywords (trigger automatic routing):

  • code: 脚本、代码、编程、函数、nodejs、react...
  • web: 搜索、调研、分析、趋势、报告、对比...
  • data: 数据、统计、图表、excel、csv、json...
  • doc: 文档、教程、指南、readme、wiki...

Ideal scenarios:

  • Handling multiple concurrent tasks
  • Technical development requiring code-specialized models
  • Research tasks needing web search capabilities
  • Mixed workloads with varying complexity
  • Multi-provider environments (Bailian + OpenAI + Anthropic)

Quick Reference

Task Type Recognition Keywords

TypeKeywords (Chinese)Keywords (English)Priority
web 🔍搜索、查找、调研、研究、github、项目、趋势、报告、分析、对比、评测、最新、2026、新闻、动态search, research, github, project, trend, report, analysis, comparison, latest, news1 (Highest)
code 💻代码、编程、脚本、函数、nodejs、react、vue、typescript、javascript、html、css、前端、后端、api、接口、调试、bug、优化、重构code, programming, script, function, nodejs, react, vue, typescript, javascript, html, css, frontend, backend, api, debug, bug, optimize, refactor2
data 📊数据、分析、统计、图表、可视化、excel、csv、json、处理、转换data, analysis, statistics, chart, visualization, excel, csv, json, processing, conversion3
doc 📄文档、说明、教程、指南、手册、readme、wiki、注释、文档化documentation, guide, tutorial, manual, readme, wiki, comment, document4
chat 💬你好、谢谢、再见、今天、明天、安排、计划、汇报、总结、提醒、备忘hello, thanks, goodbye, today, tomorrow, plan, schedule, summary, reminder, memo5 (Default)

Model Selection Rules

Note: Model IDs are configurable via environment variables. Replace provider/ with your actual model provider (e.g., bailian/, openai/, anthropic/).

Task TypeDefault ModelEnvironment VariableReason
codeprovider/qwen3-coder-plusHIVE_MODEL_CODESpecialized in code generation and debugging
webprovider/qwen3-maxHIVE_MODEL_WEBStrong search and reasoning capabilities
dataprovider/qwen3-coder-plusHIVE_MODEL_DATACode-based data processing
docprovider/qwen3.5-plusHIVE_MODEL_DOCGood text generation, cost-effective
chatprovider/qwen3.5-plusHIVE_MODEL_CHATBest for casual conversation, cost-effective

Model Configuration Examples

Bailian (通义千问):

export HIVE_MODEL_CODE="bailian/qwen3-coder-plus"
export HIVE_MODEL_WEB="bailian/qwen3-max-2026-01-23"
export HIVE_MODEL_CHAT="bailian/qwen3.5-plus"
export HIVE_MODEL_DOC="bailian/qwen3.5-plus"
export HIVE_MODEL_DATA="bailian/qwen3-coder-plus"

Model Validation Modes

Automatic Model Detection (Recommended):

# Auto-detect available models from OpenClaw
export HIVE_VALIDATE_MODEL=auto

First run: Detects models and caches configuration Subsequent runs: Uses cached config (24h TTL) Benefit: No manual configuration needed!

Manual Validation Modes:

ModeEnvironment VariableBehaviorUse Case
Auto (Recommended)export HIVE_VALIDATE_MODEL=autoAuto-detect + cache 24hBest for most users
Cacheexport HIVE_VALIDATE_MODEL=cacheValidate once, cache 24hManual config, stable
Alwaysexport HIVE_VALIDATE_MODEL=1Validate every executionDebugging, changes
Neverexport HIVE_VALIDATE_MODEL=0Skip validationProduction, known config

Cache Configuration:

# Cache directory (default: ~/.hive-task-router)
export HIVE_CACHE_DIR="$HOME/.hive-task-router"

# Cache TTL in seconds (default: 86400 = 24 hours)
export HIVE_CACHE_TTL=86400

Validation Behavior:

  • ✅ Checks if model IDs contain provider/ placeholder
  • ✅ Warns if placeholder detected
  • ✅ Caches validation result (configurable TTL)
  • ✅ Non-blocking (warnings only, doesn't stop execution)

OpenAI:

export HIVE_MODEL_CODE="openai/gpt-4"
export HIVE_MODEL_WEB="openai/gpt-4-turbo"
export HIVE_MODEL_CHAT="openai/gpt-3.5-turbo"
export HIVE_MODEL_DOC="openai/gpt-3.5-turbo"
export HIVE_MODEL_DATA="openai/gpt-4"

Anthropic (Claude):

export HIVE_MODEL_CODE="anthropic/claude-3-5-sonnet"
export HIVE_MODEL_WEB="anthropic/claude-3-opus"
export HIVE_MODEL_CHAT="anthropic/claude-3-haiku"
export HIVE_MODEL_DOC="anthropic/claude-3-haiku"
export HIVE_MODEL_DATA="anthropic/claude-3-5-sonnet"

Mixed Providers:

# Use best model for each task type
export HIVE_MODEL_CODE="anthropic/claude-3-5-sonnet"  # Best for code
export HIVE_MODEL_WEB="openai/gpt-4-turbo"           # Best for search
export HIVE_MODEL_CHAT="bailian/qwen3.5-plus"        # Cost-effective

Execution Mode Rules

Task TypeExecution ModeReason
chatMain SessionQuick response, no need for isolation
code/web/data/docSubagentLong-running tasks, parallel execution, session isolation

Priority Rule: When multiple keywords match, use the highest priority type (web > code > data > doc > chat).


Usage

For AI Agents (Automatic Integration)

When installed as an OpenClaw Skill, the agent will automatically use this skill when:

  1. User message contains task keywords (code/web/data/doc/batch)
  2. Task is long-running (not a simple Q&A)
  3. Multiple tasks need parallel execution

Agent Decision Example:

User: "帮我写一个 Python 脚本处理 Excel 数据"
  ↓
Agent checks: Contains "脚本" (code) + "数据" (data)
  ↓
Priority: code > data
  ↓
Agent executes:
openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "帮我写一个 Python 脚本处理 Excel 数据"

Configuration for Agents: Add to agent's AGENTS.md or SOUL.md:

## Hive Task Router Integration

When receiving tasks:
1. Check if message contains task keywords (see SKILL.md)
2. If yes → Use hive-task-router skill
3. If no → Handle directly

Method 1: Router Script (Recommended)

The router script automatically analyzes tasks and outputs recommended execution commands.

# Basic usage
bash router.sh "帮我写一个 Node.js 脚本"

# Analyze research task
bash router.sh "搜索 2026 年最新的前端趋势"

# Analyze data task
bash router.sh "分析这个 JSON 数据并生成图表"

Output format:

================================
蜂巢智能任务分发系统 - 路由分析
================================

任务描述:帮我写一个 Node.js 脚本
任务类型:code
推荐模型:bailian/qwen3-coder-plus
执行方式:subagent

📦 代码任务 - 使用 qwen3-coder-plus 模型
   适合:Node.js、前端代码、脚本编写

================================
推荐执行命令:
================================

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "帮我写一个 Node.js 脚本"

Method 2: Manual Commands

Code Tasks

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "帮我写一个 Express API 服务"

Web Research Tasks

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-max-2026-01-23 \
  --task "调研 5 个 React UI 库"

Chat Tasks (Main Session)

openclaw agent \
  --session-id agent:main:chat \
  --model bailian/qwen3.5-plus \
  --message "今天有什么安排"

Data Processing Tasks

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "处理这个 CSV 文件并生成统计报告"

Documentation Tasks

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3.5-plus \
  --task "为这个项目编写 README 文档"

Method 3: Parallel Execution

For batch tasks, use parallel subagents:

# Spawn multiple subagents concurrently
openclaw sessions spawn --mode run --runtime subagent --model bailian/qwen3-max-2026-01-23 --task "调研项目 A" &
openclaw sessions spawn --mode run --runtime subagent --model bailian/qwen3-max-2026-01-23 --task "调研项目 B" &
openclaw sessions spawn --mode run --runtime subagent --model bailian/qwen3-max-2026-01-23 --task "调研项目 C" &

# Wait for all to complete
wait

# Then collect and summarize results

Examples

Example 1: Code Development Task

User Input:

帮我写一个 Node.js 文件处理脚本,支持读取 CSV 和 JSON 格式

Router Analysis:

  • Matched Keywords: Node.js, 脚本,文件处理
  • Task Type: code
  • Recommended Model: bailian/qwen3-coder-plus
  • Execution Mode: subagent

Execution Command:

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "帮我写一个 Node.js 文件处理脚本,支持读取 CSV 和 JSON 格式"

Example 2: Web Research Task

User Input:

搜索 2026 年最新的前端趋势,包括 React、Vue、Svelte 的对比

Router Analysis:

  • Matched Keywords: 搜索,2026, 趋势,对比
  • Task Type: web (Priority 1)
  • Recommended Model: bailian/qwen3-max-2026-01-23
  • Execution Mode: subagent

Execution Command:

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-max-2026-01-23 \
  --task "搜索 2026 年最新的前端趋势,包括 React、Vue、Svelte 的对比"

Example 3: Daily Chat Task

User Input:

今天有什么安排?帮我总结一下昨天的工作

Router Analysis:

  • Matched Keywords: 今天,安排,总结
  • Task Type: chat
  • Recommended Model: bailian/qwen3.5-plus
  • Execution Mode: main_session

Execution Command:

openclaw agent \
  --session-id agent:main:chat \
  --model bailian/qwen3.5-plus \
  --message "今天有什么安排?帮我总结一下昨天的工作"

Example 4: Data Analysis Task

User Input:

分析这个销售数据 Excel 文件,生成可视化图表和统计报告

Router Analysis:

  • Matched Keywords: 分析,数据,Excel, 图表,统计
  • Task Type: data
  • Recommended Model: bailian/qwen3-coder-plus
  • Execution Mode: subagent

Execution Command:

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3-coder-plus \
  --task "分析这个销售数据 Excel 文件,生成可视化图表和统计报告"

Example 5: Documentation Task

User Input:

为这个 Python 项目编写完整的 API 文档和使用教程

Router Analysis:

  • Matched Keywords: 文档,教程
  • Task Type: doc
  • Recommended Model: bailian/qwen3.5-plus
  • Execution Mode: subagent

Execution Command:

openclaw sessions spawn \
  --mode run \
  --runtime subagent \
  --model bailian/qwen3.5-plus \
  --task "为这个 Python 项目编写完整的 API 文档和使用教程"

Example 6: Mixed Task Batch (Parallel)

User Input (Multiple Tasks):

1. 写个脚本处理 JSON 数据
2. 搜索最新 AI 工具
3. 今天有什么安排

Router Analysis:

  • Task 1: code → qwen3-coder-plus + subagent
  • Task 2: web → qwen3-max-2026-01-23 + subagent
  • Task 3: chat → qwen3.5-plus + main_session

Parallel Execution:

# Task 1 & 2 run in parallel subagents
openclaw sessions spawn --mode run --runtime subagent --model bailian/qwen3-coder-plus --task "写个脚本处理 JSON 数据" &
openclaw sessions spawn --mode run --runtime subagent --model bailian/qwen3-max-2026-01-23 --task "搜索最新 AI 工具" &

# Task 3 runs in main session (non-blocking)
openclaw agent --session-id agent:main:chat --model bailian/qwen3.5-plus --message "今天有什么安排"

# Wait for subagents
wait

Performance: 3x faster than sequential execution


Installation

Install via ClawHub

clawhub install qiongcao/hive-task-router

Manual Installation

  1. Clone or download this skill folder
  2. Copy to your OpenClaw skills directory:
   cp -r hive-task-router ~/.openclaw/workspace/skills/
  1. Make router script executable:
   chmod +x ~/.openclaw/workspace/skills/hive-task-router/router.sh
  1. Configure models for your provider:
   export HIVE_MODEL_CODE="bailian/qwen3-coder-plus"
   export HIVE_MODEL_WEB="bailian/qwen3-max-2026-01-23"
   export HIVE_MODEL_CHAT="bailian/qwen3.5-plus"

Configuration

Prerequisites

  • OpenClaw CLI installed
  • Bash shell available
  • Models configured (adjust for your provider):

- Code model (e.g., bailian/qwen3-coder-plus) - Web model (e.g., bailian/qwen3-max-2026-01-23) - Chat model (e.g., bailian/qwen3.5-plus)

Environment Variables

Optional environment variables for customization:

# Model overrides (required)
export HIVE_MODEL_CODE="bailian/qwen3-coder-plus"
export HIVE_MODEL_WEB="bailian/qwen3-max-2026-01-23"
export HIVE_MODEL_CHAT="bailian/qwen3.5-plus"
export HIVE_MODEL_DOC="bailian/qwen3.5-plus"
export HIVE_MODEL_DATA="bailian/qwen3-coder-plus"

# Optional: custom session IDs
export HIVE_SESSION_CODE="custom:code:session"
export HIVE_SESSION_WEB="custom:web:session"
export HIVE_SESSION_CHAT="custom:chat:session"

# Optional: concurrency limit
export HIVE_MAX_CONCURRENT=10

Verify Setup

# Check models
openclaw models list | grep bailian

# Test router script
bash router.sh "测试任务"

# Verify environment variables
echo $HIVE_MODEL_CODE
echo $HIVE_MODEL_WEB

Troubleshooting

Issue 1: Router script not found

# Make sure script is executable
chmod +x router.sh

# Run with full path
bash /path/to/router.sh "task"

Issue 2: Model not available

# Check available models
openclaw models list

# Update environment variables with available models
export HIVE_MODEL_CODE="bailian/qwen3-coder-plus"

Issue 3: Task type misidentified

# Add more specific keywords to router.sh
# Edit CODE_KEYWORDS, WEB_KEYWORDS, etc.

Issue 4: Wrong model used

# Verify environment variables are set
echo $HIVE_MODEL_CODE
echo $HIVE_MODEL_WEB

# Set them explicitly before running router.sh
export HIVE_MODEL_CODE="bailian/qwen3-coder-plus"
bash router.sh "task"

Best Practices

  1. Task Distribution Principles

- ✅ Short tasks → Main session - ✅ Long tasks → Subagent - ✅ Batch tasks → Multiple parallel subagents - ✅ Fixed types → Session isolation + specialized models

  1. Model Selection

- Use code-specialized models for programming tasks - Use reasoning models for research tasks - Use cost-effective models for chat tasks - Mix providers for best-in-class results

  1. Concurrency Control

- Recommended max concurrent subagents: 5-10 - For 10+ tasks → Execute in batches - Monitor API quota usage

  1. Environment Management

- Set environment variables in .bashrc or .zshrc - Use different configs for different projects - Document your model choices


Performance

MetricTraditionalHive RouterImprovement
3 project research~180s~60s3x
Model utilizationSingle modelMulti-modelFlexible
Task routingManualAutomaticIntelligent
Multi-providerManual switchingAuto configSeamless

Provider Compatibility

ProviderStatusNotes
Bailian (通义千问)✅ TestedDefault configuration
OpenAI (GPT)✅ CompatibleSet HIVE_MODEL_* variables
Anthropic (Claude)✅ CompatibleSet HIVE_MODEL_* variables
Google (Gemini)✅ CompatibleSet HIVE_MODEL_* variables
Other OpenAI-compatible✅ CompatibleUse provider/ prefix

License

MIT License - Feel free to use and modify.


*Author: qiongcao* *Version: 1.0.0* *Last Updated: 2026-03-12* *Universal Model Support: Yes*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

93.82%
按下载量换算2,557

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills