Agent skill

Openclaw Model Switch

by daymade in daymade/claude-code-skills

Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X…

MITAuto-check passed

Install Openclaw Model Switch

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install daymade/claude-code-skills openclaw-model-switch --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/daymade/claude-code-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/openclaw-model-switch .claude/skills/openclaw-model-switch && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
openclaw-model-switch
GitHub stars
1.4k
Token cost
~1.3k tokens
SKILL.md length
575 words
Files
4 (incl. scripts, references)
Skills in repo
103
Repo updated
First seen
Licence
MIT

At a glance

Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X…

  • Works in 4 steps: Find the real config file(s) → Probe the endpoint + model BEFORE… → Switch the model → …
  • SKILL.md covers Step 1 — Find the real config…, Step 2 — Probe the endpoint +…, Step 3 — Switch the model and Step 4 — Verify end-to-end…, plus 3 more sections
  • Runs Python scripts from its folder; calls python3 and curl; needs KIMI_API_KEY

What it does

Openclaw Model Switch is an agent skill from daymade/claude-code-skills. Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X is not supported", or a config edit that doesn't take effect. Use for 切换模型/换模型/升级模型 or 模型配的错了. Not for plain config audits (use openclaw).

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/kimi-models.md`, `references/troubleshooting-model-config.md` and `scripts/switch-model.py`).

It works with Kimi. The repository describes itself as: Professional Claude Code skills marketplace featuring production-ready skills for enhanced development workflows. The licence is MIT.

Example prompts

  • “Invalid token”
  • “No available channel / model not found”
  • “Thinking level X is not supported”
  • “/openclaw-model-switch”

Requirements

  • Python 3
  • A credential in KIMI_API_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Find the real config file(s)
  2. Probe the endpoint + model BEFORE touching config
  3. Switch the model
  4. Verify end-to-end (mandatory)

What it can do on your machine

Read from SKILL.md and the folder at commit 91bed2b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • KIMI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Openclaw Model Switch loads about 1.3k tokens when it runs, and up to ~4.4k if it reads all its reference files. Until then it costs about 90 tokens; SKILL.md has 575 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from daymade/claude-code-skills at commit 91bed2b, republished under its MIT licence (© daymade). 575 words, ~1,346 tokens.

Download SKILL.mdSave it as .claude/skills/openclaw-model-switch/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
openclaw-model-switch
description
Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X is not supported", or a config edit that doesn't take effect. Use for 切换模型/换模型/升级模型 or 模型配的错了. Not for plain config audits (use openclaw).

OpenClaw Model Switch

Switch or repair an OpenClaw instance's model configuration by safely editing openclaw.json.

Diagnose before you edit. Model failures on OpenClaw are usually NOT the model id — they are key routing (env hijack), provider-plugin restrictions, or endpoint/model mismatch. Changing the model id without checking these first is how a 5-minute fix becomes a 2-hour debugging session. The full trap catalog with discovery commands lives in references/troubleshooting-model-config.md — read it the moment anything errors.

Step 1 — Find the real config file(s)

Do NOT assume a hardcoded path. Candidate locations (check all, edit all that exist):

  1. ~/.openclaw/openclaw.json — the gateway's live config on most installs
  2. ~/.kimi/kimi-claw/openclaw.json — Kimi Claw mirror, kept in sync on some installs
  3. ~/.kimi_openclaw/openclaw.json — legacy desktop path

Confirm which one the gateway actually reads: openclaw gateway status prints Config (service): <path>. If several exist, treat them as mirrors: edit all of them identically, otherwise the next sync overwrites your fix.

Step 2 — Probe the endpoint + model BEFORE touching config

Never trust a relay's model listing (GET /v1/models on new-api style relays is frequently incomplete — a model can be absent from the list yet serve fine). The only authority is a real completion probe from the host that will run the bot:

bash
curl -sS -o /tmp/probe.json -w "HTTP %{http_code}\n" \
  -X POST "<baseUrl>/v1/messages" \
  -H "Authorization: Bearer <apiKey>" \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{"model":"<model-id>","max_tokens":16,"messages":[{"role":"user","content":"hi"}]}'

Expected: HTTP 200 and a content array in the body. 401 Invalid token with a token you just verified works elsewhere → the wire key is being hijacked (see trap #1 in the troubleshooting reference). 503 No available channel → the model is not served for this token/group from this network (trap #3) — pick a served model or fix the relay, don't blind-switch.

Step 3 — Switch the model

bash
python3 scripts/switch-model.py <model-id> --restart
# target a specific provider instead of the guessed one:
python3 scripts/switch-model.py k3 --provider kimi-relay --restart
# explicit config path (skips discovery):
python3 scripts/switch-model.py k3 --config ~/.openclaw/openclaw.json --restart

The script: discovers and backs up every candidate config to <config-dir>/config-backups/, adds the model definition if known, sets agents.defaults.model.primary, syncs mirror files, and restarts the gateway with --restart.

Step 4 — Verify end-to-end (mandatory)

A restarted gateway proves nothing. Run one real agent turn and read the result metadata:

bash
openclaw agent --local --json --agent main --session-id verify-$(date +%s) -m "ping"

Success looks like: "result": "success", "fallbackUsed": false, and the gateway log shows agent model: <provider>/<model> (thinking=...). "result": "success" with fallbackUsed: true means your target failed and a fallback saved the turn — the config is still wrong.

Show full SKILL.md (221 more words)Show less

Common failures → read the troubleshooting reference

SymptomMost likely trap
LLM error new_api_error: Invalid token, but the token works in curlTrap #1 — env KIMI_API_KEY hijacks the provider's wire key
Thinking level "max" is not supported ... Use one of: off, onTrap #2 — kimi-provider plugin hardcodes binary thinking; bypass with a custom provider
Thinking level ... Use one of: off, minimal, low, medium, highTrap #2 variant — anthropic-messages base profile; unlock via params.canonicalModelId
503 No available channel for model X under group defaultTrap #3 — model not served for this group/network; listing ≠ availability
Edit saved + gateway restarted, nothing changedTrap #5 — edited the wrong file / mirror not synced

Safety rules

  • Always backup before editing (the script does this; manual edits: copy to config-backups/ first)
  • Preserve existing apiKey, headers, plugin configs, and env blocks — retype only the fields you mean to change
  • Validate JSON after manual edits: python3 -m json.tool openclaw.json > /dev/null
  • Do not commit config files containing API keys to version control
  • After changing anything, redo the Step-4 verification — and if it fails, restore the newest backup before trying something else

Resources

  • scripts/switch-model.py — model switcher with config discovery, backup, mirror sync, and restart
  • references/kimi-models.md — known model specs (k3, k2p6, kimi-k2.7-code) and config snippets
  • references/troubleshooting-model-config.md — the trap catalog: env key hijack, plugin binary thinking, canonicalModelId, relay availability, config discovery. Read on any error.

© daymade, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in openclaw-model-switch of daymade/claude-code-skills.

  • SKILL.md
  • references/kimi-models.md
  • references/troubleshooting-model-config.md
  • scripts/switch-model.py

Open the folder on GitHubat commit 91bed2b

Compare with similar skills

Openclaw Model Switch next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Openclaw Model Switch compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Openclaw Model Switch this skilldaymade/claude-code-skills1.4k—~1.3kAutomated safety check: PassMIT
Kimi Code DelegationCherryHQ/cherry-studio52k1 repos~504Automated safety check: PassAGPL-3.0
CCS Task Delegationkaitranntt/ccs2.9k—~1.8kAutomated safety check: PassMIT
Ccmanager Configkbwo/ccmanager1.3k—~1.5kAutomated safety check: PassMIT
Kimi WebbridgeMoonshotAI/kimi-code7.8k—~3.6kAutomated safety check: PassMIT
Open Kimi Pptjinwyp/open-ppt-skill1572 repos~5.1kAutomated safety check: PassMIT

Similar skills

  • Kimi Code Delegation

    CherryHQ/cherry-studio

    Delegates one bounded repository task to Kimi Code in non-interactive prompt mode and reads back the final result from its JSON event stream.

    52k GitHub starsUsed in 1 repo~504 tokens
    Agent WorkflowsAuto-check passed
  • CCS Task Delegation

    kaitranntt/ccs

    Hands simple, deterministic tasks such as typo fixes, tests and small refactors to cheaper models through the ccs CLI, choosing a profile from your config.

    2.9k GitHub stars~1.8k tokensUpdated 7 days ago
    Agent WorkflowsAuto-check passed
  • Ccmanager Config

    kbwo/ccmanager

    Set up, review, or repair a CCManager config — .ccmanager.json at a git repository root, or the global ~/.config/ccmanager/config.json.

    1.3k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Kimi Webbridge

    MoonshotAI/kimi-code

    Kimi Browser Extension(Kimi 浏览器扩展,原 Kimi WebBridge)lets AI control the user's real browser — navigate, click, type, read, screenshot, and interact with any website using the user's actual login…

    7.8k GitHub stars~3.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Open Kimi Ppt

    jinwyp/open-ppt-skill

    Create, edit, replicate, read, and export presentations. An agent skill from jinwyp/open-ppt-skill.

    157 GitHub starsUsed in 2 repos~5.1k tokens
    Documents & OfficeAuto-check passed
  • Update Aegis

    GanyuanRan/Aegis

    A skill your agent uses when the user says aegis:update, asks to update or upgrade an installed Aegis method-pack, wants the latest Aegis version, or asks whether Aegis is current on this host.

    1.3k GitHub starsUsed in 2 repos~1.4k tokens
    Auto-check passed

More from daymade/claude-code-skills

All 103 skills in this repo
  • Video Comparer

    daymade/claude-code-skills

    This skill should be used when comparing two videos to analyze compression results or quality differences.

    1.4k GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check: notes
  • CLI Demo Generator

    daymade/claude-code-skills

    Generates professional animated CLI demos as GIFs using VHS terminal recordings.

    1.4k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Doc To Markdown

    daymade/claude-code-skills

    Converts DOCX/PDF/PPTX and saved HTML/HTM to high-quality Markdown with automatic post-processing.

    1.4k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Interaction Design Board

    daymade/claude-code-skills

    Generates several distinct, clickable HTML interaction prototypes for one product surface into a Design Board and collects selection/remix feedback before implementation.

    1.4k GitHub stars~2.7k tokensUpdated today
    Auto-check passed
  • Auto Repo Setup

    daymade/claude-code-skills

    Diagnoses and repairs repository setup and guarded Git workflows for Claude Code or Codex — environment repair, startup sync, hook auditing, collaborator handoff.

    1.4k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Bigdata Skill

    daymade/claude-code-skills

    Pulls Bigdata.com (RavenPack) financial and news data via the official bigdata-client SDK and /v1/ REST endpoints — structured financials, prices, analyst estimates, entity-sentiment series…

    1.4k GitHub stars~3.7k tokensUpdated today
    Auto-check passed

Works with

Questions about Openclaw Model Switch

What does Openclaw Model Switch do?

Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X…. Openclaw Model Switch is an agent skill from daymade/claude-code-skills. Switches or repairs an OpenClaw instance's model config: changes the default model, adds model definitions, and fixes 401 "Invalid token", "No available channel / model not found", "Thinking level X is not supported", or a config edit that doesn't take effect.

How do I install Openclaw Model Switch in Claude Code?

Run `npx skills add daymade/claude-code-skills --skill openclaw-model-switch -a claude-code`. Or copy the skill folder (openclaw-model-switch in daymade/claude-code-skills) into .claude/skills/openclaw-model-switch in your project. Claude Code loads it when a task matches its description.

How do I install Openclaw Model Switch in Codex?

Run `npx skills add daymade/claude-code-skills --skill openclaw-model-switch -a codex`. Or copy the skill folder (openclaw-model-switch in daymade/claude-code-skills) into .agents/skills/openclaw-model-switch in your project. Codex loads it when a task matches its description.

Can I use Openclaw Model Switch in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add daymade/claude-code-skills --skill openclaw-model-switch -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/openclaw-model-switch, .gemini/skills/openclaw-model-switch, .github/skills/openclaw-model-switch and .opencode/skills/openclaw-model-switch in your project.

What does Openclaw Model Switch need to run?

Going by SKILL.md and its folder, Openclaw Model Switch needs Python for the scripts in its folder, the command-line tools its instructions call (python3 and curl) and credentials named KIMI_API_KEY. Our summary lists: Python 3; A credential in KIMI_API_KEY.

Does Openclaw Model Switch access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Openclaw Model Switch safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Openclaw Model Switch use?

Openclaw Model Switch is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Openclaw Model Switch use?

About 1.3k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3k tokens, read only when the agent opens those files.

What are the alternatives to Openclaw Model Switch?

Skills that share tags, products or a category with Openclaw Model Switch: Kimi Code Delegation (CherryHQ/cherry-studio, 52k stars), CCS Task Delegation (kaitranntt/ccs, 2.9k stars), Ccmanager Config (kbwo/ccmanager, 1.3k stars) and Kimi Webbridge (MoonshotAI/kimi-code, 7.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Openclaw Model Switch?

daymade (a GitHub user) maintains it in daymade/claude-code-skills, which has 1,444 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 8, 2026.

Source: daymade/claude-code-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.