agent-cost-strategy

Tiered model selection and cost optimization strategy for multi-agent AI workflows. Use when orchestrating sub-agents, choosing which model to use for a task, trying to reduce API spend, or structuring prompts for cache efficiency. Works with any provider (Anthropic, OpenAI, Google, etc.). Triggers on phrases like "save costs", "which model should I use", "reduce API spend", "optimize model usage", "spin up a sub-agent", or when deciding how to delegate tasks.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "agent-cost-strategy" with this command: npx skills add djc00p/agent-cost-strategy

Agent Cost Strategy

A tiered model selection framework for multi-agent workflows. Use the cheapest model that can reliably do the job.

The Tiers

TierUse ForExamples
Fast/CheapSub-agents, background workers, iterative fixes, well-defined single-step tasksClaude Haiku, GPT-4o-mini, Gemini Flash
Mid-tierMain dialogue, day-to-day assistance, moderate complexity tasksClaude Sonnet, GPT-4o, Gemini Pro
PowerfulArchitecture decisions, deep code reviews, hard problems, when cheaper models fail twiceClaude Opus, GPT-4.5, Gemini Ultra

Decision Rules

Use Fast/Cheap when:

  • Task is well-scoped and single-step
  • Input/output is straightforward (fix this test, summarize this, run this command)
  • It's a background/automated task with no user interaction
  • You're running many parallel sub-agents

Use Mid-tier when:

  • Conversational context matters
  • Task requires moderate reasoning or multi-step thinking
  • This is the default for your main assistant session

Use Powerful when:

  • Cheaper models have failed 2+ times on the same problem
  • Making high-stakes architectural decisions
  • Deep code review or security audit
  • The cost of a wrong answer exceeds the cost of the model

Sub-Agent Pattern

When delegating to a sub-agent, default to the cheapest model that fits the task:

Task type               → Model tier
─────────────────────────────────────
Fix failing tests       → Fast/Cheap
Write boilerplate       → Fast/Cheap
Research/search         → Fast/Cheap
Cron/scheduled tasks    → Fast/Cheap (always)
Short replies (hi/ok)   → Fast/Cheap (always)
Build new feature       → Mid-tier
Review PR               → Mid-tier
Architecture            → Powerful
Stuck after 2 tries     → Escalate up one tier

Heartbeat Interval

Set heartbeat to 55 minutes (not 30) when using Anthropic API keys. This keeps the prompt cache warm just under the 1-hour TTL — every heartbeat pays cheap cache-read rates instead of re-writing the full cache.

"heartbeat": { "every": "55m" }

Communication Pattern Rule

Short conversational messages (hi, thanks, ok, sure, got it, yes, no) should always use Fast/Cheap models. Never burn Sonnet or Powerful on one-word acknowledgments.

Cache Optimization

Prompt caching can cut costs by 80-90% on repeated context. See references/cache-optimization.md for patterns.

Tracking

Monitor spend by checking your provider's usage dashboard regularly. Signs you're over-spending:

  • Running Powerful models on tasks Fast/Cheap can handle
  • No caching on repeated system prompts
  • Spawning sub-agents without a model tier strategy
  • Heartbeat set to 30min (re-writes cache every time)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Automation

Fast.io

Workspaces for agentic teams. Complete agent guide with all 19 consolidated tools using action-based routing — parameters, workflows, ID formats, and constra...

Registry SourceRecently Updated
3.6K1dbalve
Automation

Tozil

Track every AI dollar your agent spends. Per-model cost breakdown, daily budgets, and alerts.

Registry SourceRecently Updated
Automation

ComfyUI Controller Pro

支持批量生成10-100个修仙视频和图片,集成LTX2多版本模型与自动化浏览器及工作流管理功能。

Registry SourceRecently Updated
Automation

Baidu Yijian Vision

百度一见专业级视觉 AI Agent:支持图片/视频/及实时视频流分析。相比通用基模,在维持 95%+ 专业精度的同时,推理成本降低 50% 以上,是处理视觉巡检与监控分析任务的首选工具。主打 安全管理、SOP合规、工业质检、商业运营与物料盘点。覆盖:作业 SOP 合规与关键步骤完整性校验;工业质检与表面缺陷精密...

Registry SourceRecently Updated