anthropic-api-prolisted
Install: claude install-skill aicodedecode/awesome-muse-skills
## Overview
The Anthropic API exposes Claude models via the Messages API: a clean messages-in, message-out interface with best-in-class tool use, prompt caching (the cost story for long contexts), and extended thinking for hard reasoning. Claude's strengths — careful instruction-following, long-context handling, and reliable tool calling — shape how you should use it.
This skill covers the Messages API properly: message construction, tool use patterns, prompt caching for cost control, extended thinking, and production practices.
## When to use
- Calling the Claude Messages API.
- Implementing tool use (function calling).
- Reducing costs with prompt caching.
- Using extended thinking for complex reasoning.
- Streaming responses with tool use.
- Choosing between Claude models (Opus/Sonnet/Haiku).
- Migrating from OpenAI-style APIs.
## Core concepts
- **Messages API.** `POST /v1/messages`: `model`, `max_tokens` (required), `system`, `messages` (user/assistant turns). Stateless — you manage conversation history. Clean and explicit; no legacy baggage.
- **Model tiers.** Opus (frontier capability), Sonnet (the workhorse — intelligence per dollar), Haiku (fast/cheap for simple tasks). Sonnet is the default choice; Opus for the hardest problems; Haiku for high-volume simple work.
- **System prompts.** Separate `system` parameter (not a message) — supports caching and keeps instruction hierarchy clean. Long, detailed system prompts are where Claude shines; invest in them.
- **T