Skills Explorer Add Skills

openclaw-model-switch

An agent skill by daymade, from daymade/claude-code-skills. Tags: ai, claude-code, configuration, debugging, setup.

What it does

Switch or repair the model configuration of an OpenClaw instance (e.g. Kimi k2p6 → k3): change the default model, add model definitions, and fix model-config failures — 401 "Invalid token", "No available channel / model not found", thinking-level rejections ("Thinking level X is not supported"), and config edits that don't take effect. Use whenever the user wants to switch/upgrade/rollback the OpenClaw model (切换模型/换模型/ 升级模型), or says the OpenClaw/龙虾 bot's model is misconfigured (模型配的错了), or the bot falls back / errors on LLM calls.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add daymade/claude-code-skills --skill openclaw-model-switch

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/daymade/claude-code-skills
cp -r claude-code-skills/openclaw-model-switch ~/.claude/skills/openclaw-model-switch

Safety box score

Grade C, moderate risk: 40 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill edits OpenClaw model config files under the user’s home directory, backs them up, and can restart the gateway. Its main risks are handling any API keys embedded in those configs, sending authenticated probe requests to remote model endpoints, and changing the active model for future turns.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)It runs a shipped Python script and can invoke `openclaw gateway restart` via `subprocess.run([...])`, which is a fixed local command but still real execution.
Network access2 (moderate)It explicitly probes model endpoints with `curl -X POST "<baseUrl>/v1/messages"` and sends an auth token plus prompt content over the network.
Filesystem reach2 (moderate)It reads and writes `~/.openclaw/openclaw.json`, `~/.kimi/kimi-claw/openclaw.json`, `~/.kimi_openclaw/openclaw.json`, and creates `config-backups/openclaw-*.json` copies.
Secrets & credentials2 (moderate)The configs can contain `apiKey`, `headers`, and `env` blocks, and the script backs up the full JSON before editing, duplicating any embedded secrets.
Privilege & persistence1 (low)It does not need sudo or global installs; the only privileged-ish action is restarting the user-level gateway with `openclaw gateway restart`.
Instruction hijack surface0 (none)The files do not contain hidden instructions to ignore policies, fetch remote instructions, or conceal actions from the user.
Irreversible actions1 (low)It can change `agents.defaults.model.primary` and optionally restart the gateway, altering future agent behavior, but it does not deploy, post, pay, or delete externally.
Transparency0 (none)All shipped files are readable source text; there are no binaries, downloaded installers, or runtime-decoded blobs.

Before installing

Rated 2026-10-20 by an automated review of 4 files from the skill's repository.

Source

Repository
daymade/claude-code-skills (all skills from this repository)
Path
openclaw-model-switch/SKILL.md
Branch
main
Updated
2026-09-20