Skip to content
Download Longwave

The Claude API skill

The Claude API skill is Anthropic's reference for writing code against the Claude API and the Anthropic SDKs. It ships model IDs, pricing and SDK usage for seven languages plus cURL, and tells the agent to read those files before writing any Claude code.

When the agent reaches for it

The agent keeps every installed skill's description in view and loads the full instructions when a request matches. This is the description it reads:

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST…

Why a skill for an API

Model IDs, beta headers and SDK method names change faster than a model's training data. An agent writing Claude code from memory reaches for a retired model or a method that moved. This skill replaces memory with files: one folder per language, plus shared references and a list of live sources to fetch when a binding is not covered.

It is also strict about scope. If the project already uses another provider, the skill stops and asks before writing Anthropic calls into it. It never mixes the SDK with raw HTTP in the same project, and it never falls back to an OpenAI-compatible shim.

What the instructions cover

The sections of its SKILL.md, in order.

  • Before You Start
  • Output Requirement
  • Defaults
  • ⚠️ API Drift — Your Training Prior May Be Stale
  • Subcommands
  • Language Detection
  • Which Surface Should I Use?
  • Architecture
  • Current Models (cached: 2026-06-24)
  • Authentication (Quick Reference)
  • Thinking & Effort (Quick Reference)
  • Compaction (Quick Reference)
  • Prompt Caching (Quick Reference)
  • Fast Mode (Quick Reference)
  • Task Budgets (Quick Reference)
  • Provider Clients (Quick Reference)
  • Context Editing (Quick Reference)
  • Mid-Conversation System Messages (Quick Reference)
  • Managed Agents (Beta)
  • Server Tools (Quick Reference)
  • Document & File Input (Quick Reference)
  • Tool Use Patterns (Quick Reference)
  • Other API Surfaces (Quick Reference)
  • Workload Identity Federation (Quick Reference)
  • Reading Guide
  • When to Use WebFetch
  • Common Pitfalls

What ships with it

Besides SKILL.md, the folder carries these. The agent opens them only when a step in the instructions calls for one.

  • csharp/ 5 files · 26 KB
  • curl/ 2 files · 18 KB
  • go/ 5 files · 36 KB
  • java/ 5 files · 39 KB
  • php/ 6 files · 28 KB
  • python/ 7 files · 93 KB
  • ruby/ 4 files · 16 KB
  • shared/ 26 files · 557 KB
  • typescript/ 6 files · 54 KB

Install the Claude API skill

In Claude Code, run this in a session. It comes from the publisher's own instructions.

Claude Code
/plugin marketplace add anthropics/skills
/plugin install claude-api@anthropic-agent-skills

License: Apache-2.0.

Questions people ask

How do I install the Claude API skill?

In Claude Code, run /plugin marketplace add anthropics/skills, then /plugin install claude-api@anthropic-agent-skills.

When does the agent use the Claude API skill?

When a request matches its description. The agent keeps only the name and description of each installed skill in view, and reads the full instructions when a task fits. You can also ask for it by name.

Start with one machine.

Add the others when the work needs them, and the cloud when it has to keep going without you.