force-model — Claude Code skill: what it does, how to install
Skill for Claude Code and Codex that pins a session to a chosen model through Weave Router. Activates when you run $force-model or $fm with a model ID.
Apache-2.0 ★ 5,622 updated 2026-11-17
npx skills add weave-os/router --skill force-model -a claude-codeWhat force-model does
This skill locks the active session to a chosen model through Weave Router. When triggered, the assistant executes scripts/emit.sh from the skill folder, supplying the requested model identifier as a quoted argument list.
The script prints a leading-space /force-model line. Weave Router catches this execution output, applies the model pin, and generates its own response. The agent is directed not to repeat the script output or send slash commands directly.
Functionality depends entirely on an active Weave Router proxy: without it processing the emitted command from scripts/emit.sh, session pinning will not occur.
What it helps with
- pin an active assistant session to a specific model identifier
- delegate model switching directly to Weave Router
- prevent the agent from repeating internal command outputs in chat
Example prompts for the agent
- $force-model claude-3-7-sonnet
- $fm gpt-4o
- $force-model deepseek-r1
How to install force-model
1Skills CLI (Vercel)
npx skills add weave-os/router --skill force-model -a claude-code2Manually: put the files in place
~/.claude/skills/force-model/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/force-model/
1Skills CLI (Vercel)
npx skills add weave-os/router --skill force-model -a codex2Manually: put the files in place
.agents/skills/force-model/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add weave-os/router --skill force-model -a cursor2Manually: put the files in place
.cursor/skills/force-model/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install weave-os/router install/codex-skills/force-model2Manually: put the files in place
.github/skills/force-model/SKILL.md1Skills CLI (Vercel)
npx skills add weave-os/router --skill force-model -a gemini-cli2Platform CLI
gemini skills install https://github.com/weave-os/router --path install/codex-skills/force-modelManually: put the files in place
.devin/skills/force-model/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about force-model
How to install force-model in Claude Code?
Run npx skills add weave-os/router --skill force-model -a claude-code in your terminal.
What does force-model do?
It runs scripts/emit.sh with a target model ID, allowing Weave Router to detect the output line and pin the conversation to that model.
What is required for force-model to work?
It requires Weave Router running alongside the environment to read the script output and handle model redirection.
Source text
SKILL.md · Apache-2.0
--- name: force-model description: "Pin this Codex session to a specific model through the Weave Router." --- <!-- weave-router managed force-model skill --> When the user invokes `$force-model <model-id>` (or `$fm`), run this skill's `scripts/emit.sh` using the absolute path shown in this skill's `<path>` (its directory + `/scripts/emit.sh`). Pass the model id as arguments, quoted as a single argument list. Do not send a user message and do not type a Codex slash command. The script prints a leading-space `/force-model` line. The Weave Router reads that exec output, pins the session, and continues this turn — so run the script once and do not repeat its output as your answer. The router renders its own acknowledgment, so do not restate or reason about it; end the turn.
© weave-os · Apache-2.0 · weave-os/router