Agent skill · Backend & API

model-escalation

Automatic model switching based on task complexity for OpenClaw agents. Dynamically escalates between Haiku (simple), Sonnet (medium), and Opus (complex) models. Tracks prefix consistency ([H], [S], [O]) and logs discrepancies. USE WHEN configuring multi-model agents, optimizing API costs, or implementing complexity-based model routing.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill model-escalation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/ai-llm/model-escalation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Model Escalation **Canonical implementation:** `Tools/model_escalator_v2.py` Complexity-based model switching with prefix tracking for OpenClaw agents. ## Quick Start ```python from Tools.model_escalator_v2 import model_escalation_hook_v2 as model_escalation_hook # Determine model from conversation context result = model_escalation_hook("main-session", { "messages": [], "current_message": "Explain this API integration", "token_count": 0, }) session_status(model=result.model) ``` ## Complexity Thresholds | Range | Model | Prefix | Use Cases | |-------|-------|--------|-----------| | 0-0.25 | Haiku | [H] | Simple questions, confirmations, chat | | 0.25-0.75 | Sonnet | [S] | Code, debugging, API integration | | 0.75-1.0 | Opus | [O] | Architecture, complex algorithms, strategic planning | ## High Complexity Indicators (Opus) - System architecture design - Distributed systems - Multi-step technical implementations - Deep code reviews - Strategic planning with tradeoffs - "Implement X mechanism/system" requests ## Prefix Tracking Ensures conversation prefix matches active model: ```python from Tools.model_prefix_tracker import ModelPrefixTracker tracker = ModelPrefixTracker() # Valida

What's inside
Steps it walks through
  1. Quick Start
  2. Complexity Thresholds
  3. High Complexity Indicators (Opus)
  4. Prefix Tracking
  5. Integration with AGENTS.md
  6. Configuration
  7. Database Schema
Ships with 1 file
  • metadata.json
Commands it runs
sqlite3 model_prefix_state.db "SELECT * FROM prefix_log WHERE correction_applied=1;"
More from claude-skill-registry
All skills →
About this skill
What does the model-escalation skill do?

Automatic model switching based on task complexity for OpenClaw agents. Dynamically escalates between Haiku (simple), Sonnet (medium), and Opus (complex) models. Tracks prefix consistency ([H], [S], [O]) and logs discrepancies. USE WHEN configuring multi-model agents, optimizing API costs, or implementing complexity-based model routing.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill model-escalation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going