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.5Migrating to Claude 4.5Model deprecationsPricing

    Build with Claude

    Features overviewUsing the Messages APIContext windowsPrompting best practices

    Capabilities

    Prompt cachingContext editingExtended thinkingStreaming MessagesBatch processingCitationsMultilingual supportToken countingEmbeddingsVisionPDF supportFiles APISearch resultsGoogle Sheets add-on

    Tools

    OverviewHow to implement tool useToken-efficient tool useFine-grained tool streamingBash toolCode execution toolComputer use toolText editor toolWeb fetch toolWeb search toolMemory tool

    Agent Skills

    OverviewQuickstartBest practicesUsing Skills with the API

    Agent SDK

    OverviewTypeScript SDKPython SDK

    Guides

    Streaming InputHandling PermissionsSession ManagementHosting the Agent SDKModifying system promptsMCP in the SDKCustom ToolsSubagents in the SDKSlash Commands in the SDKAgent Skills in the SDKTracking Costs and UsageTodo ListsPlugins in the SDK

    MCP in the API

    MCP connectorRemote MCP servers

    Claude on 3rd-party platforms

    Amazon BedrockVertex AI

    Prompt engineering

    OverviewPrompt generatorUse prompt templatesPrompt improverBe clear and directUse examples (multishot prompting)Let Claude think (CoT)Use XML tagsGive Claude a role (system prompts)Prefill Claude's responseChain complex promptsLong context tipsExtended thinking tips

    Test & evaluate

    Define success criteriaDevelop test casesUsing the Evaluation ToolReducing latency

    Strengthen guardrails

    Reduce hallucinationsIncrease output consistencyMitigate jailbreaksStreaming refusalsReduce prompt leakKeep Claude in character

    Administration and monitoring

    Admin API overviewUsage and Cost APIClaude Code Analytics API
    Console
    Agent Skills

    Get started with Agent Skills in the API

    Learn how to use Agent Skills to create documents with the Claude API in under 10 minutes.

    This tutorial shows you how to use Agent Skills to create a PowerPoint presentation. You'll learn how to enable Skills, make a simple request, and access the generated file.

    Prerequisites

    • Anthropic API key
    • Python 3.7+ or curl installed
    • Basic familiarity with making API requests

    What are Agent Skills?

    Pre-built Agent Skills extend Claude's capabilities with specialized expertise for tasks like creating documents, analyzing data, and processing files. Anthropic provides the following pre-built Agent Skills in the API:

    • PowerPoint (pptx): Create and edit presentations
    • Excel (xlsx): Create and analyze spreadsheets
    • Word (docx): Create and edit documents
    • PDF (pdf): Generate PDF documents

    Want to create custom Skills? See the Agent Skills Cookbook for examples of building your own Skills with domain-specific expertise.

    Step 1: List available Skills

    First, let's see what Skills are available. We'll use the Skills API to list all Anthropic-managed Skills:

    Python
    import anthropic
    
    client = anthropic.Anthropic()
    
    # List Anthropic-managed Skills
    skills = client.beta.skills.list(
        source="anthropic",
        betas=["skills-2025-10-02"]
    )
    
    for skill in skills.data:
        print(f"{skill.id}: {skill.display_title}")
    TypeScript
    import Anthropic from '@anthropic-ai/sdk';
    
    const client = new Anthropic();
    
    // List Anthropic-managed Skills
    const skills = await client.beta.skills.list({
      source: 'anthropic',
      betas: ['skills-2025-10-02']
    });
    
    for (const skill of skills.data) {
      console.log(`${skill.id}: ${skill.display_title}`);
    }
    Shell
    curl "https://api.anthropic.com/v1/skills?source=anthropic" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: skills-2025-10-02"

    You see the following Skills: pptx, xlsx, docx, and pdf.

    This API returns each Skill's metadata: its name and description. Claude loads this metadata at startup to know what Skills are available. This is the first level of progressive disclosure, where Claude discovers Skills without loading their full instructions yet.

    Step 2: Create a presentation

    Now we'll use the PowerPoint Skill to create a presentation about renewable energy. We specify Skills using the container parameter in the Messages API:

    import anthropic
    
    client = anthropic.Anthropic()
    
    # Create a message with the PowerPoint Skill
    response = client.beta.messages.create(
        model="claude-sonnet-4-5-20250929",
        max_tokens=4096,
        betas=["code-execution-2025-08-25", "skills-2025-10-02"],
        container={
            "skills": [
                {
                    "type": "anthropic",
                    "skill_id": "pptx",
                    "version": "latest"
                }
            ]
        },
        messages=[{
            "role": "user",
            "content": "Create a presentation about renewable energy with 5 slides"
        }],
        tools=[{
            "type": "code_execution_20250825",
            "name": "code_execution"
        }]
    )
    
    print(response.content)

    Let's break down what each part does:

    • container.skills: Specifies which Skills Claude can use
    • type: "anthropic": Indicates this is an Anthropic-managed Skill
    • skill_id: "pptx": The PowerPoint Skill identifier
    • version: "latest": The Skill version set to the most recently published
    • tools: Enables code execution (required for Skills)
    • Beta headers: code-execution-2025-08-25 and skills-2025-10-02

    When you make this request, Claude automatically matches your task to the relevant Skill. Since you asked for a presentation, Claude determines the PowerPoint Skill is relevant and loads its full instructions: the second level of progressive disclosure. Then Claude executes the Skill's code to create your presentation.

    Step 3: Download the created file

    The presentation was created in the code execution container and saved as a file. The response includes a file reference with a file ID. Extract the file ID and download it using the Files API:

    # Extract file ID from response
    file_id = None
    for block in response.content:
        if block.type == 'tool_use' and block.name == 'code_execution':
            # File ID is in the tool result
            for result_block in block.content:
                if hasattr(result_block, 'file_id'):
                    file_id = result_block.file_id
                    break
    
    if file_id:
        # Download the file
        file_content = client.beta.files.download(
            file_id=file_id,
            betas=["files-api-2025-04-14"]
        )
    
        # Save to disk
        with open("renewable_energy.pptx", "wb") as f:
            file_content.write_to_file(f.name)
    
        print(f"Presentation saved to renewable_energy.pptx")

    For complete details on working with generated files, see the code execution tool documentation.

    Try more examples

    Now that you've created your first document with Skills, try these variations:

    Create a spreadsheet

    response = client.beta.messages.create(
        model="claude-sonnet-4-5-20250929",
        max_tokens=4096,
        betas=["code-execution-2025-08-25", "skills-2025-10-02"],
        container={
            "skills": [
                {
                    "type": "anthropic",
                    "skill_id": "xlsx",
                    "version": "latest"
                }
            ]
        },
        messages=[{
            "role": "user",
            "content": "Create a quarterly sales tracking spreadsheet with sample data"
        }],
        tools=[{
            "type": "code_execution_20250825",
            "name": "code_execution"
        }]
    )

    Create a Word document

    response = client.beta.messages.create(
        model="claude-sonnet-4-5-20250929",
        max_tokens=4096,
        betas=["code-execution-2025-08-25", "skills-2025-10-02"],
        container={
            "skills": [
                {
                    "type": "anthropic",
                    "skill_id": "docx",
                    "version": "latest"
                }
            ]
        },
        messages=[{
            "role": "user",
            "content": "Write a 2-page report on the benefits of renewable energy"
        }],
        tools=[{
            "type": "code_execution_20250825",
            "name": "code_execution"
        }]
    )

    Generate a PDF

    response = client.beta.messages.create(
        model="claude-sonnet-4-5-20250929",
        max_tokens=4096,
        betas=["code-execution-2025-08-25", "skills-2025-10-02"],
        container={
            "skills": [
                {
                    "type": "anthropic",
                    "skill_id": "pdf",
                    "version": "latest"
                }
            ]
        },
        messages=[{
            "role": "user",
            "content": "Generate a PDF invoice template"
        }],
        tools=[{
            "type": "code_execution_20250825",
            "name": "code_execution"
        }]
    )

    Next steps

    Now that you've used pre-built Agent Skills, you can:

    API Guide

    Use Skills with the Claude API

    Create Custom Skills

    Upload your own Skills for specialized tasks

    Authoring Guide

    Learn best practices for writing effective Skills

    Use Skills in Claude Code

    Learn about Skills in Claude Code

    Use Skills in the Agent SDK

    Use Skills programmatically in TypeScript and Python

    Agent Skills Cookbook

    Explore example Skills and implementation patterns

    • Prerequisites
    • What are Agent Skills?
    • Step 1: List available Skills
    • Step 2: Create a presentation
    • Step 3: Download the created file
    • Try more examples
    • Create a spreadsheet
    • Create a Word document
    • Generate a PDF
    • Next steps
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

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

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • 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

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

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

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

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

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • 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

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC