gcp-cost-anomaly-scan

gcp-cost-anomaly-scan is a skill for Claude Code, Codex from shivamsriva31093/gcp-ironclad. It costs 57 tokens per session (1,288 once invoked), scanned A, original, MIT.

A read-only scan for unusual spending in Google Cloud Platform (GCP), Google's cloud service. It checks visible billing accounts and projects for past spending spikes that may indicate abused API keys or stolen credentials.

In plain words
What is it for?
Reviewing recent GCP costs, finding abnormal project spending, producing an anomalies.json file for later checks, and informing a review of Google's forward-looking anomaly alerts.
Why use it?
Unexpected cloud charges can be missed when reviewing bills manually. The scan checks spending history across services and billing accounts for possible abuse.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Reviewing recent GCP costs, finding abnormal project spending, producing an anomalies.json file for later checks, and informing a review of Google's forward-looking anomaly alerts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan
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 shivamsriva31093/gcp-ironclad --skill gcp-cost-anomaly-scan
Clone the repo
git clone --depth 1 https://github.com/shivamsriva31093/gcp-ironclad

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 gcp-cost-anomaly-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan/github.svg)](https://agentmods.dev/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan)
Your own site
<a href="https://agentmods.dev/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan"><img src="https://agentmods.dev/badge/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan/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 gcp-cost-anomaly-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan"><img src="https://agentmods.dev/badge/skills/shivamsriva31093/gcp-ironclad/gcp-cost-anomaly-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,288 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.
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.00057 $0.01288
Opus 5 $0.00028 $0.00644
Sonnet 5 $0.00011 $0.00258
Haiku 4.5 $0.00006 $0.00129

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

Security

Grade A, and why

gcp-cost-anomaly-scan 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 13d 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/gcp-cost-anomaly-scan/SKILL.md · 108 lines

How it starts

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

GCP Cost Anomaly Scan (READ-ONLY)

Overview

For every billing account the caller can see, determines whether any project has experienced an abnormal spend spike in the last LOOKBACK_DAYS days (default 60). Uses the gcp-finops MCP server when available; otherwise falls back to direct bq query against billing-export tables.

Related native feature (July 2026): Google's Early Anomalies (Preview) now does forward-looking, pre-invoice anomaly alerting with root-cause SKU attribution — but only for Gemini API, Agent Platform, Cloud Run, and Cloud Run functions, per project, in the console's Anomalies section. This skill remains the historical sweep across all services and billing accounts, and produces the anomalies.json later phases consume. When reporting, mention enabling Early Anomalies review as a complementary forward-looking control.

When to Use

  • Triggered by the gcp-ironclad driver as Phase 1b.
  • Or invoked standalone when you suspect past abuse you may have missed.

Inputs

  • SESSION_DIR env var.
  • LOOKBACK_DAYS env var (default 60).
  • THRESHOLD_PCT env var (default 200 — daily spend must be ≥200% over the 7-day rolling average to flag).
  • ACTIVE_HOURS env var (default 24 — used to mark anomalies as still-active).

Outputs

Writes ${SESSION_DIR}/anomalies.json matching output.schema.json.

Execution

Step A: Establish session dir + list billing accounts

SESSION_DIR="${SESSION_DIR:-/tmp/gcp-ironclad/standalone-$(date -u +%Y-%m-%dT%H-%M-%SZ)}"
mkdir -p "${SESSION_DIR}/raw"
gcloud billing accounts list --format=json > "${SESSION_DIR}/raw/billing-accounts.json"

Step B: For each billing account, determine export availability

For each account B:

  1. First, try the gcp-finops MCP server (call its discover_billing_tables tool). If it returns a table for B, mark hasExport: true.
  2. If MCP is unavailable, fall back to:
    bq ls --format=prettyjson "${QUOTA_PROJECT}:billing_export" 2>/dev/null \
      | jq -r '.[].tableReference.tableId' \
      | grep -E "gcp_billing_export_(resource_)?v1_${B//-/_}"
    
    where ${QUOTA_PROJECT} is the project that owns the billing-export dataset. If the user doesn't know it, default to gcloud config get-value project.
  3. If nothing is found, mark hasExport: false and emit an info-class error: "no_billing_export".

Read the full file on GitHub · 108 lines

Files

What ships with it

1 file 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. 13d ago First seen · 108 lines · 57 tokens per session scan A d2edf48875cb

Subscribe to this mod's changes

gcp-cost-anomaly-scan is a skill published in the GitHub repository shivamsriva31093/gcp-ironclad (24 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,288 once invoked, about $0.0003 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

finops-expert

Expert-level cloud financial operations, cost optimization, and cloud economics. Use when the user mentions cloud cost, optimization, cloud economics, or AWS cost, or when the task involves FinOps Fundamentals, Cost Management, FinOps Practices, or Cost Visibility.

personamanagmentlayer/pcl · 55 tokens

dashboards

Use when creating or extending Costory dashboards, generating interesting FinOps overviews (suggestgroupby + suggestusagemetrics + text widgets), adding or replacing widgets, copying widgets between dashboards, editing dashboardContext (global filter / period / groupBy) via updatedashboard, or applying shared-context…

costory-io/costory-finops-mcp-skills · 92 tokens

query

Use when exploring Costory cost, usage, metric, formula, budget, or external-metric data with the query tool — scope vs split (filterCel / groupBy), explorer PoP comparison, CEL discovery, unit economics, budgets. Not for one-shot "what changed last month" change trees — those use recipes explain-period-change /…

costory-io/costory-finops-mcp-skills · 93 tokens

cost-change-investigation

Use when investigating a cost change to explain what changed, when, and the best-supported drivers with contribution, timing, usage, metric, event, alert, and terminology evidence. Call getskill with skillId "cost-change-investigation" before starting the investigation.

costory-io/costory-finops-mcp-skills · 57 tokens

recipes

Use when a user states a FinOps outcome rather than a tool. Route to one recipe card, then hand off: bill jump → explain-period-change (DIGEST preview); marketplace → marketplace-spend; K8s namespace → namespace-cost; credits runway → provider-credits; GCP spend CUD leftover → gcp-spend-cud; BigQuery warehouse →…

costory-io/costory-finops-mcp-skills · 223 tokens

surf

Use this skill — NOT browser or webfetch — for ALL Surf crypto-data calls. 83 endpoints at localhost:8402/v1/surf/ covering CEX/DEX markets, on-chain SQL over 80+ ClickHouse tables (Ethereum, Base, Arbitrum, BSC, TRON, HyperEVM, Tempo), 100M+ labeled wallets, prediction markets (Polymarket + Kalshi), social/CT…

BlockRunAI/ClawRouter · 148 tokens