← Back to Skills Marketplace
serudda

Switch Modes

by serudda · GitHub ↗ · v1.0.1
cross-platform ✓ Security Clean
1262
Downloads
0
Stars
1
Active Installs
3
Versions
Install in OpenClaw
/install switch-modes
Description
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".
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install switch-modes
  3. After installation, invoke the skill by name or use /switch-modes
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug switch-modes
Version 1.0.1
License
All-time Installs 1
Active Installs 1
Total Versions 3
Frequently Asked Questions

What is 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". It is an AI Agent Skill for Claude Code / OpenClaw, with 1262 downloads so far.

How do I install Switch Modes?

Run "/install switch-modes" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Switch Modes free?

Yes, Switch Modes is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Switch Modes support?

Switch Modes is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Switch Modes?

It is built and maintained by serudda (@serudda); the current version is v1.0.1.

💬 Comments