Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Smart Model Switcher V2

v2.1.0

智能模型自动切换 V5.0.2 - 多模态感知,自动识别图片/视频/音频/代码/文本任务,切换到最适合的模型。支持图片理解(qwen3-vl-plus)、视频音频(qwen3.5-plus)、代码(glm-5)、Office文档(MiniMax-M2.5)、推理等场景。零感知切换,无需手动操作。

0· 341·2 current·2 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for davidme6/smart-model-switcher-v2.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Smart Model Switcher V2" (davidme6/smart-model-switcher-v2) from ClawHub.
Skill page: https://clawhub.ai/davidme6/smart-model-switcher-v2
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install smart-model-switcher-v2

ClawHub CLI

Package manager switcher

npx clawhub@latest install smart-model-switcher-v2
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The SKILL.md and included scripts align with the advertised goal (detect message type and pick models). However metadata/version/name mismatches exist (registry version 2.1.0 vs SKILL.md v5.1.0/name smart-model-switcher-v5). The model list and switching rules are coherent for the stated functionality.
!
Instruction Scope
The instructions are broad and include steps like 'check model availability (API Key + 套餐)' and 'extract keywords / determine context' without specifying where to find required keys or limits on what the agent may inspect. The included scripts reference a user config path ($env:USERPROFILE\.openclaw\openclaw.json) and perform logging to $env:USERPROFILE\.openclaw\logs, but the skill metadata declares no required config paths. This mismatch could give the agent discretion to search for credentials/configs.
Install Mechanism
Instruction-only skill with no install spec and no code files executed by the registry installer. The only executable content is plain-text script files shipped as artifacts; nothing is automatically downloaded or run by an installer.
!
Credentials
The skill declares no required environment variables or credentials, yet SKILL.md mentions checking API keys and the runtime script references a config file under the user's home. Expectation: a model-switcher that checks provider availability would normally declare where API keys live (env vars or config path). That omission is an inconsistency and could lead the agent to search for credentials in the environment or files.
Persistence & Privilege
always:false and no OS restrictions — the skill does not demand forced always-on status. The supplied 'auto-monitor' script is intended to be run as a background monitor and will create logs under the user's home; running it would give persistent local presence. The skill does not declare it will write files, but the scripts do write to ~/.openclaw, so user consent before running is important.
What to consider before installing
This skill generally does what it claims (detects multimodal inputs and picks models), but there are several red flags you should consider before installing or running any included scripts: - The skill mentions checking API keys/provider quotas but does not declare any required environment variables or config paths; ask the author where model credentials are expected to be stored. - The runtime script defaults to reading/writing files under $HOME/.openclaw (openclaw.json and a logs folder) but the metadata lists no required config paths — expect the scripts to create those files if you run them. Review the contents of ~/.openclaw before running and back it up if necessary. - The provided PowerShell scripts contain mojibake/encoding issues and some malformed keyword entries; they may not run as-is and could behave unpredictably. - Because instructions are vague about where to find API credentials, do not grant the agent blanket permission to search your environment or files for keys; supply credentials explicitly to well-known env vars or config paths you control if you decide to use it. If you want to proceed: request a clear author/source, an explicit list of required config locations/env variables, and a fixed script release (clean encoding, no syntax errors). If you do not trust the origin, do not run the auto-monitor or runtime scripts on a machine with sensitive keys or data.

Like a lobster shell, security has layers — review code before you run it.

latestvk976xs335q5y8mxmpv15607rss8458zf
341downloads
0stars
2versions
Updated 10h ago
v2.1.0
MIT-0

🧠 Smart Model Switcher V5.0.2 (多模态感知增强版)

自动识别任务类型 • 智能切换最优模型 • 零感知 • 无需手动

🎯 V5.0.2 核心升级

特性V4V5.0.2
多模态感知✅ 图片✅ 图片 + 视频 + 音频
Office 模式❌ 无✅ MiniMax-M2.5
视频理解❌ 不支持✅ 自动切换 qwen3.5-plus
音频理解❌ 不支持✅ 自动切换 qwen3.5-plus
主窗口限制❌ 无限制✅ 仅主窗口生效,子代理不切换
任务感知智能上下文分析智能上下文分析 + 文件检测

⚠️ 核心规则:主窗口限制

🔒 智能切换仅限主窗口

智能模型切换只对主窗口(主会话)生效!

会话类型是否执行智能切换说明
主窗口✅ 执行用户直接对话的会话(飞书、WebChat、Telegram 等)
子代理❌ 不执行团队成员办公室(马云CEO、技术专家、市场猎手等)
Spawned Session❌ 不执行通过 sessions_spawn 创建的所有会话

为什么这样设计?

  1. 子代理有固定模型 - 各专业人员的模型是预设的(技术专家用 glm-5,推理用 qwq-plus)
  2. 避免干扰 - 智能切换不应该覆盖子代理的专业模型配置
  3. 职责分明 - 主窗口处理用户意图,子代理专注执行任务

判断方式

当前会话是主窗口?
├── YES → 执行智能切换逻辑
└── NO → 跳过切换,使用该会话预设模型

检测方法

  • 主窗口:depth = 0 或无 subagent context 标记
  • 子代理:消息开头有 [Subagent Context]depth > 0

🖼️ 多模态模型列表

视觉/音视频模型(支持图片/视频/音频)

模型 IDProvider能力推荐场景
qwen3.5-plusBailian图片/视频/音频 ⭐⭐⭐⭐⭐多模态任务首选
qwen3-vl-plusBailian图片 ⭐⭐⭐⭐⭐纯图片理解、OCR
qvq-maxBailian图片 ⭐⭐⭐⭐⭐复杂视觉推理
glm-4vGLM图片 ⭐⭐⭐⭐图片理解

代码模型(编程专用)

模型 IDProvider代码能力推荐场景
glm-5Bailian/GLM⭐⭐⭐⭐⭐代码生成、Debug、重构
qwen3-coder-plusBailian⭐⭐⭐⭐⭐代码补全、项目开发
qwen-coder-turboBailian⭐⭐⭐⭐快速代码任务

推理模型(复杂思维)

模型 IDProvider推理能力推荐场景
qwq-plusBailian⭐⭐⭐⭐⭐复杂推理、数学证明
qwen3-maxBailian⭐⭐⭐⭐⭐深度思考、分析
glm-5Bailian/GLM⭐⭐⭐⭐逻辑推理

Office 文档模型

模型 IDProvider能力推荐场景
MiniMax-M2.5Bailian⭐⭐⭐⭐⭐Office 文档处理

通用模型

模型 IDProvider综合能力推荐场景
qwen3.5-plusBailian⭐⭐⭐⭐日常对话、写作、翻译
qwen-plusBailian⭐⭐⭐快速任务
qwen-turboBailian⭐⭐简单任务、低成本

🔄 自动切换规则

规则 0: 主窗口检测(最高优先级)

IF 当前会话不是主窗口 → 跳过所有切换逻辑,使用预设模型

规则 1: 多模态检测优先(图片/视频/音频)

IF 消息包含图片/视频/音频 → 切换到 qwen3.5-plus
  ├── 图片 + 代码相关 → qwen3.5-plus (视觉+代码)
  ├── 视频文件 → qwen3.5-plus (唯一支持视频)
  ├── 音频文件 → qwen3.5-plus (唯一支持音频)
  └── 纯图片理解 → qwen3-vl-plus 或 qwen3.5-plus

视频文件扩展名:.mp4, .avi, .mov, .mkv, .wmv, .flv, .webm, .m4v

音频文件扩展名:.mp3, .wav, .m4a, .ogg, .flac, .aac, .wma

图片文件扩展名:.png, .jpg, .jpeg, .gif, .webp, .bmp, .svg

规则 2: 代码任务

IF 消息包含代码关键词 → 切换到代码模型
  ├── 复杂代码任务 → glm-5 (最强代码)
  ├── 快速代码补全 → qwen-coder-turbo
  └── 项目级开发 → qwen3-coder-plus

规则 3: 推理任务

IF 消息包含推理关键词 → 切换到推理模型
  ├── 复杂推理 → qwq-plus (最强推理)
  ├── 数学/证明 → qwen3-max
  └── 一般分析 → glm-5

规则 4: Office 模式

IF 用户说 "Office模式" / "切换Office" / "MiniMax" → 切换到 MiniMax-M2.5
  └── Office 文档处理 → MiniMax-M2.5

规则 5: 文本任务

IF 纯文本任务 → 使用通用模型
  ├── 长文档 → qwen3.5-plus (1M context)
  ├── 写作/翻译 → qwen3.5-plus
  └── 简单对话 → qwen-plus / qwen-turbo

📋 切换决策树(完整版)

收到消息
    │
    ├── 🔒 是否为主窗口(主会话)?
    │       ├── NO → 跳过切换,使用该会话预设模型
    │       │
    │       └── YES ↓
    │
    ├── 🖼️ 包含图片/视频/音频?
    │       ├── 视频文件 (.mp4/.avi/.mov/.mkv/...) → qwen3.5-plus ⭐多模态优先
    │       ├── 音频文件 (.mp3/.wav/.m4a/.ogg/...) → qwen3.5-plus ⭐多模态优先
    │       ├── 图片 + 代码关键词 → qwen3.5-plus (视觉+代码)
    │       └── 纯图片 → qwen3-vl-plus 或 qwen3.5-plus
    │
    ├── 💻 代码关键词?
    │       └── YES → glm-5 (最强代码)
    │
    ├── 🧠 推理关键词?
    │       └── YES → qwq-plus / qwen3-max
    │
    ├── 📎 Office 关键词?
    │       └── YES → MiniMax-M2.5
    │
    └── 📝 通用任务 → qwen3.5-plus

🎯 关键词识别

多模态检测(最高优先级)

  • 图片:消息中有 image 类型内容,文件扩展名 .png, .jpg, .jpeg, .gif, .webp, .bmp
  • 视频:文件扩展名 .mp4, .avi, .mov, .mkv, .wmv, .flv, .webm, .m4v
  • 音频:文件扩展名 .mp3, .wav, .m4a, .ogg, .flac, .aac, .wma
  • 用户说:"看这个图"、"视频里是什么"、"听这个音频"、"截图"

代码关键词

  • 编程相关:代码、编程、python、js、javascript、函数、debug、bug、报错、错误、修复
  • 文件类型:.py, .js, .ts, .html, .css, .json, .yaml, .sh
  • 操作词:写一个、帮我写、优化、重构、解释这段代码

推理关键词

  • 推理、逻辑、证明、数学、计算、分析、思考
  • 为什么、怎么推导、能不能推出、关系

Office 关键词

  • Office、Office模式、切换Office、MiniMax、文档处理
  • Word、Excel、PPT、PowerPoint、表格处理

写作关键词

  • 写、作文、文章、小说、故事、文案、邮件、报告

🔧 配置示例

用户配置的最强模型

{
  "modelPreferences": {
    "multimodal": "qwen3.5-plus",     // 视频/音频/图片
    "vision": "qwen3-vl-plus",        // 纯图片
    "coding": "glm-5",                // 代码最强
    "reasoning": "qwq-plus",          // 推理最强
    "office": "MiniMax-M2.5",         // Office 文档
    "general": "qwen3.5-plus",        // 通用最强
    "fast": "qwen-turbo"              // 快速任务
  }
}

📊 使用示例

示例 1: 主窗口发送视频文件

用户: [发送一个 .mp4 文件] "帮我分析这个视频"
环境: 主窗口 (WebChat)
检测: 视频文件 + 主窗口
切换: qwen3.5-plus (唯一支持视频的模型)
执行: 分析视频内容

示例 2: 子代理处理代码任务

用户: "让技术专家写个爬虫"
环境: 技术专家办公室 (子代理)
检测: 代码关键词 + 子代理环境
结果: 不执行智能切换,使用技术专家预设模型 (glm-5)
执行: 生成爬虫代码

示例 3: 主窗口 Office 模式

用户: "切换到 Office 模式"
环境: 主窗口 (飞书)
检测: Office 关键词 + 主窗口
切换: MiniMax-M2.5
提示: "🧠 已切换到 MiniMax-M2.5(Office 模式)"

示例 4: 主窗口发送音频文件

用户: [发送一个 .mp3 文件] "转录这段录音"
环境: 主窗口 (Telegram)
检测: 音频文件 + 主窗口
切换: qwen3.5-plus (唯一支持音频的模型)
执行: 转录音频内容

示例 5: 子代理执行推理任务

用户: "让推理专家证明根号2是无理数"
环境: 推理专家办公室 (子代理)
检测: 推理关键词 + 子代理环境
结果: 不执行智能切换,使用推理专家预设模型 (qwq-plus)
执行: 给出证明过程

🚀 实现逻辑

Step 0: 主窗口检测(第一步)

检测当前会话:
1. 是否有 [Subagent Context] 标记?
2. 是否有 depth > 0?
3. 是否是 spawned session?
   └── YES → 跳过所有智能切换,使用预设模型
   └── NO → 继续执行智能切换逻辑

Step 1: 消息分析

分析用户消息:
1. 是否包含图片/视频/音频附件 ← 最高优先级
2. 提取关键词
3. 识别任务类型
4. 确定上下文需求

Step 2: 模型选择

选择最优模型:
1. 根据任务类型查找最佳模型
2. 检查模型可用性 (API Key + 套餐)
3. 应用 fallback 逻辑
4. 记录选择原因

Step 3: 执行切换

切换模型:
1. 调用 session_status(model: "xxx")
2. 发送提示信息给用户
3. 执行任务
4. 记录性能数据

⚠️ 核心原则

  1. 主窗口限制 - 智能切换仅限主窗口,子代理保持预设模型
  2. 多模态优先 - 图片/视频/音频一律走 qwen3.5-plus,绝不走 GLM-5
  3. 代码专用 - GLM-5 只用于纯代码/纯技术任务
  4. Office 独立 - MiniMax-M2.5 专门处理 Office 文档
  5. 检测优先级 - 主窗口 > 图片/视频/音频 > 代码 > 推理 > Office > 通用
  6. 自动切换 - 用户无需手动操作,系统自动识别
  7. fallback - 如果首选模型不可用,自动降级到备选

📝 更新日志

V5.0.2 (2026-03-25)

  • ✅ 新增视频文件自动检测 (.mp4, .avi, .mov, .mkv 等)
  • ✅ 新增音频文件自动检测 (.mp3, .wav, .m4a, .ogg 等)
  • ✅ 新增 Office 模式,支持 MiniMax-M2.5
  • 新增主窗口限制,子代理不执行智能切换
  • ✅ 更新决策树,主窗口检测为最高优先级
  • ✅ 明确 GLM-5 只用于纯代码任务

V4.0.0 (2026-03-23)

  • ✅ 新增多模态感知,自动识别图片
  • ✅ 新增视觉模型支持 (qwen3-vl-plus, qwen3.5-plus)
  • ✅ 优化切换决策树,图片检测优先
  • ✅ 更新关键词识别规则

V3.0.0

  • ✅ 全平台支持
  • ✅ API Key 验证
  • ✅ 套餐检测


🤖 AI Agent 自动行为指南

重要:AI Agent 在每次响应前,必须执行以下检测流程!

🔒 规则 0:主窗口检测(第一步!)

智能切换只对主窗口生效!子代理不要执行模型切换!

Step 0: 检测当前会话类型
├── 消息开头有 [Subagent Context]?
│   └── YES → 这是子代理,跳过智能切换,使用预设模型
│
├── 有 depth 标记且 depth > 0?
│   └── YES → 这是子代理,跳过智能切换,使用预设模型
│
├── 是 spawned session?
│   └── YES → 这是子代理,跳过智能切换,使用预设模型
│
└── NO → 这是主窗口,继续执行智能切换逻辑

子代理示例

  • [Wed 2026-03-25 21:05 GMT+8] [Subagent Context] You are running as a subagent...
  • [Subagent Task]: ...
  • depth=1 或任何 depth > 0

主窗口示例

  • 用户直接在 WebChat/飞书/Telegram 发消息
  • [Subagent Context] 标记
  • depth=0 或无 depth 标记

⚠️ 会话级别切换(重要!)

模型切换是会话级别的,不影响其他通道!

  • WebChat 发视频 → 只在 WebChat 切换多模态模型
  • 飞书写代码 → 只在飞书会话切换代码模型
  • Telegram 聊天 → 只在 Telegram 会话切换模型

不同通道独立,互不影响!

切换方法(会话级别)

使用 session_status 工具,带上当前会话的 sessionKey:

// 当前会话切换(不影响其他通道)
session_status(model: "bailian/glm-5")

// 切换其他会话的模型(需要指定 sessionKey)
session_status(sessionKey: "feishu/xxx", model: "bailian/qwen3.5-plus")

默认行为:不带 sessionKey 时,只切换当前会话的模型。

检测流程(每次响应前)

Step 0: 主窗口检测 ← 第一步!
├── 是子代理? → 跳过切换,使用预设模型
└── 是主窗口? → 继续

Step 1: 检测消息内容
├── 是否包含图片/视频/音频?
│   └── YES → 切换到 qwen3.5-plus(多模态模型)
│
├── 是否包含代码关键词?
│   └── YES → 切换到代码模型 (glm-5)
│
├── 是否包含推理关键词?
│   └── YES → 切换到推理模型 (qwq-plus)
│
├── 是否包含 Office 关键词?
│   └── YES → 切换到 Office 模型 (MiniMax-M2.5)
│
└── 否则保持当前模型

切换方法

使用 session_status 工具切换模型:

session_status(model: "bailian/qwen3.5-plus")  // 多模态
session_status(model: "bailian/glm-5")         // 代码
session_status(model: "bailian/qwq-plus")      // 推理
session_status(model: "bailian/MiniMax-M2.5")  // Office

切换提示

切换成功后,给用户一个简短提示:

  • "🧠 已切换到 qwen3.5-plus(视频/音频理解)"
  • "🧠 已切换到 qwen3.5-plus(图片理解)"
  • "🧠 已切换到 glm-5(代码任务)"
  • "🧠 已切换到 qwq-plus(推理任务)"
  • "🧠 已切换到 MiniMax-M2.5(Office 模式)"

示例行为

场景 A: 主窗口发送视频
────────────────────────
用户: [发送一个 .mp4 视频文件] "帮我分析这个视频"

AI 行为:
1. 检测: 无 [Subagent Context] → 是主窗口
2. 检测到视频文件 → 需要多模态模型
3. 决策: 使用 qwen3.5-plus(唯一支持视频)
4. 调用: session_status(model: "bailian/qwen3.5-plus")
5. 提示: "🧠 已切换到 qwen3.5-plus(视频理解)"
6. 分析视频内容

场景 B: 子代理处理代码任务
────────────────────────
消息: [Subagent Context] You are running as a subagent...
任务: 技术专家,写一个爬虫

AI 行为:
1. 检测: 有 [Subagent Context] → 是子代理
2. 决策: 跳过智能切换,使用预设模型 (glm-5)
3. 不调用 session_status
4. 直接执行任务

注意事项

  1. 主窗口限制 - 只有主窗口才执行智能切换,子代理保持预设模型
  2. 不要重复切换 - 如果当前模型已经是最优选择,不要切换
  3. 切换要快 - 使用简短提示,不要长篇大论
  4. 记录切换 - 如果模型切换成功,记住当前使用的模型
  5. 优先级 - 主窗口检测 > 图片/视频/音频 > 代码 > 推理 > Office > 通用
  6. 多模态内容绝不走 GLM-5 - 视频/音频/图片必须用 qwen3.5-plus

📋 快速参考

场景是否切换最优模型
🏠 主窗口 + 视频✅ 切换qwen3.5-plus
🏠 主窗口 + 音频✅ 切换qwen3.5-plus
🏠 主窗口 + 图片✅ 切换qwen3.5-plus
🏠 主窗口 + 代码✅ 切换glm-5
🏠 主窗口 + 推理✅ 切换qwq-plus
🏠 主窗口 + Office✅ 切换MiniMax-M2.5
🤖 子代理 + 代码❌ 不切换使用预设模型
🤖 子代理 + 推理❌ 不切换使用预设模型
🤖 子代理 + 任何❌ 不切换使用预设模型

V5.0.2 核心亮点:主窗口智能切换,子代理保持预设,发图片/视频/音频自动切换多模态模型,完全无感! 🚀

Comments

Loading comments...