model-escalation

Automate model selection between Haiku, Sonnet, and Opus based on task complexity.

1|1|Updated Jan 6, 2026
One-click install
npx skills add https://github.com/Geralt1983/Thanos --skill model-escalation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-escalation
Source: https://github.com/Geralt1983/Thanos/tree/main/Skills/model-escalation
Command: npx skills add https://github.com/Geralt1983/Thanos --skill model-escalation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the challenge of optimizing AI model usage by automatically selecting the most appropriate model (Haiku, Sonnet, or Opus) based on the estimated complexity of a given task, thereby managing API costs and ensuring efficient performance.

Core Features & Use Cases

  • Dynamic Model Selection: Automatically switches between Anthropic's Haiku, Sonnet, and Opus models based on task complexity thresholds.
  • Prefix Consistency: Enforces and tracks the use of model-specific prefixes ([H], [S], [O]) to ensure alignment between the model and its output.
  • Cost Optimization: Reduces API expenses by using less powerful, cheaper models for simpler tasks.
  • Use Case: When building a multi-model agent, this Skill ensures that simple chat interactions use Haiku, code-related queries use Sonnet, and complex architectural planning uses Opus, all while maintaining output consistency.

Quick Start

Use the model_escalation_hook_v2 function from Tools.model_escalator_v2 to determine the appropriate model for a given conversation context.

Frequently Asked Questions about model-escalation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize Anthropic API costs by switching between Haiku, Sonnet, and Opus models automatically?

You can optimize Anthropic API costs by using automated model escalation that dynamically selects Haiku, Sonnet, or Opus based on estimated task complexity thresholds. This ensures less powerful, cheaper models handle simpler tasks while reserving Opus for complex architectural planning.

What is dynamic model selection for AI agents and how does it manage complexity?

Dynamic model selection for AI agents automatically evaluates task complexity and routes processing to the appropriate model tier. It enforces prefix consistency using [H], [S], and [O] tags with logging and correction to maintain alignment between the selected model and its output.

How do I enforce prefix consistency when using multiple Anthropic models in a single agent?

To enforce prefix consistency across Haiku, Sonnet, and Opus models, you can apply an automated hook that tracks [H], [S], and [O] tags and corrects discrepancies. This ensures alignment between the active model and its generated output throughout the conversation.

Can I use automated model escalation for multi-model agents handling both simple chat and complex code queries?

Yes, automated model escalation supports multi-model agents by routing simple chat interactions to Haiku, code-related queries to Sonnet, and complex architectural planning to Opus. This dynamically manages API costs while ensuring appropriate model utilization for diverse tasks.

Does this model selection approach require external dependencies to run?

No, this model selection approach operates entirely standalone without requiring any external dependencies. It relies solely on internal scripts to automate the model switching logic and enforce prefix consistency for AI agents.

Why does my AI agent output mismatched model prefixes when escalating tasks?

Mismatched model prefixes occur when the output tags lose alignment with the active model during task escalation. You can resolve this by applying an automated correction mechanism that strictly enforces [H], [S], and [O] prefix consistency with active logging.