investigation-cost-guardrail

investigation-cost-guardrail is a skill for Claude Code, Codex from aws/tools-for-devops-agent. It costs 105 tokens per session (4,575 once invoked), scanned A, original, Apache-2.0.

A cost check that runs before an AWS investigation uses operations that may incur charges. It estimates costs, applies investigation budgets, and checks results for signs of metered usage.

In plain words
What is it for?
Use it during investigations across AWS services to classify operations, estimate their likely cost, enforce a budget, and identify potentially expensive tool calls.
Why use it?
It helps prevent diagnostic work from creating unexpected AWS bills, especially when an operation reads large amounts of data or uses paid services.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents; positional $N argument.

Good fit Use it during investigations across AWS services to classify operations, estimate their likely cost, enforce a budget, and identify potentially expensive tool calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aws/tools-for-devops-agent/investigation-cost-guardrail
Install

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.

Any agent
npx skills add aws/tools-for-devops-agent --skill investigation-cost-guardrail
Clone the repo
git clone --depth 1 https://github.com/aws/tools-for-devops-agent

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for investigation-cost-guardrail

README.md
[![agentmods](https://agentmods.dev/badge/skills/aws/tools-for-devops-agent/investigation-cost-guardrail/github.svg)](https://agentmods.dev/skills/aws/tools-for-devops-agent/investigation-cost-guardrail)
Your own site
<a href="https://agentmods.dev/skills/aws/tools-for-devops-agent/investigation-cost-guardrail"><img src="https://agentmods.dev/badge/skills/aws/tools-for-devops-agent/investigation-cost-guardrail/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.

agentmods 80×15 button for investigation-cost-guardrail

Your own site · 80×15
<a href="https://agentmods.dev/skills/aws/tools-for-devops-agent/investigation-cost-guardrail"><img src="https://agentmods.dev/badge/skills/aws/tools-for-devops-agent/investigation-cost-guardrail.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 105 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00105 $0.04575
Opus 5 $0.00053 $0.02287
Sonnet 5 $0.00021 $0.00915
Haiku 4.5 $0.00011 $0.00458

Measured 5d ago against content hash 4e462111f01c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

investigation-cost-guardrail 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 5d 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.

skills/investigation-cost-guardrail/SKILL.md · 342 lines

How it starts

The opening of the file, as written. The whole thing — 342 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Investigation Cost Guardrail Skill

Overview

This skill provides cost guardrails for ANY AWS service and ALL native agent tools — not just a hardcoded list. It uses heuristic classification to determine whether an API operation is free or paid, estimates cost before execution, and enforces per-investigation budgets.

Design Principle

Rather than listing every free/paid operation across 200+ AWS services, this skill uses three layers:

  1. Heuristic rules — classify any operation based on naming patterns and behavior
  2. Known-paid registry — explicit overrides for high-cost operations with pricing formulas
  3. Response validation — detect metered usage from API response fields after execution

Activation

This skill MUST be ALWAYS ACTIVE during investigations. It does NOT require user invocation.

Fetch Live Rate Before Estimating

The first time an operation is classified PAID by Layer 2, fetch the live rate before estimating cost.

For AWS operations: read references/pricing-reference.md for the exact Pricing API call patterns, filter fields, filter values, and failure handling. The reference file specifies — for each service and operation — whether to use Field:"operation" or Field:"usagetype", and the exact value to use. Do not derive these from the operation name.

For non-AWS tools (Splunk, Datadog, Grafana, etc.): use the cost model from Layer 0 directly — no live lookup available.


Layer 0: Native Agent Tool Classification

Before Layer 1 heuristics, classify the agent's own tools. These are NOT use_aws calls but have distinct billing implications:

Tool Cost Matrix

Tool Classification Cost Model Guardrail
get_prometheus_metrics PAID Billed per sample scanned — rate from live CW:PromQL:SamplesScanned usagetype lookup (AmazonCloudWatch, workload-region prefix) Track samples scanned per call; HALT if rate lookup returns 0 products
use_aws VARIABLE Depends on operation — apply Layers 1–3 Full heuristic pipeline
use_azure FREE Azure Reader role, no per-call billing Track count only
grafana_query_prometheus CAUTION Depends on Grafana data source billing model Track count, warn at 50+
use_datadog CAUTION Datadog API rate limits (no per-call $ cost, but may throttle) Track count, warn at 100+
use_splunk PAID Splunk search license (per GB ingested/searched) Treat like CW Logs StartQuery
use_pagerduty FREE PagerDuty API (rate limited, not per-call billed) Track count only
shell CAUTION May invoke aws, az, kubectl — untracked by Layers 1–3 Log commands, warn if aws/az detected
subagent PAID Counts toward agent-seconds billing ($0.0083/sec) Track spawns, enforce total time
fs_read, fs_write, fs_tree FREE Local file I/O No guardrail needed
datetime FREE Internal state ops No guardrail needed
write_scratchpad, read_scratchpad FREE Internal state (may not be available in all environments) No guardrail needed
read_memories FREE Internal memory recall No guardrail needed

Read the full file on GitHub · 342 lines

Files

What ships with it

8 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.

Changes

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.

  1. 5d ago Changed · +22 lines 4e462111f01c
  2. 10d ago First seen · 320 lines · 105 tokens per session scan A 7c39fafd6fbd

Subscribe to this mod's changes

investigation-cost-guardrail is a skill published in the GitHub repository aws/tools-for-devops-agent (46 stars, last pushed 5d ago), licensed Apache-2.0. It adds 105 tokens to every session and 4,575 once invoked, about $0.0005 per session on Opus 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-08-30.

Related

Other skills, from other repositories

hyperpod-node-debugger

Diagnose and remediate per-node issues on a HyperPod cluster (EKS or Slurm) — a specific node is unhealthy, unresponsive, stuck, or needs replacing. Covers on-node EFA, GPU / accelerator hardware (XID, ECC, NVLink, row-remap, DCGM), Slurm node down/drained, disk and memory pressure, per-node lifecycle-script failures…

awslabs/agent-plugins · 139 tokens

aws-lambda-managed-instances

Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for Lambda, scheduled scaling for LMI, Lambda…

awslabs/agent-plugins · 130 tokens

hyperpod-performance-debugger

Diagnose performance issues on Amazon SageMaker HyperPod clusters — uneven NCCL bandwidth across nodes and poor filesystem throughput. Read-only. Surfaces host-side signals (Xid, ECC, NVLink, EFA reachability, FSx saturation) and routes to the appropriate sibling skill (hyperpod-node-debugger, hyperpod-nccl…

awslabs/agent-plugins · 133 tokens

amplify-workflow

Build and deploy full-stack web and mobile apps with AWS Amplify Gen2 (TypeScript code-first). Covers auth (Cognito), data (AppSync/DynamoDB including schema modeling, enum types, relationships, authorization rules), storage (S3), functions, APIs, and AI (Amplify AI Kit with Bedrock). Supports React, Next.js, Vue…

awslabs/agent-plugins · 214 tokens

aws-architecture-diagram

Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to visualize existing infrastructure from…

awslabs/agent-plugins · 110 tokens

hyperpod-cluster-debugger

Diagnose and remediate cluster-wide HyperPod (EKS or Slurm) problems — creation / deployment failures (CloudFormation, EFA health check, lifecycle scripts, capacity), EKS access, node replacement, CloudFormation nested-stack errors, post-maintenance rollback state, dangling nodes, autoscaler conflicts. Includes…

awslabs/agent-plugins · 80 tokens