Skill flagged — suspicious patterns detected

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

Auto Model Switch

v1.0.0

自动切换模型 - 当模型token用完或限流时,自动切换到备用模型,并通知用户。支持配置多个备用模型,智能切换策略。

1· 126·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 wei-wei-zhao/auto-model-switch.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Auto Model Switch" (wei-wei-zhao/auto-model-switch) from ClawHub.
Skill page: https://clawhub.ai/wei-wei-zhao/auto-model-switch
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: node
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 auto-model-switch

ClawHub CLI

Package manager switcher

npx clawhub@latest install auto-model-switch
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The code implements automatic model switching and gateway integration matching the description. However, the package declares only Node as required while the repo also includes Python implementations and tests (auto_model_switch.py, test.py), which is inconsistent with the declared requirements and increases surface area.
!
Instruction Scope
SKILL.md and the code expect OPENCLAW_GATEWAY_URL and OPENCLAW_GATEWAY_TOKEN to be set and the scripts will call /api/status and POST /api/config/model on that gateway. The registry metadata lists no required env vars even though runtime behavior depends on those environment variables and will send requests to the provided gateway URL with the token.
Install Mechanism
There is no install spec (instruction-only), so nothing will be forced onto disk by the registry. The Node dependency (js-yaml) is standard, but the package-lock references registry.npmmirror.com (a mirror) rather than the default npm registry — this is not necessarily malicious but you should be aware of the alternate registry source.
!
Credentials
The skill requires (and documents) OPENCLAW_GATEWAY_URL and OPENCLAW_GATEWAY_TOKEN to perform model switches. Those are powerful credentials because the skill will attempt to change gateway configuration; yet the metadata declares no required credentials. Requesting a gateway token is proportionate to the claimed purpose, but the omission from the declared requirements is an inconsistency and the token must be trusted (it will be sent to the gateway URL).
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It writes state and history under its own state/ directory, which is expected for this functionality.
What to consider before installing
This skill appears to implement the advertised auto-switching behavior, but review the following before installing: 1) The code uses OPENCLAW_GATEWAY_URL and OPENCLAW_GATEWAY_TOKEN to call your gateway and change model config — only provide a token with minimal required scope and verify you trust the gateway endpoint. 2) The package metadata did not declare these required env vars and lists only Node, yet Python scripts are included; if you don't use the Python parts they can be ignored or removed, but their presence is an inconsistency. 3) package-lock points to a non-default npm mirror (npmmirror.com); if you prefer, run npm install with your controlled registry or audit the downloaded packages. 4) Inspect the code (auto_model_switch.js) and test it in a sandboxed environment before giving it access to production credentials. If anything is unclear, ask the author to: (a) declare the gateway env vars in the metadata, (b) remove unused language artifacts or document why Python is included, and (c) confirm the minimal scope required of the gateway token.

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

Runtime requirements

🔄 Clawdis
OSLinux · macOS · Windows
Binsnode
latestvk974xecaxe38zme30cfzxdb3r983k45z
126downloads
1stars
1versions
Updated 1mo ago
v1.0.0
MIT-0
Linux, macOS, Windows

自动切换模型 (Auto Model Switch)

概述

当主模型token用完或遇到限流时,自动切换到备用模型,确保对话不中断。

快速开始

1. 安装依赖

cd ~/.openclaw/workspace/skills/auto-model-switch
npm install

2. 配置模型

编辑 config.yaml

models:
  - id: primary
    model: custom-maas-coding-api-cn-huabei-1-xf-yun-com/astron-code-latest
    name: "Astron Code"
    daily_limit: 10000000
    priority: 1
  
  - id: backup-1
    model: zai/glm-5
    name: "GLM-4.5"
    daily_limit: null
    priority: 2

3. 启用心跳检查

HEARTBEAT.md 中添加:

- 检查模型状态: node ~/.openclaw/workspace/skills/auto-model-switch/heartbeat.js

命令

命令说明
node auto_model_switch.js status查看当前模型状态
node auto_model_switch.js switch手动切换模型
node auto_model_switch.js heartbeat心跳检查(自动检测和切换)
node auto_model_switch.js sync从网关同步token使用量

触发条件

  • 警告:Token使用 > 80%
  • 切换:Token使用 > 95% 或 API限流

配置说明

models:
  - id: primary              # 模型标识
    model: model-id          # OpenClaw模型ID
    name: "显示名称"          # 友好名称
    daily_limit: 10000000    # 每日token限制(null=无限制)
    priority: 1              # 优先级(数字越小越优先)

auto_switch:
  on_limit_exceeded: true    # token用完时切换
  on_rate_limit: true        # 限流时切换
  retry_delay: 60            # 限流后重试延迟(秒)
  warning_threshold: 0.8     # 警告阈值
  critical_threshold: 0.95   # 切换阈值

notification:
  enabled: true              # 启用通知

与OpenClaw集成

设置环境变量以启用网关集成:

export OPENCLAW_GATEWAY_URL="http://localhost:3000"
export OPENCLAW_GATEWAY_TOKEN="your-token"

示例输出

📊 模型状态
当前:Astron Code
Token:8.5M / 10M (85%)

备用模型:
- GLM-4.5 (可用)

文件说明

auto-model-switch/
├── SKILL.md              # 本文件
├── config.yaml           # 模型配置
├── auto_model_switch.js  # 主脚本
├── heartbeat.js          # 心跳脚本
├── package.json          # Node.js配置
├── QUICKSTART.md         # 快速开始
└── state/                # 状态目录(自动创建)
    ├── model-switch.json # 当前状态
    └── switch-history.json # 切换历史

🔄 让模型切换自动化,对话永不断线

Comments

Loading comments...