adaptive-model-cascade

adaptive-model-cascade is a skill for Claude Code, Codex from roedyrustam/vibes-plug. It costs 112 tokens per session (3,524 once invoked), scanned A, original, MIT.

A design for routing AI requests to different models according to task difficulty. It tries a faster or less costly model first and escalates when an automated quality check finds the result insufficient.

In plain words
What is it for?
It is for building AI applications that assess request complexity, apply quality gates, and choose or escalate between model tiers.
Why use it?
It helps avoid sending every request to the most expensive model while retaining a path to a more capable model for harder tasks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit It is for building AI applications that assess request complexity, apply quality gates, and choose or escalate between model tiers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/roedyrustam/vibes-plug/adaptive-model-cascade
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add roedyrustam/vibes-plug --skill adaptive-model-cascade
Clone the repo
git clone --depth 1 https://github.com/roedyrustam/vibes-plug

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for adaptive-model-cascade

README.md
[![agentmods](https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/adaptive-model-cascade/github.svg)](https://agentmods.dev/skills/roedyrustam/vibes-plug/adaptive-model-cascade)
Your own site
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/adaptive-model-cascade"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/adaptive-model-cascade/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for adaptive-model-cascade

Your own site · 80×15
<a href="https://agentmods.dev/skills/roedyrustam/vibes-plug/adaptive-model-cascade"><img src="https://agentmods.dev/badge/skills/roedyrustam/vibes-plug/adaptive-model-cascade.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,524 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.03524
Opus 5.5 $0.00045 $0.01410
Sonnet 5.5 $0.00022 $0.00705
Haiku 4.5 $0.00011 $0.00352

Measured yesterday against content hash 16b72b1e58f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

adaptive-model-cascade scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/adaptive-model-cascade/SKILL.md · 317 lines

How it starts

The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.

adaptive-model-cascade — vibes-plug Skill

English | Bahasa Indonesia


English

Orchestration & Integration

Connects and orchestrates with llm-finops-router, frontier-ai-models-expert, context-window-engineer, kv-cache-prefix-optimizer, llm-observability-expert, ai-llm-integration-expert, vercel-ai-sdk-expert, and test-time-compute-optimizer to implement cost-optimal model selection across all AI-powered features.

Description

Production architecture for routing AI requests to the optimal model tier based on real-time task complexity assessment. Instead of sending every request to the most expensive frontier model, this skill implements a cascade: try the fastest/cheapest model first, evaluate output quality via automated judges, and escalate to more capable (expensive) models only when the cheaper tier fails the quality gate. Achieves 40-60% cost reduction for typical production workloads where 60-70% of requests are simple enough for smaller models.

Trigger Conditions

Activate this skill when:

  • Running AI features in production with significant token spend (>$500/month).
  • Building applications where response quality varies by task complexity (some queries need GPT Astra 6, others need only Flash).
  • Implementing cost optimization for multi-model AI architectures.
  • Designing fallback and retry strategies across model providers.

Core Concepts & Patterns

1. The Model Cascade Architecture
USER REQUEST
      │
      ▼
┌──────────────────────┐
│ COMPLEXITY SCORER    │  Classify request complexity: LOW / MEDIUM / HIGH / ULTRA
│ (Fast heuristic or   │
│  lightweight model)   │
└──────┬───────────────┘
       │
       ├── LOW ──────────► Gemini 4 Flash-Lite / Claude Haiku ($0.025/1M)
       │                        │
       │                   ┌────▼────┐
       │                   │ QUALITY  │  Pass? → Return response
       │                   │ GATE     │  Fail? → Escalate to MEDIUM
       │                   └─────────┘
       │
       ├── MEDIUM ───────► Gemini 4 Flash / Claude Sonnet ($0.30/1M)
       │                        │
       │                   ┌────▼────┐
       │                   │ QUALITY  │  Pass? → Return response
       │                   │ GATE     │  Fail? → Escalate to HIGH
       │                   └─────────┘
       │
       ├── HIGH ─────────► Gemini 4 Pro / Claude Opus ($3-15/1M)
       │                        │
       │                   ┌────▼────┐
       │                   │ QUALITY  │  Pass? → Return response
       │                   │ GATE     │  Fail? → Escalate to ULTRA
       │                   └─────────┘
       │
       └── ULTRA ────────► GPT Astra 6 + Extended Thinking ($15/1M)
                                │
                           Return response (final tier, no escalation)

Read the full file on GitHub · 317 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 16b72b1e58f9
  2. 10d ago Changed bc61078048b2
  3. 15d ago First seen · 317 lines · 112 tokens per session scan A 97e67109fcc2

Subscribe to this mod's changes

adaptive-model-cascade is a skill published in the GitHub repository roedyrustam/vibes-plug (78 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 3,524 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-04.

Related

Other skills, from other repositories

iflytek-image-understanding

An image-analysis tool that describes pictures and answers questions about what they contain. It uses an AI vision service, which interprets visual content rather than only reading text files.

iflytek/iFly-Skills · 61 tokens

ai-product

Every product will be AI-powered. The question is whether you'll build it right or ship a demo that falls apart in production.

lingxling/awesome-skills-cn · 28 tokens

langchain

Build AI agents with LangChain v1 and LangGraph in Python. Use this skill whenever the user mentions LangChain, LangGraph, createagent, initchatmodel, @tool, ToolRuntime, agent middleware, human-in-the-loop, structured output, MCP tools (langchain.mcp, MCPAdapter), RAG, multi-agent handoffs or subagents…

svngoku/coding-agents-skills · 139 tokens

genai-tk

Build GenAI and agentic apps with genai-tk (tclatos/genai-tk), a YAML-driven IoC toolkit over LangChain, DeepAgents, DeerFlow, and Prefect. Use this skill whenever the user mentions genai-tk, genaitk, cli init, cli agents run, LangchainAgent, createharness, getllm, globalconfig(), modelid@provider…

svngoku/coding-agents-skills · 147 tokens

adaption-ai

Adaption AI SDK for synthetic data augmentation and dataset adaptation. Use when building data pipelines with the Adaption Python SDK, uploading datasets (local files, Hugging Face, Kaggle), running augmentation/adaptation jobs, configuring brand controls (hallucination mitigation, safety categories, length), recipe…

svngoku/coding-agents-skills · 149 tokens

airflow

Expert Apache Airflow assistance covering DAG authoring, TaskFlow API (@task), operators, sensors, and Celery/Kubernetes executors. Use when orchestrating complex data engineering and ML pipelines.

G1Joshi/Agent-Skills · 42 tokens