batuta-routing

Derives cost-based model routing rules from the live provider catalog for task complexity lanes.

2.7k|171|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/compozy/compozy --skill batuta-routing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: batuta-routing
Source: https://github.com/compozy/compozy/tree/main/catalog/packages/batuta/resources/skills/batuta-routing
Command: npx skills add https://github.com/compozy/compozy --skill batuta-routing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Choosing which AI model should execute each task is usually guesswork or hardcoded configuration. This Skill provides a default routing table that maps task complexity lanes (low, medium, high, critical) to the cheapest capable executor, derived from the models actually installed on the machine rather than copied examples.

Core Features & Use Cases

  • Complexity lane semantics: Defines four routing lanes (low, medium, high, critical) matching the complexity vocabulary written into task frontmatter by cy-create-tasks.
  • Catalog-driven derivation: Uses compozy__provider_models_list with cost fields (input_per_million / output_per_million) as the only source of concrete provider and model IDs, so routing never targets uninstalled providers.
  • Stored workspace overrides: Writes runtime_rules via compozy__loop_configure as a per-workspace override for implement-tasks, with id > type > complexity matching precedence, and supports surgical id rules for escalation and reclassification.
  • Use Case: When bootstrapping a batuta workspace, derive a routing table from the local provider catalog, present it with costs for operator confirmation, then store it so every run-loop child resolves the right model automatically.

Quick Start

Ask the agent to derive a cost-based routing table from the live provider catalog and store it as the workspace loop configuration for implement-tasks.

Frequently Asked Questions about batuta-routing

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

FAQPage Schema
How do I route tasks to different AI models by complexity?

Define runtime_rules that match on the complexity field (low, medium, high, critical) written into task frontmatter, and store them with compozy__loop_configure as a per-workspace override. Each rule maps a lane to a provider and model derived from the live catalog.

How do I choose the cheapest model for each task lane?

Query compozy__provider_models_list and use the input_per_million and output_per_million cost fields as evidence. Map low lanes to the cheapest coding-capable model, medium to mid-tier, high to strong coding models, and critical to the operator's most trusted frontier model.

Why does a model in the catalog fail to run a task?

A model can appear in the catalog but be disabled for the operator's account at the provider, which is invisible to the daemon. When a lane fails its bind with zero tokens, ask the operator what their account actually enables.

How do I escalate a task that keeps failing in its lane?

Write a surgical id-based rule one lane up into the stored override, for example {"match":{"id":"task_NN"},"runtime":{...}} prepended to the rules, then re-dispatch. The id match beats complexity, and the rule should be removed after the task lands.

Can I reuse an example routing table from another machine?

No. Concrete provider and model IDs must be derived from the local compozy__provider_models_list output, which reflects the CLIs actually installed. Example tables in documentation are dated snapshots and will not match your catalog.