Loading...
    • Developer Guide
    • API Reference
    • MCP
    • Resources
    • Release Notes
    Search...
    ⌘K
    First steps
    Intro to ClaudeQuickstart
    Models & pricing
    Models overviewChoosing a modelWhat's new in Claude 4.6Migration guideModel deprecationsPricing
    Build with Claude
    Features overviewUsing the Messages APIHandling stop reasonsPrompting best practices
    Model capabilities
    Extended thinkingAdaptive thinkingEffortFast mode (beta: research preview)Structured outputsCitationsStreaming MessagesBatch processingPDF supportSearch resultsMultilingual supportEmbeddingsVision
    Tools
    OverviewHow tool use worksTutorial: Build a tool-using agentDefine toolsHandle tool callsParallel tool useTool Runner (SDK)Strict tool useTool use with prompt cachingServer toolsTroubleshootingTool referenceWeb search toolWeb fetch toolCode execution toolMemory toolBash toolComputer use toolText editor tool
    Tool infrastructure
    Manage tool contextTool combinationsTool searchProgrammatic tool callingFine-grained tool streaming
    Context management
    Context windowsCompactionContext editingPrompt cachingToken counting
    Files & assets
    Files API
    Agent Skills
    OverviewQuickstartBest practicesSkills for enterpriseClaude API skillUsing Skills with the API
    Agent SDK
    OverviewQuickstartHow the agent loop works
    MCP in the API
    MCP connectorRemote MCP servers
    Claude on 3rd-party platforms
    Amazon BedrockMicrosoft FoundryVertex AI
    Prompt engineering
    OverviewConsole prompting tools
    Test & evaluate
    Define success and build evaluationsUsing the Evaluation ToolReducing latency
    Strengthen guardrails
    Reduce hallucinationsIncrease output consistencyMitigate jailbreaksStreaming refusalsReduce prompt leak
    Administration and monitoring
    Admin API overviewData residencyWorkspacesUsage and Cost APIClaude Code Analytics APIAPI and data retention
    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
    • Catalog
    • 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
    • Catalog
    • 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
    Agent Skills

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

    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
    • Agent SDK reference: Installation, built-in tools, permissions, MCP integration, and common patterns (Python and TypeScript)
    • 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)
    • 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).

    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 runnerAgent SDK
    PythonYesYes (beta)Yes
    TypeScriptYesYes (beta)Yes
    JavaYesNoNo
    GoYesNoNo
    RubyYesYes (beta)No
    C#YesNoNo
    PHPYesNoNo
    cURLYesN/AN/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

    Working with the Agent SDK:

    Create an agent with file and terminal tools using the Agent SDK

    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

    Agent SDK

    Build AI agents with built-in tools, permissions, and MCP support

    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