Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add weave-os/router --skill force-model -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/force-model/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/force-model/

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

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set20

The whole set →

Project sponsors

Companies that keep this analytics open