Skip to content
Back to skills

Model Switch

ASecurity

Switch the agent's model at runtime and restart. Use when the user asks to change models (e.g., "switch to kimi", "use opus", "go cheaper"), or when the agent decides a different model is better for the current workload.

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
ai-agentsgogit

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill model-switch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Switch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Switch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-model-switch-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-model-switch-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-switch
description: Switch the agent's model at runtime and restart. Use when the user asks to change models (e.g., "switch to kimi", "use opus", "go cheaper"), or when the agent decides a different model is better for the current workload.
---

# Model Switch

## Overview

This skill switches the agent's primary model by patching the gateway config and letting the gateway auto-restart. Use it when a user explicitly requests a model change or when you determine a different model is better suited for the task (cost, speed, quality).

## Workflow

### 1) Trigger
- User asks to change models ("switch to X", "use opus", "go cheaper")
- Or you decide a different model is better for the current workload

### 2) Map alias → full model ID
Use the reference table below to resolve common aliases. If the alias is unknown, ask for clarification or the exact model ID.

### 3) Patch gateway config
Update the primary model:
- `gateway config.patch` → `agents.defaults.model.primary = <full_model_id>`

### 4) Gateway restarts automatically
No manual restart needed.

### 5) Confirm to the user
Confirm the model switch in plain language.

## Reference: Known Model Aliases

| Alias | Full model ID |
| --- | --- |
| opus | anthropic/claude-opus-4-5 |
| sonnet | anthropic/claude-sonnet-4-5 |
| kimi | nvidia-build/moonshotai/kimi-k2.5 |
| codex | github-copilot/gpt-5.2-codex |

## Notes

- **Context resets after restart.** Warn the user if the switch happens mid-conversation.
- **Per-session override (no restart):** You can use the `session_status` tool with the `model` parameter to override the model for a single session without changing defaults.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.