The claude-api skill is an open-source Agent Skill that provides Claude with detailed, up-to-date reference material for building applications with the Claude API and Agent SDK. It covers 8 programming languages: Python, TypeScript, Java, Go, Ruby, C#, PHP, and cURL.
The skill comes bundled with Claude Code and is also available in the open-source Anthropic skills repository, where you can install it in any environment that supports Agent Skills.
The skill uses progressive disclosure to keep context efficient: Claude loads only the documentation relevant to your project's language and the specific task at hand (tool use, streaming, batches, and so on), rather than loading everything at once.
When triggered, the skill equips Claude with:
The skill activates in two ways:
Automatic activation occurs when Claude detects that your code imports an Anthropic SDK:
anthropic (Python)@anthropic-ai/sdk (TypeScript/JavaScript)claude_agent_sdk (Agent SDK)Manual invocation by typing /claude-api in any environment where the skill is installed.
The skill does not activate for general programming tasks, ML/data-science work, or code that imports other AI SDKs (such as OpenAI).
The skill detects your project's language automatically by examining project files (for example, requirements.txt for Python, tsconfig.json for TypeScript, go.mod for Go) and loads the appropriate documentation.
| Language | SDK documentation | Tool runner | Agent SDK |
|---|---|---|---|
| Python | Yes | Yes (beta) | Yes |
| TypeScript | Yes | Yes (beta) | Yes |
| Java | Yes | No | No |
| Go | Yes | No | No |
| Ruby | Yes | Yes (beta) | No |
| C# | Yes | No | No |
| PHP | Yes | No | No |
| cURL | Yes | N/A | N/A |
If your project uses multiple languages, Claude asks which one applies. For unsupported languages (Rust, Swift, C++), the skill provides cURL/raw HTTP examples.
The skill ships with Claude Code and requires no installation. When you ask Claude to help build something with the Claude API, or when your project already imports an Anthropic SDK, the skill activates automatically.
You can also invoke it directly:
/claude-apiFor more about how bundled skills work in Claude Code, see the Claude Code skills documentation.
The skill source is available in the Anthropic skills repository. You can install it using the npx command:
npx skills add https://github.com/anthropics/skills --skill claude-apiOr install it as a Claude Code plugin:
/plugin marketplace add anthropics/skills
/plugin install claude-api@anthropic-agent-skillsHere are examples of tasks the skill helps Claude handle:
Building a chat application:
Build a streaming chat UI with the Claude API in TypeScriptWorking with the Agent SDK:
Create an agent with file and terminal tools using the Agent SDKIn each case, the skill loads the relevant language-specific documentation and guides Claude through the implementation using current API patterns and best practices.
Learn about how Agent Skills work and the progressive disclosure model
Browse the official Anthropic SDKs for all supported languages
Build AI agents with built-in tools, permissions, and MCP support
Explore the public Anthropic skills repository on GitHub
Was this page helpful?