Loading...
    • ビルド
    • 管理
    • モデルと料金
    • クライアントSDK
    • APIリファレンス
    Search...
    ⌘K
    はじめに
    Claudeの概要クイックスタート
    Claudeで構築する
    機能概要Messages APIの使用停止理由の処理
    モデルの機能
    拡張思考適応的思考エフォート高速モード(ベータ:リサーチプレビュー)構造化出力引用ストリーミングメッセージバッチ処理検索結果ストリーミング拒否多言語サポート埋め込み
    ツール
    概要ツール使用の仕組みウェブ検索ツールウェブフェッチツールコード実行ツールメモリツールBashツールコンピューター使用ツールテキストエディタツール
    ツールインフラ
    ツール検索プログラムによるツール呼び出し細粒度ツールストリーミング
    コンテキスト管理
    コンテキストウィンドウコンパクションコンテキスト編集プロンプトキャッシュトークンカウント
    ファイルの操作
    Files APIPDFサポート画像とビジョン
    スキル
    概要クイックスタートベストプラクティスエンタープライズ向けスキルAPIのスキル
    MCP
    リモートMCPサーバーMCPコネクター
    プロンプトエンジニアリング
    概要プロンプトのベストプラクティスConsoleプロンプトツール
    テストと評価
    成功の定義と評価の構築ConsoleでのEvaluation Toolの使用レイテンシの削減
    ガードレールの強化
    幻覚の低減出力の一貫性向上ジェイルブレイクの軽減プロンプトリークの低減
    リソース
    用語集
    リリースノート
    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
    スキル

    APIでAgent Skillsを使い始める

    Claude APIを使用してAgent Skillsでドキュメントを作成する方法を10分以内に学びましょう。

    Was this page helpful?

    • Agent Skillsの概要
    • ステップ1:利用可能なSkillsの一覧表示
    • ステップ2:プレゼンテーションの作成
    • ステップ3:作成されたファイルのダウンロード
    • Wordドキュメントの作成
    • PDFの生成

    このチュートリアルでは、Agent Skillsを使用してPowerPointプレゼンテーションを作成する方法を説明します。Skillsを有効にする方法、シンプルなリクエストを行う方法、生成されたファイルにアクセスする方法を学びます。

    前提条件

    • Claude APIキー
    • Python 3.7以上またはcurlのインストール
    • APIリクエストの基本的な知識

    Agent Skillsの概要

    事前構築されたAgent Skillsは、ドキュメントの作成、データの分析、ファイルの処理などのタスクに特化した専門知識でClaudeの機能を拡張します。AnthropicはAPIで以下の事前構築されたAgent Skillsを提供しています:

    • PowerPoint (pptx): プレゼンテーションの作成と編集
    • Excel (xlsx): スプレッドシートの作成と分析
    • Word (docx): ドキュメントの作成と編集
    • PDF (pdf): PDFドキュメントの生成

    カスタムSkillsを作成したいですか? 独自のSkillsをドメイン固有の専門知識で構築する例については、Agent Skills Cookbookをご覧ください。

    ステップ1:利用可能なSkillsの一覧表示

    まず、利用可能なSkillsを確認します。Skills APIを使用して、Anthropicが管理するすべてのSkillsを一覧表示します:

    以下のSkillsが表示されます:pptx、xlsx、docx、pdf。

    このAPIは各Skillのメタデータ(名前と説明)を返します。Claudeは起動時にこのメタデータを読み込み、利用可能なSkillsを把握します。これがプログレッシブディスクロージャーの第1レベルであり、Claudeは完全な指示を読み込まずにSkillsを発見します。

    ステップ2:プレゼンテーションの作成

    次に、PowerPoint Skillを使用して再生可能エネルギーに関するプレゼンテーションを作成します。Messages APIのcontainerパラメータを使用してSkillsを指定します:

    各部分の役割を説明します:

    • container.skills: Claudeが使用できるSkillsを指定します
    • type: "anthropic": これがAnthropicが管理するSkillであることを示します
    • skill_id: "pptx": PowerPoint Skillの識別子
    • version: "latest": 最新の公開バージョンに設定されたSkillのバージョン
    • tools: コード実行を有効にします(Skillsに必要)
    • ベータヘッダー: code-execution-2025-08-25とskills-2025-10-02

    このリクエストを行うと、Claudeは自動的にタスクを関連するSkillに照合します。プレゼンテーションを要求したため、ClaudeはPowerPoint Skillが関連していると判断し、完全な指示を読み込みます:プログレッシブディスクロージャーの第2レベルです。その後、ClaudeはSkillのコードを実行してプレゼンテーションを作成します。

    ステップ3:作成されたファイルのダウンロード

    プレゼンテーションはコード実行コンテナ内で作成され、ファイルとして保存されました。レスポンスにはファイルIDを含むファイル参照が含まれています。ファイルIDを抽出し、Files APIを使用してダウンロードします:

    生成されたファイルの操作に関する詳細については、コード実行ツールのドキュメントをご覧ください。

    その他の例を試す

    Skillsを使用して最初のドキュメントを作成したので、以下のバリエーションを試してみましょう:

    スプレッドシートの作成

    Wordドキュメントの作成

    PDFの生成

    次のステップ

    事前構築されたAgent Skillsを使用したので、次のことができます:

    APIガイド

    Claude APIでSkillsを使用する

    カスタムSkillsの作成

    特定のタスク向けに独自のSkillsをアップロードする

    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"
    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-opus-4-6",
        "max_tokens": 4096,
        "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"
        }]
      }'
    # レスポンスからfile_idを抽出(jqを使用)
    FILE_ID=$(echo "$RESPONSE" | jq -r '.content[] | select(.type=="tool_use" and .name=="code_execution") | .content[] | select(.file_id) | .file_id')
    
    # ファイルをダウンロード
    curl "https://api.anthropic.com/v1/files/$FILE_ID/content" \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: files-api-2025-04-14" \
      --output renewable_energy.pptx
    
    echo "プレゼンテーションをrenewable_energy.pptxに保存しました"
    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-opus-4-6",
        "max_tokens": 4096,
        "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"
        }]
      }'
    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-opus-4-6",
        "max_tokens": 4096,
        "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"
        }]
      }'
    curl https://api.anthropic.com/v1/messages \
      -H "x-api-key: $ANTHROPIC_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \
      -H "content-type: application/json" \
      -d '{
        "model": "claude-opus-4-6",
        "max_tokens": 4096,
        "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"
        }]
      }'
    オーサリングガイド

    効果的なSkillsを書くためのベストプラクティスを学ぶ

    Claude CodeでSkillsを使用する

    Claude CodeでのSkillsについて学ぶ

    Agent Skills Cookbook

    Skillsの例と実装パターンを探索する