What problem does it solve? Developers building applications with the Anthropic Claude API need correct, up-to-date patterns for the Messages API, streaming, tool use, vision, extended thinking, prompt caching, and batch processing across both Python and TypeScript SDKs. ## Core Features & Use Cases - Messages API & Streaming: Provides working code for basic messages, system prompts, and real-time streaming in both Python (anthropic) and TypeScript (@anthropic-ai/sdk). - Advanced Capabilities: Covers tool use loops, vision with base64 images, extended thinking budgets, prompt caching for cost reduction, and the Batches API for 50% savings on bulk workloads. - Cost & Reliability Guidance: Includes a model selection table (Opus, Sonnet, Haiku), cost optimization strategies, and error handling for rate limits and connection failures. - Use Case: When adding an LLM-based expense categorization feature to a mobile backend, use this Skill to implement a tool-use loop with prompt caching and Haiku for high-volume classification. ## Quick Start Ask the AI to write a Python script that calls the Claude Messages API with streaming and tool use for your application.