What problem does it solve? LLM API costs grow quickly when every request uses the most expensive model, retries fire on permanent errors, and long system prompts are resent on every call. This Skill provides composable patterns to control spend while preserving output quality on complex tasks. ## Core Features & Use Cases - Model Routing by Complexity: Automatically select cheaper models (e.g., Haiku) for simple tasks and reserve expensive models (e.g., Sonnet) for large inputs or high item counts. - Immutable Budget Tracking: Track cumulative spend with frozen dataclasses and fail early when a budget limit is exceeded. - Narrow Retry Logic: Retry only transient errors (rate limits, connection failures, server errors) with exponential backoff, failing fast on authentication or bad request errors. - Prompt Caching: Cache long system prompts with ephemeral cache control to cut both cost and latency. - Use Case: When batch-processing hundreds of documents through the Claude API, route each item to the right model, enforce a dollar budget, and cache the shared system prompt to keep total spend predictable. ## Quick Start Ask the AI to build a cost-aware LLM pipeline that routes requests between Haiku and Sonnet based on input size, tracks spending against a one-dollar budget, retries only transient errors, and caches the system prompt.