← Back to Skills Marketplace
winlinvip

LLM Switcher

by William · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
380
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install llm-switcher
Description
Change OpenClaw's global default AI model in config, save the change, and restart the gateway after explicit confirmation. Before writing default config, fir...
README (SKILL.md)

Model Switcher

Change the global default LLM model in OpenClaw config, with a session-level availability check first.

Workflow

1) Read config and show available models first

Run:

openclaw config get agents.defaults.models
openclaw config get agents.defaults.model.primary

Extract and show:

  • model key (for example openai-codex/gpt-5.3-codex)
  • alias (for example codex, opus) when present
  • current default model

Do not switch anything before showing options.

2) Ask user to choose model

Ask for the model name they want to set as the global default. Accept:

  • alias (preferred): codex, opus
  • full provider/model id when configured

If the name is not in configured options, reject and ask again with the valid list.

3) Test selected model in current session first (availability/conflict check)

Before changing default config, apply a session-only override and run a live reply test.

In OpenClaw agent/tooling context:

  • Use session_status with model=\x3Cselected-model>.
  • Confirm the override succeeds (no error about unknown/unavailable model).
  • Then send a short test prompt to the model and require an actual response, for example:
    • "What model/version are you currently running? Return provider/model id and a one-line status."
  • Treat this as pass only if the model returns a normal reply.

If override or live reply test fails:

  • Do not update default config.
  • Report the error clearly.
  • Explain that the model appears unavailable/misconfigured.
  • Ask user to choose a different configured model.

If override and live reply test both succeed:

  • Continue to update default config.

4) Apply default-config change

Update default model in config:

openclaw config set agents.defaults.model.primary '"\x3Cselected-model>"'

Then verify:

openclaw config get agents.defaults.model.primary

Never claim success without verification output.

5) Ask before restarting gateway

After updating config, explicitly ask:

  • "Do you want me to restart the gateway now so the change takes effect?"

Only restart after a clear yes.

6) Restart gateway on confirmation

Run:

openclaw gateway restart

Then verify status:

openclaw gateway status

If restart fails, report the error and suggest:

openclaw gateway stop
openclaw gateway start
openclaw gateway status

Response style

  • Be short and direct.
  • Always show current default and valid model choices before asking for selection.
  • Do not ask scope questions (no session-only final path in this skill).
  • Always run a session-level availability check before writing default config.
  • Always require explicit confirmation before restarting gateway.
  • Never claim success without verification output.
Usage Guidance
This skill appears to do what it says: list configured models, test a session-only override, update the global default, and restart the gateway upon confirmation. Before installing, verify: 1) the OpenClaw CLI (openclaw) and the agent's session-status capability exist on the host (the SKILL.md assumes them even though metadata doesn't list them), 2) the agent/process running skills has appropriate admin rights to modify global config and restart the gateway (and that you are comfortable granting that), and 3) you have a backup or can roll back config changes. Also consider asking the publisher to update metadata to declare the required 'openclaw' binary and to add explicit authorization/logging/rollback guidance. If you lack admin rights or the CLI, do not enable this skill.
Capability Analysis
Type: OpenClaw Skill Name: llm-switcher Version: 1.0.0 The skill's stated purpose is legitimate (changing LLM configuration and restarting the gateway). However, the instructions in SKILL.md for updating the default model (`openclaw config set agents.defaults.model.primary '"<selected-model>"'`) introduce a potential shell injection vulnerability. The `<selected-model>` value is derived from user input. While the skill instructs the agent to validate the model name against configured options, it does not explicitly instruct on sanitizing or escaping this input before embedding it into a shell command. An attacker could craft a malicious model name containing shell metacharacters to execute arbitrary commands on the host system.
Capability Assessment
Purpose & Capability
The skill's name/description align with its behavior (changing the global default model and restarting the gateway). However, SKILL.md relies on the 'openclaw' CLI and an in-agent 'session_status' capability even though the skill metadata declares no required binaries or config paths — an inconsistency that should be resolved (the CLI/agent runtime capabilities are required for this skill to work).
Instruction Scope
Instructions stay within the model-switching use case (list models, test via session override, set config, restart gateway). They do, however, require read/write access to global agent config and the ability to restart the gateway — privileged actions. The instructions do not include checks for user authorization, logging, or rollback/backups, which are relevant when changing global defaults.
Install Mechanism
Instruction-only skill with no install spec and no code files. This has low installation risk because nothing is downloaded or written by an installer.
Credentials
The skill requests no environment variables or credentials, which is appropriate for its described purpose. It does rely on in-environment tools (openclaw) and agent capabilities that are not declared in metadata.
Persistence & Privilege
The skill modifies global configuration and can restart the gateway (privileged operations). It does require explicit user confirmation before restart and is not always-enabled. Be aware that if the agent is allowed to invoke skills autonomously, an agent with sufficient permissions could prompt or act toward changing config — the SKILL.md's confirmation step mitigates but does not eliminate privilege risk if the agent runs without an interactive human to confirm.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install llm-switcher
  3. After installation, invoke the skill by name or use /llm-switcher
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug llm-switcher
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is LLM Switcher?

Change OpenClaw's global default AI model in config, save the change, and restart the gateway after explicit confirmation. Before writing default config, fir... It is an AI Agent Skill for Claude Code / OpenClaw, with 380 downloads so far.

How do I install LLM Switcher?

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

Is LLM Switcher free?

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

Which platforms does LLM Switcher support?

LLM Switcher is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created LLM Switcher?

It is built and maintained by William (@winlinvip); the current version is v1.0.0.

💬 Comments