claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

🔧agents-build

プラグイン
aws-agents

説明

既存のAgentプロジェクトに機能を追加する場合に使用: メモリ、アプリ統合、VPC、マルチエージェント、移行、モデル変更、ブラウザ、コードインタープリター、またはリソースの削除など。 次のような場合に使用: 「add memory」「remember across sessions」「call agent from app」「invoke agent from code」「auth to call agent」「streaming responses」「VPC」「VPC connectivity」「VPC error」「can't reach from VPC」「multi-agent」「A2A」「A2A auth」「orchestrator not delegating」「specialist not called」「migrate Bedrock Agent」「after import」「migration issue」「framework for migration」「change model」「browser tool」「code interpreter」「delete agent」「tear down」「agentcore remove」「cross-account memory」「resource-based policy on memory」 --- **対象外のケース(他のスキルを使用):** - Gatewayを経由して外部APIに接続する場合 → **agents-connect** を使用 - 新規プロジェクトのスキャフォールディングを行う場合 → **agents-get-started** を使用 - CLIまたは開発サーバーのエラーに関する場合 → **agents-debug** を使用 なお、移行コンテキストにおける Strands vs LangGraph の選択についても、本スキルにルーティングされます。

原文を表示

Use when adding capabilities to an existing agent project — memory, app integration, VPC, multi-agent, migration, model changes, browser, code interpreter, or resource removal. Triggers on: "add memory", "remember across sessions", "call agent from app", "invoke agent from code", "auth to call agent", "streaming responses", "VPC", "VPC connectivity", "VPC error", "can't reach from VPC", "multi-agent", "A2A", "A2A auth", "orchestrator not delegating", "specialist not called", "migrate Bedrock Agent", "after import", "migration issue", "framework for migration", "change model", "browser tool", "code interpreter", "delete agent", "tear down", "agentcore remove", "cross-account memory", "resource-based policy on memory". Not for connecting to external APIs via Gateway — use agents-connect. Not for scaffolding a new project — use agents-get-started. Not for CLI/dev server errors — use agents-debug. Strands vs LangGraph in a migration context routes here.

ユースケース

  • 既存Agentプロジェクトに機能を追加する
  • メモリやアプリ統合を設定する
  • VPC接続の問題を解決する
  • マルチエージェント構成を実装する
  • Agentリソースを削除または更新する

本文(日本語訳)

build

AgentCore agentプロジェクトに機能を追加します。

次のような場合に使用

  • agentにセッションをまたいだメモリを追加する
  • デプロイ済みのagentをWebアプリ、モバイルアプリ、またはバックエンドサービスから呼び出す
  • プライベートリソース(RDS、内部API)向けにVPCネットワーキングを設定する
  • オーケストレーター/スペシャリストパターンによるマルチagentシステムを構築する
  • 既存のBedrock AgentをAgentCoreへ移行する
  • agentがWebサイトをナビゲートできるようBrowser toolを追加する
  • agentがサンドボックス内でコードを実行できるようCode Interpreterを追加する
  • プロジェクトからリソースを削除する、またはデプロイを解体する

使用しない場合:

  • Gatewayを経由した外部ツール/APIへの接続(OpenAPIスペック、Lambda、MCPサーバー、クレデンシャル、ポリシー)→ agents-connect を使用
  • 新規プロジェクトのスキャフォールディング → agents-get-started を使用
  • デプロイ → agents-deploy を使用

入力

$ARGUMENTS に指定できる内容:

  • 機能名: "memory", "integrate", "vpc", "multi-agent", "migrate", "browser", "code-interpreter", "teardown"
  • やりたいことの説明: "ユーザー設定を記憶する", "Reactアプリから呼び出す", "Webサイトをスクレイピングする", "agent内でpandasを実行する", "agentを削除する", "リソースをクリーンアップする"
  • 空(その場合、skillはコンテキストからワークフローを判断します)

処理手順

Step 0: CLIバージョンを確認する

agentcore --version を実行します。このskillにはv0.9.0以降が必要です。

古いバージョンの場合: 「agentcore update を実行して最新バージョンを取得してください。」


Step 1: プロジェクトのコンテキストを読み込む

agentcore/agentcore.json を読み込み、現在のプロジェクト(フレームワーク、既存リソース、agent設定)を把握します。

agentcore/agentcore.json が見つからない場合:

  1. 開発者が誤ったディレクトリにいないか確認します。 親ディレクトリ(最大3階層上まで)で agentcore/agentcore.json を探します。見つかった場合は次のように伝えます: 「<パス> にAgentCoreプロジェクトが見つかりました。そのプロジェクトで作業していますか?」
  2. 近くにプロジェクトが存在しない場合、追加したかった機能を確認したうえで、2つの選択肢を提示します:
    • 「先にプロジェクトを作成してから CAPABILITY を追加する手順をご案内できます — そのまま進めますか?」(get-startedフローをインラインで実行してから、buildワークフローに続きます)
    • 「すでに別の場所にプロジェクトがある場合は、そのディレクトリに cd して再度お試しください。」

agents-get-started を使ってください」とだけ伝えて終わらないでください — 開発者がやりたかったことのコンテキストが失われます。


Step 2: ワークフローを決定する

重要な振り分け — buildのリファレンスにルーティングする前に、プロンプトが実際にはconnectまたはdebugに関する内容でないか確認してください:

  • 外部API、Lambda関数、OpenAPIスペック、ゲートウェイ、クレデンシャル、MCPサーバー、ポリシーに関する言及がある → agents-connect(buildではありません)
  • 開発者が「おかしな回答が返ってくる」「エラーが出る」「ツールが動かない」など、何かが壊れていると言っている → agents-debug(buildではありません)
  • buildは、動作中のプロジェクトに新しい機能を追加するためのものであり、壊れているものを修正するためのものではありません

開発者のプロンプトと $ARGUMENTS に基づいて、対応するリファレンスを読み込みます:

開発者の意図 読み込むリファレンス
メモリの追加、記憶、ユーザー設定、セッション間の記憶 references/memory.md
アプリからagentを呼び出す、コードからの呼び出し、ストリーミング、SDK クライアント、agent URL、セッション内でシェルを実行 references/integrate.md
VPC、プライベートネットワーク、RDS、内部API、サブネット、セキュリティグループ references/vpc.md
マルチagent、オーケストレーター、スペシャリスト、A2A、委譲、agentハンドオフ references/multi-agent.md
呼び出し元からagentへのカスタムヘッダー、ヘッダー許可リスト、テナントID/相関ID/トレース伝搬 references/request-headers.md
Bedrock Agentの移行、agentのインポート、AgentCoreへの移行 references/migrate.md
Browser tool、Webナビゲーション、フォーム入力、スクレイピング、Nova Act、Playwright、ライブビュー references/browser.md
Code Interpreter、コード実行、サンドボックス、Python/JS/TSの実行、agent内でのデータ分析、pandas references/code-interpreter.md
agentの削除、リソースの削除、解体、クリーンアップ、破棄、最初からやり直し references/teardown.md
モデルの変更、モデルの切り替え、Haiku/Sonnet/Novaの使用、別モデルへの変更 インライン — 下記「モデルの変更」を参照

開発者がローカル開発とデプロイ済み環境の違いについて質問している場合(例:「デプロイ後はメモリが動くのにローカルでは動かないのはなぜ?」)、該当するワークフローのリファレンスと合わせて references/local-vs-deployed.md も読み込んでください。

対応するファイルをコンテキストに読み込み、そのProcessセクションの手順を一つずつ実行してください — 要約しないでください。

意図が曖昧な場合は、追加したい機能を開発者に確認してください。


モデルの変更

モデルは app/<AgentName>/model/load.pyagentcore create によってスキャフォールドされます)で設定します。変更手順:

  1. app/<AgentName>/model/load.py を開く
  2. BedrockModel() コンストラクターの model_id パラメーターを変更する
# デフォルト(CLIによってスキャフォールドされます)
return BedrockModel(model_id="global.anthropic.claude-sonnet-4-5-20250929-v1:0")

# コスト削減のためHaikuに切り替え
return BedrockModel(model_id="us.anthropic.claude-3-5-haiku-20241022-v1:0")

# Nova Liteに切り替え
return BedrockModel(model_id="amazon.nova-lite-v1:0")

クロスリージョン推論プロファイルのプレフィックス(us.eu.apac.global.)は、推論が実行されるリージョンを制御します。最大スループットには global. を使用し、データレジデンシーが必要な場合は地理的プレフィックスを使用してください。すべてのモデルがすべてのプレフィックスに対応しているわけではありません — Bedrock推論プロファイルのドキュメントをご確認ください。

モデル変更後:

  • 使用するリージョンでモデルが有効化されていることを確認する: AWSコンソール → Amazon Bedrock → モデルアクセス
  • クロスリージョンプロファイルを使用する場合は、すべての宛先リージョンで有効化する
  • agents-harden を使用している場合は、新しいモデルのARNにスコープを絞るようIAMポリシーを更新する
  • agentcore dev を実行してローカルでテストし、その後 agentcore deploy でデプロイ済みagentを更新する

agentcore.json の変更は不要です — モデルはプロジェクト設定ではなく、コードで設定されます。


事前チェック: CLIコマンド生成前に --name を検証する

読み込んだリファレンスに関わらず、最終的に agentcore add <resource> --name <something> コマンドを生成することがほとんどです。CLIは無効な名前に対して実行後に遅れてエラーを出します — プロンプトを進めた後、コマンド実行前ではなく、実行後にエラーが表示されます。事前に検証してください:

リソース 最大文字数 使用可能文字 先頭文字
Agent(add agent 48文字 英数字 + _ 英字
Memory、gateway、gateway-target、credential、evaluator、online-eval、policy、policy-engine 48文字 英数字 + _ 英字

コマンドを構築する前に文字数を確認してください。名前が文字数制限を超えている場合、またはハイフン・ドット・スペースが含まれている場合は、事前に指摘してください: 「<名前> はN文字あります / - が含まれているため、CLIに拒否されます。<提案> はいかがでしょうか?」CLIのエラーメッセージが分かりやすいだろうと期待して、無効な名前のままコマンドを実行しないでください。

注意: agentcore create --name(プロジェクト名)にはより厳しい23文字制限があり、アンダースコアも使用できません。これは agents-get-started でカバーされていますが、開発者がcreateを再実行しようとしている場合は、23文字制限を明示的に伝えてください。


出力

ワークフローによって異なります — 具体的な出力内容は読み込んだリファレンスを参照してください。

品質基準

  • 開発者の意図に基づいて正しいリファレンスが読み込まれていること
  • すべての出力が読み込んだリファレンスの品質基準に従っていること
  • 関連する箇所で他のskill(agents-connectagents-deploy)へのクロスリファレンスが含まれていること
原文(English)を表示

build

Add capabilities to your AgentCore agent project.

When to use

  • Adding cross-session memory to your agent
  • Calling your deployed agent from a web app, mobile app, or backend service
  • Configuring VPC networking for private resources (RDS, internal APIs)
  • Building multi-agent systems with orchestrator/specialist patterns
  • Migrating an existing Bedrock Agent to AgentCore
  • Adding the Browser tool so the agent can navigate websites
  • Adding the Code Interpreter so the agent can execute code in a sandbox
  • Removing resources from your project or tearing down a deployment

Do NOT use for:

  • Connecting to external tools/APIs via Gateway (OpenAPI specs, Lambda, MCP servers, credentials, policies) → use agents-connect
  • Scaffolding a new project → use agents-get-started
  • Deploying → use agents-deploy

Input

$ARGUMENTS can be:

  • A capability: "memory", "integrate", "vpc", "multi-agent", "migrate", "browser", "code-interpreter", "teardown"
  • A description of what they want: "remember user preferences", "call from React app", "scrape a website", "run pandas in the agent", "delete my agent", "clean up resources"
  • Empty — the skill will determine the workflow from context

Process

Step 0: Verify CLI version

Run agentcore --version. This skill requires v0.9.0 or later.

If older: "Run agentcore update to get the latest version."

Step 1: Read project context

Read agentcore/agentcore.json to understand the current project — framework, existing resources, agent configuration.

If agentcore/agentcore.json is not found:

  1. Check if the developer is in the wrong directory. Look for agentcore/agentcore.json in parent directories (up to 3 levels). If found, tell them: "Found an AgentCore project at <path>. Are you working in that project?"
  2. If no project exists anywhere nearby, ask what capability they wanted to add. Then offer two paths:
    • "I can walk you through creating a project first and then adding CAPABILITY — want to do that?" (run the get-started flow inline, then continue with the build workflow)
    • "If you already have a project elsewhere, cd into it and try again."

Do not just say "go use agents-get-started" and stop — that loses the developer's context about what they actually wanted to do.

Step 2: Determine the workflow

Important disambiguation — before routing to a build reference, check if the prompt is actually a connect or debug concern:

  • If the phrase mentions external APIs, Lambda functions, OpenAPI specs, gateways, credentials, MCP servers, or policies → this is agents-connect, not build
  • If the developer says something is broken (wrong answers, errors, tool failures) → this is agents-debug, not build
  • Build is for adding new capabilities to a working project, not fixing broken ones

Based on the developer's prompt and $ARGUMENTS, load the appropriate reference:

Developer intent Reference to load
Add memory, remember things, user preferences, cross-session references/memory.md
Call agent from app, invoke from code, streaming, SDK client, agent URL, execute shell in session references/integrate.md
VPC, private network, RDS, internal API, subnet, security group references/vpc.md
Multi-agent, orchestrator, specialist, A2A, delegation, agent handoff references/multi-agent.md
Custom headers from caller to agent, header allowlist, tenant ID/correlation ID/trace propagation references/request-headers.md
Migrate Bedrock Agent, import agent, move to AgentCore references/migrate.md
Browser tool, web navigation, form filling, scraping, Nova Act, Playwright, live view references/browser.md
Code Interpreter, execute code, sandbox, run Python/JS/TS, data analysis in agent, pandas references/code-interpreter.md
Delete agent, remove resource, tear down, clean up, destroy, start fresh references/teardown.md
Change model, switch model, use Haiku/Sonnet/Nova, different model Inline — see "Changing the model" below

If the developer asks about the difference between local dev and deployed (e.g., "why does my memory work after deploy but not locally?"), load references/local-vs-deployed.md alongside the specific workflow reference.

Read the matching file into context and follow its Process section step by step — do not summarize.

If the intent is ambiguous, ask the developer which capability they want to add.

Changing the model

The model is configured in app/<AgentName>/model/load.py (scaffolded by agentcore create). To change it:

  1. Open app/<AgentName>/model/load.py
  2. Change the model_id parameter in the BedrockModel() constructor
# Default (scaffolded by CLI)
return BedrockModel(model_id="global.anthropic.claude-sonnet-4-5-20250929-v1:0")

# Switch to Haiku for cost savings
return BedrockModel(model_id="us.anthropic.claude-3-5-haiku-20241022-v1:0")

# Switch to Nova Lite
return BedrockModel(model_id="amazon.nova-lite-v1:0")

Cross-region inference profile prefixes (us., eu., apac., global.) control where inference runs. Use global. for maximum throughput, or a geographic prefix for data residency. Not all models support all prefixes — check the Bedrock inference profiles docs.

After changing the model:

  • Verify the model is enabled in your region: AWS Console → Amazon Bedrock → Model access
  • For cross-region profiles, enable in all destination regions
  • If using agents-harden, update the IAM policy to scope to the new model ARN
  • Run agentcore dev to test locally, then agentcore deploy to update the deployed agent

No agentcore.json change is needed — the model is configured in code, not in the project config.

Pre-flight: validate any --name before generating the CLI command

Whichever reference you load, most end up producing an agentcore add <resource> --name <something> command. The CLI fails late on invalid names — you'll see the error after walking through prompts, not before running the command. Validate up front:

Resource Max chars Allowed Starts with
Agent (add agent) 48 alphanumeric + _ letter
Memory, gateway, gateway-target, credential, evaluator, online-eval, policy, policy-engine 48 alphanumeric + _ letter

Count the characters before constructing the command. If the name is over the limit or contains hyphens, dots, or spaces, push back: "<name> is N characters / uses -, which the CLI rejects. How about <suggestion>?" Never run the command with an invalid name hoping the CLI message will be clear.

Note: agentcore create --name (the project name) has a stricter 23-char limit and does not allow underscores. That's covered in agents-get-started; if you see the developer re-running create, flag the 23-char limit specifically.

Output

Depends on the workflow — see the loaded reference for specific outputs.

Quality criteria

  • The correct reference was loaded based on the developer's intent
  • All output follows the loaded reference's quality criteria
  • Cross-references to other skills (agents-connect, agents-deploy) are included where relevant

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。