opus

Auto-route tasks to the cheapest Claude model that works correctly. Three-tier progression: Haiku → Sonnet → Opus. Classify before responding. HAIKU (default): factual Q&A, greetings, reminders, status checks, lookups, simple file ops, heartbeats, casual chat, 1-2 sentence tasks. ESCALATE TO SONNET: code >10 lines, analysis, comparisons, planning, reports, multi-step reasoning, tables, long writing >3 paragraphs, summarization, research synthesis, most user conversations. ESCALATE TO OPUS: architecture decisions, complex debugging, multi-file refactoring, strategic planning, nuanced judgment, deep research, critical production decisions. Rule: If a human needs >30 seconds of focused thinking, escalate. If Sonnet struggles with complexity, go to Opus. Save 50-90% on API costs by starting cheap and escalating only when needed.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
0 · 900 · 2 current installs · 2 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The SKILL.md implements a three-tier model-routing policy (Haiku→Sonnet→Opus) that matches the described purpose of cost‑aware routing. However, the package shows inconsistent naming/metadata (registry slug 'opus' vs SKILL.md name 'smart-model-switching' and differing ownerId values in registry vs _meta.json), which reduces provenance confidence.
Instruction Scope
The runtime instructions are self-contained policy text and example calls (sessions_spawn, cron payload). They do not request or instruct reading unrelated files, environment variables, or secret exfiltration. The guidance is prescriptive about when to escalate and what tasks belong to each tier.
Install Mechanism
This is an instruction-only skill with no install spec and no code files to write to disk, which is low risk from an installation perspective.
Credentials
The skill declares no required environment variables, credentials, or config paths — consistent with an instruction-only routing policy. No disproportionate secret access is requested.
Persistence & Privilege
always:false and default autonomous invocation are normal. Be aware this skill's behavior will cause the agent to spawn additional model calls (potentially to billing‑expensive models) — a cost/privilege consideration rather than a direct security escalation. The skill does not request system-wide changes or other skills' credentials.
What to consider before installing
This skill appears to be a straightforward model-routing policy and contains no code or secret requests, but there are packaging/provenance inconsistencies (different skill name in SKILL.md vs registry slug and differing ownerId between registry and _meta.json). Before installing: 1) verify the publisher/owner and that the slug/name mismatch is intentional (ask the publisher or check an authoritative registry page); 2) confirm your platform supports the sessions_spawn pattern and the model names used (haiku/sonnet/opus) so the instructions actually map to real models; 3) test in a sandbox account or with billing limits — the policy intentionally escalates to costly models and could increase your API spend if thresholds are tuned incorrectly; 4) consider putting cost/budget guards or rate limits on autonomous model spawning; 5) if provenance isn’t verifiable, treat it as untrusted documentation rather than install/enable. If you can confirm publisher identity and intended mapping of model names, the skill is coherent and likely safe to use.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.0
Download zip
latestvk97193nrfj7vhgqfp0et964ded80r6yv

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

💰 Clawdis

SKILL.md

Smart Model Switching

Three-tier Claude routing: Haiku → Sonnet → Opus

Start with the cheapest model. Escalate only when needed. Save 50-90% on API costs.

The Golden Rule

If a human would need more than 30 seconds of focused thinking, escalate from Haiku to Sonnet. If the task involves architecture, complex tradeoffs, or deep reasoning, escalate to Opus.

Cost Reality

ModelInputOutputRelative Cost
Haiku$0.25/M$1.25/M1x (baseline)
Sonnet$3.00/M$15.00/M12x
Opus$15.00/M$75.00/M60x

Bottom line: Wrong model selection wastes money OR time. Haiku for simple, Sonnet for standard, Opus for complex.


💚 HAIKU — Default for Simple Tasks

Stay on Haiku for:

  • Factual Q&A — "what is X", "who is Y", "when did Z"
  • Quick lookups — definitions, unit conversions, short translations
  • Status checks — calendar, file reads, session monitoring
  • Heartbeats — periodic checks, HEARTBEAT_OK responses
  • Memory & reminders — "remember this", "remind me to..."
  • Casual conversation — greetings, small talk, acknowledgments
  • Simple file ops — read, list, basic writes
  • One-liner tasks — anything answerable in 1-2 sentences

NEVER do these on Haiku

  • ❌ Write code longer than 10 lines
  • ❌ Create comparison tables
  • ❌ Write more than 3 paragraphs
  • ❌ Do multi-step analysis
  • ❌ Write reports or proposals

💛 SONNET — Standard Work (The Workhorse)

Escalate to Sonnet for:

Code & Technical

  • Code generation — write functions, build features, scripts
  • Code review — PR reviews, quality checks
  • Debugging — standard bug investigation
  • Documentation — README, comments, user guides

Analysis & Planning

  • Analysis & evaluation — compare options, assess trade-offs
  • Planning — project plans, roadmaps, task breakdowns
  • Research synthesis — combining multiple sources
  • Multi-step reasoning — "first... then... finally"

Writing & Content

  • Long-form writing — reports, proposals, articles (>3 paragraphs)
  • Creative writing — blog posts, descriptions, copy
  • Summarization — long documents, transcripts
  • Structured output — tables, outlines, formatted docs

❤️ OPUS — Complex Reasoning Only

Escalate to Opus for:

Architecture & Design

  • System architecture decisions
  • Major codebase refactoring
  • Design pattern selection with tradeoffs
  • Database schema design

Deep Analysis

  • Complex debugging (multi-file, race conditions)
  • Security reviews
  • Performance optimization strategy
  • Root cause analysis of subtle bugs

Strategic & Creative

  • Strategic planning — business decisions, roadmaps
  • Nuanced judgment — ethics, ambiguity, competing values
  • Deep research — comprehensive multi-source analysis

🔄 Implementation

For Subagents

```javascript // Routine monitoring sessions_spawn(task="Check backup status", model="haiku")

// Standard code work
sessions_spawn(task="Build the REST API endpoint", model="sonnet")

// Architecture decisions sessions_spawn(task="Design the database schema for multi-tenancy", model="opus") ```

For Cron Jobs

```json { "payload": { "kind": "agentTurn", "model": "haiku" } } ``` Always use Haiku for cron unless the task genuinely needs reasoning.


📊 Quick Decision Tree

``` Is it a greeting, lookup, status check, or 1-2 sentence answer? YES → HAIKU NO ↓

Is it code, analysis, planning, writing, or multi-step? YES → SONNET
NO ↓

Is it architecture, deep reasoning, or critical decision? YES → OPUS NO → Default to SONNET, escalate if struggling ```


📋 Quick Reference Card

``` ┌─────────────────────────────────────────────────────────────┐ │ SMART MODEL SWITCHING │ │ Haiku → Sonnet → Opus │ ├─────────────────────────────────────────────────────────────┤ │ 💚 HAIKU (cheapest) │ │ • Greetings, status checks, quick lookups │ │ • Factual Q&A, definitions, reminders │ │ • Simple file ops, 1-2 sentence answers │ ├─────────────────────────────────────────────────────────────┤ │ 💛 SONNET (standard) │ │ • Code > 10 lines, debugging │ │ • Analysis, comparisons, planning │ │ • Reports, proposals, long writing │ ├─────────────────────────────────────────────────────────────┤ │ ❤️ OPUS (complex) │ │ • Architecture decisions │ │ • Complex debugging, multi-file refactoring │ │ • Strategic planning, deep research │ ├─────────────────────────────────────────────────────────────┤ │ 💡 RULE: If a human needs > 30 sec thinking → escalate │ │ 💰 COST: Haiku 1x → Sonnet 12x → Opus 60x │ └─────────────────────────────────────────────────────────────┘ ```


Built for Claude-only setups with Haiku, Sonnet, and Opus. Inspired by save-money skill, extended with three-tier progression.

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…