← 返回 Skills 市场
1262
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install switch-modes
功能描述
Switch between AI models dynamically to optimize costs and performance. Use when the user says mode commands like "eco mode", "balanced mode", "smart mode", or "max mode", or when they want to check their current mode with "/modes status" or configure modes with "/modes setup".
安全使用建议
This skill appears to do what it says (switch your agent's model by editing OpenClaw config files), but take these precautions before installing: (1) inspect your ~/.openclaw/openclaw.json to confirm it doesn't expose secrets you wouldn't want read or printed by the agent; (2) back up openclaw.json before using the skill so you can restore settings if something goes wrong; (3) consider requesting the skill author set disableModelInvocation:true if you don't want the model to call this skill autonomously; (4) verify whether changes are intended to be session-local or persistent—the SKILL.md is inconsistent on that point; (5) check file permissions on ~/.openclaw to limit unintended access. If you want, I can draft a safer SKILL.md that explicitly avoids printing secrets and documents persistence and invocation behavior.
功能分析
Type: OpenClaw Skill
Name: switch-modes
Version: 1.0.1
The skill is designed to manage and switch AI models by modifying the `model` field in the OpenClaw configuration file (`~/.openclaw/openclaw.json`). While it accesses a file that may contain sensitive API keys, the `SKILL.md` and `REFERENCE.md` instructions explicitly and repeatedly state to 'Only modify the `model` field. Preserve all other settings.' and to 'Always validate JSON before writing config files.' This demonstrates a clear intent to limit actions to the stated purpose and avoid unauthorized data access or modification. There is no evidence of data exfiltration, malicious execution, persistence, or prompt injection attempts within the skill's own instructions.
能力评估
Purpose & Capability
The name/description (switching modes/models) matches the runtime instructions: reading a mode mapping file and updating the OpenClaw config's model field. No unrelated APIs, binaries, or credentials are requested in the metadata.
Instruction Scope
Instructions explicitly tell the agent to read/write ~/.openclaw/openclaw.json and to create ~/.openclaw/workspace/switch-modes.json. That is within scope for changing the default model, but the skill also recommends specific vendor model IDs and relies on an AskUserQuestion primitive (agent action) which should be present in your agent environment.
Install Mechanism
Instruction-only skill with no install spec or code to download — lowest-risk delivery model. Nothing is being written to disk by an installer beyond the normal config files the skill itself creates at runtime.
Credentials
The skill declares no required env vars, but it instructs the agent to read ~/.openclaw/openclaw.json. That file likely contains API keys or other sensitive fields. The skill does not mention handling or avoiding exposure of such secrets when reading or displaying the config, so there is a risk of inadvertent leakage or misuse of credentials if the agent logs or reports file contents.
Persistence & Privilege
The skill does not set always:true (good) and does not disable model invocation, so the agent may invoke it autonomously. Also the SKILL.md contains an internal inconsistency: it claims "Changes only affect the current session's default model" while its actions write back to ~/.openclaw/openclaw.json (a persistent change). You should confirm expected persistence and whether autonomous invocation is acceptable.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install switch-modes - 安装完成后,直接呼叫该 Skill 的名称或使用
/switch-modes触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Updated mode-switching mechanism: now uses "gateway config.patch" to persistently change the primary model in openclaw.json (triggers a brief gateway restart).
- Improved status reporting: mode status now uses session_status and displays a formatted summary of all modes, including active/inactive indicators.
- Clarified instructions and examples for setup, switching, and status commands.
- Adjusted notes to emphasize persistent config changes and brief restart after switching modes.
v1.0.1
Version 1.0.1 – Minor update
- Added reference documentation file: REFERENCE.md
- Removed sample/example configuration file: example-config.json
v1.0.0
Switch Modes 1.0.0 - Initial Release
- Dynamically switch between AI models using simple "mode" commands (eco, balanced, smart, max).
- Custom configuration for each mode to optimize API cost and performance.
- Instant model switching per session with no gateway restart required.
- Clears instructions for setup, mode management, and troubleshooting.
- Fully local configuration; supports any model ID recognized by OpenClaw.
- Includes agent integration guide for seamless conversational use.
元数据
常见问题
Switch Modes 是什么?
Switch between AI models dynamically to optimize costs and performance. Use when the user says mode commands like "eco mode", "balanced mode", "smart mode", or "max mode", or when they want to check their current mode with "/modes status" or configure modes with "/modes setup". 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1262 次。
如何安装 Switch Modes?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install switch-modes」即可一键安装,无需额外配置。
Switch Modes 是免费的吗?
是的,Switch Modes 完全免费(开源免费),可自由下载、安装和使用。
Switch Modes 支持哪些平台?
Switch Modes 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Switch Modes?
由 serudda(@serudda)开发并维护,当前版本 v1.0.1。
推荐 Skills