model-hierarchy

Classify tasks by complexity and route them to the cheapest capable model.

344|20|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/zscole/model-hierarchy-skill --skill model-hierarchy-zscole
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-hierarchy
Source: https://github.com/zscole/model-hierarchy-skill/tree/main
Command: npx skills add https://github.com/zscole/model-hierarchy-skill --skill model-hierarchy-zscole

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cost-optimize AI agent operations by routing tasks to the cheapest model that can handle them. It enables cost-aware model selection and dynamic spawning of sub-agents to minimize spend without sacrificing results.

Core Features & Use Cases

  • Classifies tasks by complexity and routes them to Tier 1/2/3 models to minimize costs.
  • Supports sub-agent spawning and configurable signals for robust routing decisions.
  • Includes examples and testing workflows with OpenClaw integration and Claude/Codex guidance.

Quick Start

Copy SKILL.md to your skills directory and restart the gateway to load this skill.

Frequently Asked Questions about model-hierarchy

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

FAQPage Schema
How does model routing reduce AI agent costs?

Model routing reduces AI agent costs by classifying tasks by complexity and directing them to the cheapest capable model. It applies tiered classification across agent workflows to minimize spend without sacrificing results.

How do I set up tiered model routing for sub-agent spawning?

To set up tiered model routing, copy the SKILL.md file to your skills directory and restart the gateway to load the skill. This enables cost-aware model selection and dynamic spawning of sub-agents based on configurable task signals.

Can I route tasks to different models based on complexity in OpenClaw?

Yes, you can route tasks to different models in OpenClaw workflows. The skill classifies tasks into routine, moderate, and complex tiers, applying cost-aware decision making to select the cheapest capable model for each specific task.

How are vision tasks handled in tiered model classification?

Vision tasks are handled through configurable vision overrides in the tiered classification algorithm. This ensures that specific task signals bypass standard complexity routing to use models capable of processing vision inputs.

What happens when a cheaper model cannot handle a routed task?

When a cheaper model cannot handle a routed task, the skill includes escalation handling to manage failures. It uses configurable task signals to dynamically escalate the task to a more capable tier model.

Does this model routing skill include cost calculation tests?

Yes, the skill includes testing workflows and cost calculations. It provides examples with OpenClaw integration and guidance for Claude and Codex to verify that the tiered routing algorithm satisfies functional requirements.