Anthropic open-sources /claude-api skill for optimizing Claude API usage in Claude Code
Anthropic open-sourced a /claude-api skill built into Claude Code for optimizing Claude API calls. It supports 8 languages and covers Messages API and Managed Agents. Three main subcommands include cost-optimize, which analyzes actual API usage and provides ranked cost-saving suggestions; prompt-audit, which scans prompts for outdated patterns like verification rituals, excessive emphasis, mandatory scaffolds, stale examples, and contradictory rules; and migrate, which helps migrate code to newer models by handling breaking changes. The skill is particularly useful with the Fable 5.1 release, where prompt caching prices dropped 75%. Six common prompt anti-patterns were identified that degrade performance on frontier models.