Install
openclaw skills install switch-modesSwitch 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".
openclaw skills install switch-modesDynamically switch between AI models to optimize costs and performance.
Activate this skill when the user mentions:
eco mode, balanced mode, smart mode, max mode/modes status/modes setupThe skill manages 4 predefined modes, each mapped to a specific model:
Configuration is stored in ~/.openclaw/workspace/switch-modes.json.
When the user message contains any of these patterns:
eco mode or eco (standalone)balanced mode or balancedsmart mode or smartmax mode or max/modes status/modes setup/modes setup)If the configuration file doesn't exist or user requests setup:
Use AskUserQuestion to gather model preferences for each mode:
anthropic/claude-3.5-haikuanthropic/claude-sonnet-4-5anthropic/claude-opus-4-5anthropic/claude-opus-4-6 or openai/o1-proCreate/update ~/.openclaw/workspace/switch-modes.json with the structure:
{
"eco": "model-id",
"balanced": "model-id",
"smart": "model-id",
"max": "model-id"
}
/modes status)~/.openclaw/openclaw.json to get current model~/.openclaw/workspace/switch-modes.json to get mode mappings✅ Currently in [MODE] mode using [MODEL_ID]When user requests a mode switch:
Read configuration:
cat ~/.openclaw/workspace/switch-modes.json
If file doesn't exist, prompt user to run /modes setup first.
Get the target model from the config based on requested mode (eco/balanced/smart/max)
Update OpenClaw config:
~/.openclaw/openclaw.jsonmodel field with the new model ID~/.openclaw/openclaw.jsonConfirm to user:
✅ [MODE] mode activated
Now using: [MODEL_ID]
User: eco mode
Agent: [reads switch-modes.json, gets model for "eco"]
Agent: [updates openclaw.json with new model]
Agent: ✅ ECO mode activated
Now using: anthropic/claude-3.5-haiku
User: /modes status
Agent: [reads openclaw.json for current model]
Agent: [reads switch-modes.json for mode mappings]
Agent: ✅ Currently in BALANCED mode using anthropic/claude-sonnet-4-5
User: /modes setup
Agent: [uses AskUserQuestion for each mode]
Agent: [creates ~/.openclaw/workspace/switch-modes.json]
Agent: ✅ Setup complete! You can now use:
- eco mode
- balanced mode
- smart mode
- max mode
~/.openclaw/workspace/switch-modes.json~/.openclaw/openclaw.jsonexample-config.json in skill directory/modes setupopenclaw.json when updating model~/.openclaw/... not relative pathsFor detailed troubleshooting, supported models list, and FAQ, see ./REFERENCE.md.