Skills Explorer Add Skills

agents-optimize

An agent skill by aws, from aws/agent-toolkit-for-aws. Tags: analytics, cost-optimization, evaluation, observability, performance.

What it does

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.

Install

With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:

npx skills add aws/agent-toolkit-for-aws --skill agents-optimize

Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):

git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws
cp -r agent-toolkit-for-aws/plugins/aws-agents/skills/agents-optimize ~/.claude/skills/agents-optimize

Safety box score

Grade C, moderate risk: 30 of 100 risk points, rated 2026-09-22. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.

This skill is an AWS observability and evaluation helper for AgentCore: it runs CLI commands, reads project config, and can enable traces, logs, online evals, dashboards, and CI/CD quality gates. The main risks are account-level telemetry exposure to CloudWatch/X-Ray, production-impacting monitoring changes, and the fact that it can execute shell/AWS CLI commands as part of its workflow.

Category levels, from 0 (none) to 3 (high)
CategoryLevelWhy
Code & shell execution2 (moderate)The skill drives command execution with Bash/CLI snippets such as `agentcore run eval`, `agentcore add online-eval`, and `agentcore deploy -y`, but it does not download and run arbitrary code.
Network access2 (moderate)It reads and sends observability data to AWS services, including CloudWatch logs/traces and X-Ray (`aws xray update-trace-segment-destination --destination CloudWatchLogs`), so agent traffic and telemetry leave the machine.
Filesystem reach1 (low)It reads `agentcore/agentcore.json` and writes results under `agentcore/.cli/eval-runs/`, which is bounded to the project directory.
Secrets & credentials1 (low)The workflow requires local AWS credentials and uses session IDs from responses/logs, and the evaluated traces/logs may contain sensitive application content, but it does not directly read secret stores or keychains.
Privilege & persistence0 (none)No `sudo`, global installs, service registration, or shell/OS setting changes are requested; the changes are at the AgentCore/AWS account layer, not local privilege escalation.
Instruction hijack surface0 (none)There is no instruction to ignore safeguards, fetch and obey remote prompts, or hide behavior; the text is task guidance for eval/observability workflows.
Irreversible actions2 (moderate)It can create, deploy, pause, and resume online evals and generate CI/CD quality gates (`agentcore deploy -y`, `pause online-eval`, `resume online-eval`), which can affect live production monitoring and build outcomes.
Transparency0 (none)All shipped files are plain markdown; there are no binaries, minified blobs, or runtime-decoded payloads.

Before installing

Rated 2026-09-22 by an automated review of 4 files from the skill's repository.

Source

Repository
aws/agent-toolkit-for-aws (all skills from this repository)
Path
plugins/aws-agents/skills/agents-optimize/SKILL.md
Branch
main
Collection
aws-agents
Updated
2026-09-19