Anthropic Outlines Cost-Optimization Strategies and Commands for Claude Platform
Key point
Anthropic's Lance Martin details strategies and `claude-api` skill commands (`prompt-audit`, `cost-optimize`, `hillclimb`) in Claude Code to help developers reduce costs and improve performance by optimizing caching, removing anti-patterns, and tuning effort levels.
Details
Anthropic has provided guidance and updated the claude-api skill within Claude Code to help developers optimize cost and performance on the Claude Platform. The article, authored by Lance Martin, outlines three primary commands: prompt-audit, cost-optimize, and hillclimb.
The prompt-audit command scans workspaces for anti-patterns such as mandatory scratchpads or stale few-shot examples that degrade performance on newer models. In a customer support benchmark migrating from Opus 4.8 to Opus 5.5, the model switch alone reduced costs by ~18%, and removing anti-patterns via prompt-audit yielded an additional 9% cost reduction and a ~2 percentage point accuracy gain.
The cost-optimize command analyzes usage patterns and applies levers like prompt caching, output bounding, and batching. Benchmarks showed significant savings: LegalBench saw ~84% fewer thinking tokens and ~67% lower cost; tau2-bench retail saw ~73% lower cost with no change in pass rate; OfficeQA Pro saw ~72% lower cost with no significant score change; and SWE-bench Verified saw ~24% lower cost.
The hillclimb command performs an iterative search over model and effort choices, splitting evaluations into train and test sets to find optimal configurations. In a customer support benchmark, it reduced costs to one-fifth of the original setup while improving accuracy on held-out tickets.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.