Loading...
    • Build
    • Admin
    • Models & pricing
    • Client SDKs
    • API Reference
    Search...
    ⌘K
    First steps
    Intro to ClaudeQuickstart
    Building with Claude
    Features overviewUsing the Messages APIHandling stop reasons
    Model capabilities
    Extended thinkingAdaptive thinkingEffortFast mode (beta: research preview)Structured outputsCitationsStreaming MessagesBatch processingSearch resultsStreaming refusalsMultilingual supportEmbeddings
    Tools
    OverviewHow tool use worksWeb search toolWeb fetch toolCode execution toolAdvisor toolMemory toolBash toolComputer use toolText editor tool
    Tool infrastructure
    Tool referenceTool searchProgrammatic tool callingFine-grained tool streaming
    Context management
    Context windowsCompactionContext editingPrompt cachingToken counting
    Working with files
    Files APIPDF supportImages and vision
    Skills
    OverviewQuickstartBest practicesSkills for enterpriseSkills in the API
    MCP
    Remote MCP serversMCP connector
    Prompt engineering
    OverviewPrompting best practicesConsole prompting tools
    Test and evaluate
    Define success and build evaluationsUsing the Evaluation Tool in ConsoleReducing latency
    Strengthen guardrails
    Reduce hallucinationsIncrease output consistencyMitigate jailbreaksReduce prompt leak
    Resources
    Glossary
    Release notes
    Claude Platform
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    Documentation

    Claude API skill

    An open-source Agent Skill that provides Claude with up-to-date API reference material, SDK documentation, and best practices for building applications with the Claude API.

    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. 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.

    What the skill provides

    When triggered, the skill equips Claude with:

    • Language-specific SDK documentation: Installation, quick start, common patterns, and error handling for your project's language
    • Tool use guidance: Language-specific examples and conceptual foundations for function calling
    • Streaming patterns: Implementation details for building chat UIs and handling incremental display
    • Batch processing: Offline batch processing at 50% cost
    • Current model information: Model IDs, context window sizes, and pricing
    • Common pitfalls: Detailed guidance on avoiding frequent mistakes when integrating with the API

    When the skill activates

    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)

    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).

    Supported languages

    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.

    LanguageSDK documentationTool runner
    PythonYesYes (beta)
    TypeScriptYesYes (beta)
    JavaYesNo
    GoYesNo
    RubyYesYes (beta)
    C#YesNo
    PHPYesNo
    cURLYesN/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.

    How to use the skill

    In Claude Code (bundled)

    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-api

    For more about how bundled skills work in Claude Code, see the Claude Code skills documentation.

    From the skills repository

    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-api

    Or install it as a Claude Code plugin:

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

    Example usage

    Here are examples of tasks the skill helps Claude handle:

    Building a chat application:

    Build a streaming chat UI with the Claude API in TypeScript

    In each case, the skill loads the relevant language-specific documentation and guides Claude through the implementation using current API patterns and best practices.

    Next steps

    Agent Skills overview

    Learn about how Agent Skills work and the progressive disclosure model

    Client SDKs

    Browse the official Anthropic SDKs for all supported languages

    Skills repository

    Explore the public Anthropic skills repository on GitHub

    Was this page helpful?

    • What the skill provides
    • When the skill activates
    • Supported languages
    • How to use the skill
    • In Claude Code (bundled)
    • From the skills repository
    • Example usage
    • Next steps