Claude API Reference Skill
OfficialThe official skill that makes Claude write Claude/Anthropic SDK code from documented facts — model IDs, params, streaming, tool use, and migrations.
Dev & CodingIntermediate★ 189,585⑂ 22,343AI score 9/10Last updated: Nov 6, 2026
What it does
- Whenever you build against the Claude API (
POST /v1/messages), it forbids guessing from memory and routes Claude to the bundled per-language docs (python/,typescript/,java/,go/,ruby/,csharp/,php/,curl/). - Detects your project language from
pyproject.toml,package.json,go.mod,composer.json, etc., then uses that SDK's exact namespaces and method signatures (or WebFetches the repos listed inshared/live-sources.md). - Ships a current model table (IDs, context windows, input/output pricing), sane defaults (streaming, adaptive thinking, eager input streaming rules), and an API drift table covering what changed in 2025–2026 (extended thinking params, web search/fetch tool types, Files & Skills leaving beta, PHP arg casing).
- Adds
/claude-api <subcommand>workflows:migrate,prompt-audit,upgrade,cost-optimize,build-eval,hillclimb,preserved-thinking-migration. - Gives a decision table for picking a surface — single call → workflow → custom agent → Managed Agents — and disambiguates Tool Runner vs. Claude Agent SDK.
Who it's for
- Developers wiring the Anthropic SDK into Python, TypeScript, Java, Go, Ruby, C#, or PHP projects
- Teams migrating code and prompts written for older Claude models
- LLM product owners tuning token cost, caching, batching, and streaming
- Anyone deciding between self-hosted agent loops and Managed Agents
Example uses
- "Add a Claude call to this Python script" → detects Python, uses the official
anthropicSDK with streaming defaults instead of rawrequests. /claude-api migrate→ confirms scope and target model, classifies each file, applies breaking changes in order, then audits prompt text for stale model-specific wording./claude-api cost-optimize→ builds a token profile from usage logs or code and ranks levers by savings, free wins (caching, input hygiene) before tradeoffs (model choice).- Pointed at a file using the OpenAI SDK → it stops, says this skill emits Anthropic code, and asks how you want to proceed.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/anthropics/skills/HEAD/skills/claude-api/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/claude-api folder from the GitHub repo anthropics/skills into my ~/.claude/skills/claude-api/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/anthropics/skills.git /tmp/anthropic-skills && mkdir -p ~/.claude/skills && cp -r /tmp/anthropic-skills/skills/claude-api ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open your terminal.
- Clone the skills repo:
git clone https://github.com/anthropics/skills.git - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r skills/skills/claude-api ~/.claude/skills/(double-check the path relative to where you cloned). - Verify that
~/.claude/skills/claude-api/SKILL.mdplus its subfolders (python/,typescript/,shared/, ...) came along — the skill depends on those reference files. - Restart Claude Code, then try a prompt like "add Claude summarization to this service" or run
/claude-api migrate. - Optional: export
ANTHROPIC_API_KEYso the generated code can be run and iterated on immediately.