Official agent skill

Agents Optimize

by aws in aws/agent-toolkit-for-aws

A skill your agent uses when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.

OfficialApache-2.0Auto-check: notesDevOps & Cloud

Install Agents Optimize

skills CLI
$ npx skills add aws/agent-toolkit-for-aws --skill agents-optimize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aws/agent-toolkit-for-aws agents-optimize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aws/agent-toolkit-for-aws.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/aws-agents/skills/agents-optimize .claude/skills/agents-optimize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agents-optimize
GitHub stars
2.8k
Token cost
~914 tokens
SKILL.md length
362 words
Files
4 (incl. references)
Skills in repo
138
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.

  • Works in 4 steps: Verify CLI version → Read project context → Determine the workflow → …
  • Improving agent quality and performance — set up evaluators
  • SKILL.md covers When to use, Input, Process and Output, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agents Optimize is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. 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"…

Its SKILL.md is about 910 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/cost.md`, `references/evals.md` and `references/observability.md`).

It sits in DevOps & Cloud, covering Quality gates, LLM evaluation and Observability. The repository describes itself as: Official, AWS-supported MCP servers, skills, and plugins to help AI agents build on AWS. The licence is Apache-2.0.

When your agent uses it

  • Improving agent quality and performance — set up evaluators
  • Online monitoring
  • CI/CD quality gates
  • Cost optimization

Example prompts

  • “evaluate my agent”
  • “add evaluator”
  • “measure quality”
  • “/agents-optimize”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Bash

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Verify CLI version
  2. Read project context
  3. Determine the workflow
  4. Follow the loaded reference

What it can do on your machine

Read from SKILL.md and the folder at commit bd49cc8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agents Optimize loads about 914 tokens when it runs, and up to ~9.5k if it reads all its reference files. Until then it costs about 176 tokens; SKILL.md has 362 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~176
When it runs · the whole SKILL.md, loaded when a task matches
~914
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Grep, Glob, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aws/agent-toolkit-for-aws at commit bd49cc8, republished under its Apache-2.0 licence (© aws). 362 words, ~914 tokens.

Download SKILL.mdSave it as .claude/skills/agents-optimize/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
agents-optimize
description
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.
allowed-tools
Read, Grep, Glob, Bash
metadata.type
skill
metadata.version
1.0.0
metadata.author
aws-agentcore
metadata.requires-cli
>=0.9.0

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 intentAction
Measure quality, add evaluator, run eval, CI/CD gate, online monitoringLoad references/evals.md and follow its workflow
Set up observability, CloudWatch, X-Ray, logs, metrics, dashboardsLoad references/observability.md and follow its workflow
Understand or reduce AgentCore costsLoad references/cost.md
Both — "I want to understand and improve my agent"Start with observability setup, then add evals
Show full SKILL.md (125 more words)Show less
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

© aws, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in plugins/aws-agents/skills/agents-optimize of aws/agent-toolkit-for-aws.

  • SKILL.md
  • references/cost.md
  • references/evals.md
  • references/observability.md

Open the folder on GitHubat commit bd49cc8

Compare with similar skills

Agents Optimize next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agents Optimize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agents Optimize this skillaws/agent-toolkit-for-aws2.8k—~914Automated safety check: NotesApache-2.0
CI CD And Automationdzhalaevd/Donatello1357 repos~2.7kAutomated safety check: NotesApache-2.0
Plugin Testapache/skywalking-python219—~2.3kAutomated safety check: PassApache-2.0
Bmad Testarch CIbmad-code-org/bmad-method-test-architecture-enterprise1043 repos~961Automated safety check: PassCustom licence
CI Debuggingcitypaul/.dotfiles739—~1.5kAutomated safety check: NotesCustom licence
Bmad Tea Testarch CIchenjackle45/SayIt114—~226Automated safety check: PassMIT

Similar skills

  • CI CD And Automation

    dzhalaevd/Donatello

    Automates CI/CD pipeline setup. An agent skill from dzhalaevd/Donatello.

    135 GitHub starsUsed in 7 repos~2.7k tokens
    DevOps & CloudAuto-check: notes
  • Plugin Test

    apache/skywalking-python

    Build Docker test images and run SkyWalking Python plugin/unit/e2e tests locally, mirroring the CI pipeline

    219 GitHub stars~2.3k tokensUpdated 15 days ago
    DevOps & CloudAuto-check passed
  • Bmad Testarch CI

    bmad-code-org/bmad-method-test-architecture-enterprise

    Scaffold CI/CD quality pipeline with test execution. An agent skill from bmad-code-org/bmad-method-test-architecture-enterprise.

    104 GitHub starsUsed in 3 repos~961 tokens
    DevOps & CloudAuto-check passed
  • CI Debugging

    citypaul/.dotfiles

    Systematic CI/CD failure diagnosis using hypothesis-first investigation, local reproduction, and environment delta analysis.

    739 GitHub stars~1.5k tokensUpdated 5 days ago
    DevOps & CloudAuto-check: notes
  • Bmad Tea Testarch CI

    chenjackle45/SayIt

    Scaffold CI/CD quality pipeline with test execution. An agent skill from chenjackle45/SayIt.

    114 GitHub stars~226 tokensUpdated 7 days ago
    DevOps & CloudAuto-check passed
  • QA Methodology

    magnus919/agent-skills

    Design and apply QA methodology for software teams: test strategy, regression testing, CI failure triage, test automation, quality gates and metrics, risk-based testing, exploratory testing, test…

    111 GitHub stars~3.2k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from aws/agent-toolkit-for-aws

All 138 skills in this repo
  • Agent Advisor

    aws/agent-toolkit-for-aws

    Official

    Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one phased flow.

    2.8k GitHub stars~4.9k tokensUpdated today
    Auto-check passed
  • Agents Build

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses to extend an existing agent project with memory, app integration, VPC, multi-agent, migration, model, browser, code interpreter, payments, or resource removal.

    2.8k GitHub stars~2.3k tokensUpdated today
    Auto-check: notes
  • Launch With AWS

    aws/agent-toolkit-for-aws

    Official

    Migrates vibe-coded web applications to AWS. An agent skill from aws/agent-toolkit-for-aws.

    2.8k GitHub stars~3.2k tokensUpdated today
    Auto-check passed
  • Official

    Deploy an event-driven workflow that routes S3 uploads to either Lambda or Fargate via Step Functions based on file size.

    2.8k GitHub stars~4k tokensUpdated today
    Auto-check passed
  • AWS Marketplace Metering

    aws/agent-toolkit-for-aws

    Official

    Deploys, queries, and debugs AWS Marketplace usage-based (PAYG) metering — the pipeline (ResolveCustomer, BatchMeterUsage, EventBridge via SAM) and querying/debugging metering records, statuses…

    2.8k GitHub stars~18k tokensUpdated today
    Auto-check passed
  • Agents Pay

    aws/agent-toolkit-for-aws

    Official

    A skill your agent uses when THIS agent needs to pay for x402-protected content at runtime: hitting a paywall mid-task, settling it via AgentCore Payments, and applying operator-defined spend limits.

    2.8k GitHub stars~6.5k tokensUpdated today
    Auto-check: notes

Questions about Agents Optimize

What does Agents Optimize do?

A skill your agent uses when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization. Agents Optimize is an agent skill from aws/agent-toolkit-for-aws, published by the product's own GitHub organization. Use when measuring or improving agent quality and performance — set up evaluators, online monitoring, CI/CD quality gates, observability, or cost optimization.

When should I use Agents Optimize?

Agents Optimize fits situations like: improving agent quality and performance — set up evaluators; online monitoring; CI/CD quality gates; cost optimization.

How do I install Agents Optimize in Claude Code?

Run `npx skills add aws/agent-toolkit-for-aws --skill agents-optimize -a claude-code`. Or copy the skill folder (plugins/aws-agents/skills/agents-optimize in aws/agent-toolkit-for-aws) into .claude/skills/agents-optimize in your project. Claude Code loads it when a task matches its description.

How do I install Agents Optimize in Codex?

Run `npx skills add aws/agent-toolkit-for-aws --skill agents-optimize -a codex`. Or copy the skill folder (plugins/aws-agents/skills/agents-optimize in aws/agent-toolkit-for-aws) into .agents/skills/agents-optimize in your project. Codex loads it when a task matches its description.

Can I use Agents Optimize in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aws/agent-toolkit-for-aws --skill agents-optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agents-optimize, .gemini/skills/agents-optimize, .github/skills/agents-optimize and .opencode/skills/agents-optimize in your project.

What does Agents Optimize need to run?

SKILL.md names no scripts, command-line tools or credentials: Agents Optimize is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash.

Does Agents Optimize access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agents Optimize safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Agents Optimize use?

Agents Optimize is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agents Optimize use?

About 914 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.6k tokens, read only when the agent opens those files.

What are the alternatives to Agents Optimize?

Skills that share tags, products or a category with Agents Optimize: CI CD And Automation (dzhalaevd/Donatello, 135 stars), Plugin Test (apache/skywalking-python, 219 stars), Bmad Testarch CI (bmad-code-org/bmad-method-test-architecture-enterprise, 104 stars) and CI Debugging (citypaul/.dotfiles, 739 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agents Optimize?

aws (a GitHub organization, an official publisher) maintains it in aws/agent-toolkit-for-aws, which has 2,816 GitHub stars. The repository holds 138 skills in this directory. The repository was last updated on October 7, 2026.

Source: aws/agent-toolkit-for-aws on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.