Claude API
The Claude API skill helps you develop LLM-powered applications using Claude and the Anthropic SDK.
Supported Languages
Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL/raw HTTP.
Core Capabilities
- Add or modify Claude features — prompt caching, adaptive thinking, tool use, structured outputs, batches, file handling, citations, and memory patterns
- Migrate between model versions — moving code to Claude Opus 4.7, Opus 4.6, Sonnet 4.6, or Haiku 4.5
- Optimize caching hit rates — diagnosing why your cache isn't working as expected
- Build agents and workflows — both Claude API tool-use patterns and Managed Agents (server-managed, stateful)
What This Skill Won't Do
This skill skips requests involving non-Anthropic SDKs. If your file imports OpenAI, uses gpt-4, or explicitly needs provider-neutral code, it will ask whether you want to switch to Claude or need a non-Claude implementation instead.
Key Defaults
Unless specified otherwise:
| Setting | Default |
|---|---|
| Model | Claude Opus 4.7 (claude-opus-4-7) |
| Thinking | Adaptive (thinking: {type: "adaptive"}) |
| Streaming | Enabled for long inputs/outputs |
| Effort | High or xhigh on Opus 4.7 for complex tasks |
Starting Point
Provide:
- What language you're using (Python, TypeScript, Java, etc.)
- What you want to build (single API call, multi-step workflow, agent, etc.)
- Which Claude feature you need (caching, thinking, tools, etc.)
The skill reads the relevant language-specific and conceptual documentation, then provides code examples tailored to your needs.
Model Reference
| Model | ID |
|---|---|
| Opus 4.7 | claude-opus-4-7 |
| Opus 4.6 | claude-opus-4-6 |
| Sonnet 4.6 | claude-sonnet-4-6 |
| Haiku 4.5 | claude-haiku-4-5-20251001 |
Installation
npx skills add https://github.com/anthropics/skills --skill claude-api
Mirrored from https://github.com/anthropics/skills — original author: anthropics, license: Apache-2.0. This is an unclaimed mirror. Content and ownership transfer to the author when they claim this account.