claude-skills/

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

last sync 22h ago
スキルOfficialdevelopment

📊agents-optimize

プラグイン
aws-agents

説明

次のような場合に使用: エージェントの品質やパフォーマンスの測定・改善を行う場合 — 評価器(evaluator)のセットアップ、オンラインモニタリング、CI/CD品質ゲート、オブザーバビリティ(observability)、 またはコスト最適化を実施する際に使用します。 以下のキーワードやフレーズで起動します: 「evaluate my agent(エージェントを評価する)」、「add evaluator(評価器を追加する)」、 「measure quality(品質を測定する)」、「quality gate(品質ゲート)」、「run evals(評価を実行する)」、 「agent too slow(エージェントが遅すぎる)」、「why is it slow(なぜ遅いのか)」、 「reduce latency(レイテンシを削減する)」、「set up observability(オブザーバビリティを設定する)」、 「CloudWatch dashboard(CloudWatchダッシュボード)」、「how much does my agent cost(エージェントのコストはいくらか)」、 「cost optimization(コスト最適化)」、「logs not showing up(ログが表示されない)」、 「logs missing(ログが見つからない)」、「spans not found(スパンが見つからない)」、 「eval failing(評価が失敗している)」、「eval error(評価エラー)」、 「dev traces(開発トレース)」、「local traces(ローカルトレース)」、 「agentcore dev traces(AgentCoreの開発トレース)」、「traces to CloudWatch(CloudWatchへのトレース送信)」。 **注意:** エラーやクラッシュのデバッグには使用しません — その場合は `agents-debug` を使用してください。 「動作は正しいが遅い」という問題はこちらで対応します。「壊れている・動作しない」という問題は `agents-debug` に転送してください。

原文を表示

Use when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization. Triggers on: "evaluate my agent", "add evaluator", "measure quality", "quality gate", "run evals", "agent too slow", "why is it slow", "reduce latency", "set up observability", "CloudWatch dashboard", "how much does my agent cost", "cost optimization", "logs not showing up", "logs missing", "spans not found", "eval failing", "eval error", "dev traces", "local traces", "agentcore dev traces", "traces to CloudWatch". Not for debugging errors or crashes — use agents-debug. Slow but correct routes here; broken routes to debug.

ユースケース

  • エージェントの品質やパフォーマンスを測定する
  • 評価器をセットアップする
  • オンラインモニタリングを実施する
  • CI/CD品質ゲートを運用する
  • コスト最適化を検討する

本文(日本語訳)

optimize

評価・モニタリング・オブザーバビリティを通じて、AgentCore agentの品質を測定・改善します。

次のような場合に使用

  • Agentが適切な回答を返しているか確認したい
  • 本番環境で継続的な品質モニタリングを設定したい
  • CI/CDパイプラインに品質ゲートを追加したい
  • ログ・メトリクス・トレースを通じてAgentの動作を把握したい
  • CloudWatchダッシュボードやX-Rayトレーシングを設定したい

使用しない場合:

  • 特定の不具合のあるAgentのデバッグ(誤った回答、エラー)→ agents-debug を使用
  • 本番環境のセキュリティ強化(IAM、認証)→ agents-harden を使用

入力

$ARGUMENTS に指定できるもの:

  • 評価に関する目標: 「品質ゲートを追加する」「モニタリングを設定する」
  • オブザーバビリティに関する目標: 「CloudWatchダッシュボードを設定する」「トレースを理解する」
  • 特定のEvaluator: 「llm-as-a-judge」「code-based」
  • 空白 — プロジェクトのコンテキストに基づいてSkillがガイドします

プロセス

Step 0: CLIバージョンの確認

agentcore --version を実行してください。このSkillにはv0.9.0以降が必要です。

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

agentcore/agentcore.json を読み込み、既存のEvaluator・オンライン評価設定・Agentのセットアップ内容を確認します。

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

「このSkillにはAgentCoreプロジェクトが必要です。agents-get-started を使用してプロジェクトを作成してください。」

Step 2: ワークフローの決定

開発者の意図 アクション
品質の測定、Evaluatorの追加、評価の実行、CI/CDゲート、オンラインモニタリング references/evals.md を読み込み、そのワークフローに従う
オブザーバビリティ・CloudWatch・X-Ray・ログ・メトリクス・ダッシュボードの設定 references/observability.md を読み込み、そのワークフローに従う
AgentCoreのコストの把握またはコスト削減 references/cost.md を読み込む
両方 — 「Agentを理解して改善したい」 オブザーバビリティの設定から始め、その後Evalを追加する

Step 3: 読み込んだリファレンスに従う

リファレンスファイルに完全な手順が記載されています。ステップに沿って進めてください。

クロスリファレンス

  • Evalのセットアップ完了後、本番環境への対応準備として agents-harden を提案する
  • Evalの結果からAgentの問題が判明した場合、根本原因の分析として agents-debug を提案する
  • 開発者が先に機能を追加する必要がある場合は、agents-build を提案する

出力

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

品質基準

  • EvaluatorのConfiguration には有効なCLIフラグのみを使用していること
  • オンライン評価のサンプリングレートが適切であること(事前の検討なしに本番環境で100%に設定しないこと)
  • CI/CDの品質ゲートに明確な合否判定の閾値が設定されていること
  • オブザーバビリティのセットアップにトレーシングとロギングの両方が含まれていること
  • 開発者がEvalデータの遅延を理解していること: put-to-getのエンドツーエンドで約10秒 — 1回のIngestionステップでトレースの読み取りとEvalクエリの両方をカバーするため、別途インデックス作成の待機は不要
原文(English)を表示

optimize

Measure and improve your AgentCore agent's quality through evaluation, monitoring, and observability.

When to use

  • You want to know if your agent is giving good answers
  • You want to set up continuous quality monitoring in production
  • You want to add a quality gate to your CI/CD pipeline
  • You want to understand agent behavior through logs, metrics, and traces
  • You want to set up CloudWatch dashboards or X-Ray tracing

Do NOT use for:

  • Debugging a specific broken agent (wrong answers, errors) → use agents-debug
  • Production security hardening (IAM, auth) → use agents-harden

Input

$ARGUMENTS can be:

  • An eval goal: "add a quality gate", "set up monitoring"
  • An observability goal: "set up CloudWatch dashboard", "understand my traces"
  • A specific evaluator: "llm-as-a-judge", "code-based"
  • Empty — the skill will guide based on project context

Process

Step 0: Verify CLI version

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

Step 1: Read project context

Read agentcore/agentcore.json to understand existing evaluators, online eval configs, and agent setup.

If agentcore/agentcore.json is not found:

"This skill requires an AgentCore project. Use agents-get-started to create one."

Step 2: Determine the workflow

Developer intent Action
Measure quality, add evaluator, run eval, CI/CD gate, online monitoring Load references/evals.md and follow its workflow
Set up observability, CloudWatch, X-Ray, logs, metrics, dashboards Load references/observability.md and follow its workflow
Understand or reduce AgentCore costs Load references/cost.md
Both — "I want to understand and improve my agent" Start with observability setup, then add evals

Step 3: Follow the loaded reference

The reference file contains the full procedure. Follow it step by step.

Cross-references

  • After setting up evals, suggest agents-harden for production readiness
  • If eval results reveal agent issues, suggest agents-debug for root cause analysis
  • If the developer needs to add capabilities first, suggest agents-build

Output

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

Quality criteria

  • Evaluator configuration uses only valid CLI flags
  • Online eval sampling rate is appropriate (not 100% in production without discussion)
  • CI/CD quality gate has a clear pass/fail threshold
  • Observability setup includes both tracing and logging
  • The developer understands the eval data delay: ~10 seconds put-to-get, end-to-end — one ingestion step covers both trace reads and eval queries; there is no separate indexing wait

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