Agent skill · marketing growth · jeremylongshore

clade-cost-tuning

Optimize Anthropic API costs \u2014 model selection, prompt caching,\

Why this skill is useful

Adds specific executable scripts and cost optimization strategies for using the Anthropic API effectively, which are not commonly found in public documentation.

What it needs

Requires anthropic account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Anthropic Cost Tuning Overview Anthropic charges per token. Input tokens, output tokens, and cached tokens each have different prices. Here's how to minimize cost without losing quality. Pricing (per million tokens) Model Input Output Cached Input Batch Input Batch Output ------- ------- -------- ------------- ------------- -------------- Claude Opus 4 $15.00 $75.00 $1.50 $7.50 $37.50 Claude Sonnet 4 $3.00 $15.00 $0.30 $1.50 $7.50 Claude Haiku 4.5 $0.80 $4.00 $0.08 $0.40 $2.00 Cost Reduction Strategies Instructions Step 1: Right-Size Your Model Step 2: Prompt Caching (90% off input tokens) Step 3: Message Batches (50% off everything) Step 4: Reduce Token Count Step 5: Monitor Usage Cost Comparison Example Processing 10,000 documents (avg 500 tokens each, 200 token response): Strategy Input Cost Output Cost Total ---------- ----------- ------------- ------- Opus, no optimization $75.00 $150.00 $225.00 Sonnet, no optimization $15.00 $30.00 $45.00 Sonnet + Batches $7.50 $15.00 $22.50 Haiku + Batches $2.00 $4.00 $6.00 Haiku + Batches + Caching ~$1.00 $4.00 ~$5.00 Output Model selection optimized per task complexity (Haiku for simple, Sonnet for balanced, Opus for complex) Prompt caching enabled for repeated system prompts Batch processing configured for non-urgent workloads Token usage logged with cost estimates per request Spending alerts configured in Anthropic console Error Handling Error Cause Solution ------- ------- ---------- API Error Check error type and status code See clade-common-errors Examples See Pricing table, five numbered strategy sections with code, and the Cost Comparison Example table showing savings from $225 to $5 for 10K documents. Resources Pricing Prompt Caching Message Batches Token Counting Next Steps See clade-performance-tuning for latency optimization. Prerequisites Completed clade-install-auth Active API usage to optimize Access to Anthropic console for usage monitoring

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/clade-cost-tuning--f1e85c

View the source on GitHub

Browse the @skills marketplace