Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add aws/tools-for-devops-agent --skill cloudtrail-cost-optimizationgit clone --depth 1 https://github.com/aws/tools-for-devops-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/aws/tools-for-devops-agent/cloudtrail-cost-optimization)<a href="https://agentmods.dev/skills/aws/tools-for-devops-agent/cloudtrail-cost-optimization"><img src="https://agentmods.dev/badge/skills/aws/tools-for-devops-agent/cloudtrail-cost-optimization/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/aws/tools-for-devops-agent/cloudtrail-cost-optimization"><img src="https://agentmods.dev/badge/skills/aws/tools-for-devops-agent/cloudtrail-cost-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00162 | $0.02509 |
| Opus 5.5 | $0.00065 | $0.01004 |
| Sonnet 5.5 | $0.00032 | $0.00502 |
| Haiku 4.5 | $0.00016 | $0.00251 |
Grade A, and why
cloudtrail-cost-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AWS CloudTrail Cost Optimization
Identify, quantify, and prioritize AWS CloudTrail cost optimization opportunities aligned with Managing CloudTrail trail costs and CloudTrail pricing.
This skill uses read-only CloudTrail, CloudWatch, S3, and Organizations APIs only. It never creates, updates, or deletes a trail, event data store, or event selector — all remediation is delivered as recommendations for a human to review and apply. It does not read the content of any logged event.
When to Use
Activate this skill when the user asks to:
- Reduce or optimize AWS CloudTrail costs
- Investigate an unexpected CloudTrail cost or usage spike
- Find duplicate or redundant trails across accounts/regions
- Review event selectors, data event logging, or CloudTrail Lake spend
- Perform a CloudTrail cost review or FinOps assessment
How CloudTrail Billing Works
The pricing model is the foundation of every finding below. The essentials:
- Management events: the first copy per Region is free; every additional copy is billed. Duplicate management-event trails are the most common overspend.
- Data events: every copy is billed, including the first — there is no free copy. The lever is narrowing scope, not de-duplication.
- CloudTrail Lake: billed per GB ingested and per GB-month stored, depending on the event data store's pricing option and retention.
- S3 log storage: standard S3 storage on the destination bucket.
For the full charge-by-charge table and the detailed billing consequences the checks rely on, load references/billing-model.md when you need to decide whether a specific trail copy is free or paid, or to explain a charge.
Workflow
Work through these steps in order — each depends on the output of the one before it.
- Step 1: Identify target scope. Ask the user which accounts and Regions to review, and whether the account is a standalone account, an Organizations management/delegated-administrator account, or a member account. Accept specific account IDs and Regions, "all regions" for a given account, or "organization" to reason about org-wide trail duplication. If no scope is given, default to the current account across all Regions, and set the CloudWatch/usage analysis window to the last 30 days unless the user specifies a different range.
What ships with it
37 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- .skilleval.yaml 255 B
- assets/report-template.md 2.7 KB
- CHANGELOG.md 4.4 KB
- evals/best-practices/v1/benchmark.json 6.5 KB
- evals/best-practices/v1/iteration-1/best-practices-tests-results.json 10.0 KB
- evals/eval_queries.json 764 B
- evals/evals.json 5.6 KB
- evals/files/cloudtrail-context.json 1.2 KB
- evals/functional/v1/benchmark.json 70 KB
- evals/functional/v1/evals.json 5.6 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-artifact-naming/with_skill/functional-tests-results.json 1.5 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-artifact-naming/with_skill/outputs/journal_records.json 2.4 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-artifact-naming/without_skill/functional-tests-results.json 1.5 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-artifact-naming/without_skill/outputs/journal_records.json 2.4 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-billing-model/with_skill/functional-tests-results.json 2.7 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-billing-model/with_skill/outputs/journal_records.json 17 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-billing-model/without_skill/functional-tests-results.json 2.5 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-billing-model/without_skill/outputs/journal_records.json 10 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-dedup-exclusion-interaction/with_skill/functional-tests-results.json 4.7 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-dedup-exclusion-interaction/with_skill/outputs/journal_records.json 7.5 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-dedup-exclusion-interaction/without_skill/functional-tests-results.json 4.8 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-dedup-exclusion-interaction/without_skill/outputs/journal_records.json 7.1 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-duplicate-reasoning/with_skill/functional-tests-results.json 3.8 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-duplicate-reasoning/with_skill/outputs/journal_records.json 5.0 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-duplicate-reasoning/without_skill/functional-tests-results.json 3.7 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-duplicate-reasoning/without_skill/outputs/journal_records.json 4.8 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-negative-trigger/with_skill/functional-tests-results.json 448 B
- evals/functional/v1/iteration-1/cloudtrail-cost-negative-trigger/with_skill/outputs/journal_records.json 7.2 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-severity-definitions/with_skill/functional-tests-results.json 2.5 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-severity-definitions/with_skill/outputs/journal_records.json 16 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-severity-definitions/without_skill/functional-tests-results.json 2.9 KB
- evals/functional/v1/iteration-1/cloudtrail-cost-severity-definitions/without_skill/outputs/journal_records.json 3.5 KB
- evals/structure/structure-tests-results-v1.json 3.4 KB
- README.md 5.4 KB
- references/api-inventory.md 1.7 KB
- references/billing-model.md 1.8 KB
- references/opportunities.md 6.5 KB
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago Changed 3df49c92a040
- 1mo ago Changed 2c588e9d809d
- 1mo ago Changed 9b0b0deb0789
- 1mo ago First seen · 181 lines · 162 tokens per session scan A 693c85e07e0e
cloudtrail-cost-optimization is a skill published in the GitHub repository aws/tools-for-devops-agent (153 stars, last pushed yesterday), licensed Apache-2.0. It adds 162 tokens to every session and 2,509 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-08.
cloudtrail-cost-optimization compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cloudtrail-cost-optimizationaws/tools-for-devops-agent | Skill | 153 | yesterday | Apache-2.0 | A | 162 | Claude Code, Codex |
| Cloud Billing AnalystCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 64 | Claude Code, Codex |
| Commitment Discount StrategistCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 55 | Claude Code, Codex |
| Budget & Anomaly OperatorCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 50 | Claude Code, Codex |
| AWS Cost Explorer AnalystCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 43 | Claude Code, Codex |
| Cost Anomaly DetectorCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 37 | Claude Code, Codex |
| Azure Cost Management NavigatorCletrics/finops-agents | Skill | 49 | 7mo ago | MIT | A | 40 | Claude Code, Codex |