cost-anomaly-detection

Detects AWS cloud-spend anomalies against a per-service baseline and posts attributed alerts to Slack.

20.2k|3.4k|Updated Oct 5, 2024
One-click install
npx skills add https://github.com/kortix-ai/suna --skill cost-anomaly-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-anomaly-detection
Source: https://github.com/kortix-ai/suna/tree/main/packages/starter/templates/marketplace/runtime/skills/cost-anomaly-detection
Command: npx skills add https://github.com/kortix-ai/suna --skill cost-anomaly-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Cloud cost spikes often go unnoticed until the monthly invoice arrives. This Skill runs a daily, read-only sweep of AWS Cost Explorer data, maintains a per-service and per-account spend baseline, and alerts your team the day spend breaks out of its normal pattern — with a suspected driver attached.

Core Features & Use Cases

  • Baseline-Based Detection: Builds a trailing ~30-day baseline per service/account pair and flags spend exceeding a configurable percentage threshold, rather than using flat dollar limits.
  • Driver Attribution: Distinguishes new resources, traffic surges, region shifts, and price changes by comparing cost against usage quantities, so alerts are actionable.
  • Persistent Memory Ledger: Stores baselines, anomaly history, and confirmed seasonal patterns in .kortix/memory/cloud-cost-baseline.md, sharpening accuracy across daily runs.
  • Use Case: A daily cron re-prompts one persistent session; when EC2 spend in one account jumps 62% above baseline, the team gets a Slack message showing the delta and evidence that usage (requests) rose proportionally — a traffic surge, not a new resource.

Quick Start

Ask the agent to run the daily cost-anomaly sweep and report any AWS spend that broke its baseline yesterday.

Frequently Asked Questions about cost-anomaly-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect AWS cost anomalies automatically?

Query AWS Cost Explorer daily grouped by service and linked account, then compare each pair against its own trailing baseline. This Skill flags spend exceeding a configurable percentage threshold and posts the delta with a suspected driver to Slack.

How to find what caused an AWS cost spike?

Compare cost changes against usage quantities and resource-level detail. A new resource ID indicates new infrastructure, proportional usage growth indicates a traffic surge, cost rising without usage indicates a price change, and spend in a new region indicates a region shift.

Does this Skill modify AWS resources or budgets?

No. The Skill is strictly read-only and alert-only. It never launches, modifies, or deletes resources and never changes budgets or spending controls; the Slack alert is its only output and humans decide any response.

Why is no alert posted on the first run?

The first run is baseline-only: it builds history from up to 90 days of Cost Explorer data before flagging anything. A service/account pair needs enough history to establish a meaningful normal before it becomes eligible for anomaly detection.

How do I stop recurring planned spend from being flagged?

Ask the agent to note the known or planned pattern in the ledger's Known patterns list. Confirmed seasonal or planned spikes matching that note are suppressed and no longer trigger alerts.