---
name: cost-intelligence
description: "**[REQUIRED]** Use for ALL Snowflake cost and billing questions: spending, credits, costs, warehouse costs, compute costs, serverless credits, AI costs, storage costs, budgets, resource monitors, metering, consumption, billing, user spending, top spenders, who is spending, expensive queries, query costs, budget actions, budget notifications, budget alerts, spending limit, create budget, set budget, drop budget, delete budget, remove budget, where is my money going, cost breakdown, credits by service, overall spending, cost increase, why did costs go up, unusual spending, cost spikes, cost anomaly, anomaly notification, anomaly email, cost spike alert, cortex cost, cortex credits, cortex spend, cortex AI cost, cortex AI function cost, cortex AI function costs, cortex AI function credits, AI function cost, AI function costs, analyst cost, analyst credits, LLM cost, cortex search cost, cortex search credits, cortex agents cost, cortex agents credits, cortex code cost, cortex code CLI cost, cortex code Snowsight cost, snowflake intelligence cost, snowflake intelligence credits, fine-tuning cost, model training cost, provisioned throughput cost, PTU cost, team costs, department spending, cost center, chargeback, showback, SPCS cost, compute pool credits, container services cost, data transfer cost, cross-region cost, cross-cloud cost, egress cost, budget status, budget spend, over budget, at risk budget."
---

# Cost Intelligence Skill

> **Do NOT search for semantic views for cost questions.**  
> Cost data lives in `SNOWFLAKE.ACCOUNT_USAGE` views, not user-created semantic views.  
> Skip `cortex semantic-views search/discover` and `SHOW DATABASES` — go directly to the routing table below.

> **⚠️ Budget Syntax Warning**  
> Budgets are **class instances**, NOT standard objects. Never use `SHOW BUDGETS` — it will fail.  
> ✅ Correct: `SHOW SNOWFLAKE.CORE.BUDGET LIKE '...'` or `SHOW SNOWFLAKE.CORE.BUDGET INSTANCES IN ACCOUNT`  
> ❌ Wrong: `SHOW BUDGETS LIKE '...'`

> **⚠️ Account Budget Limitations**  
> The **account budget** (`SNOWFLAKE.LOCAL.ACCOUNT_ROOT_BUDGET`) monitors ALL account spending automatically.  
> It does **NOT** support tag or resource management methods:  
> - ❌ `ADD_RESOURCE`, `REMOVE_RESOURCE`, `GET_LINKED_RESOURCES`  
> - ❌ `ADD_RESOURCE_TAG`, `REMOVE_RESOURCE_TAG`, `GET_RESOURCE_TAGS`, `GET_BUDGET_SCOPE`  
> If the user asks about tags/resources on the **account budget**, tell them immediately this isn't supported.  
> They need a **custom budget** to track specific objects or tags.

---

## Routing

Match the user's question to keywords and read the corresponding file **before writing any queries**.

| Keywords | Route |
|----------|-------|
| "top spenders", "who is spending", "user costs", "top users", "user spending" | `references/queries/users-queries.md` |
| "expensive queries", "query costs", "costly queries", "parameterized hash", "query patterns", "grouped by hash" | `references/queries/users-queries.md` |
| "where is my money going", "cost breakdown", "credits by service", "overall spending" | `references/queries/overview.md` |
| "warehouse", "compute", "virtual warehouse", "warehouse costs" | `references/queries/warehouse.md` |
| "week over week", "month over month", "cost increase", "spike", "why did costs go up", "compared to last" | `references/queries/trends.md` |
| "anomalies", "unusual spending", "cost spikes", "anomaly detection", "anomaly notification", "anomaly email", "cost spike alert" | `skills/anomaly-insights/SKILL.md` |
| "serverless", "tasks", "snowpipe", "serverless task credits" | `references/queries/serverless.md` |
| "storage", "database size", "storage costs", "data storage" | `references/queries/storage.md` |
| "cortex cost", "cortex credits", "cortex spend", "AI costs", "cortex AI cost", "analyst cost", "analyst credits", "LLM cost", "cortex search cost", "cortex search credits", "cortex agents cost", "cortex agents credits", "cortex code cost", "cortex code cli cost", "cortex code snowsight cost", "cortex code credits", "snowflake intelligence cost", "snowflake intelligence credits", "fine-tuning cost", "model training cost", "provisioned throughput cost", "PTU cost" | `skills/cortex-ai/SKILL.md` |
| "team costs", "department spending", "cost center", "chargeback", "showback", "tags", "attribution" | `references/queries/tags-attribution.md` |
| "containers", "SPCS", "compute pools", "container services" | `references/queries/containers.md` |
| "data transfer", "cross-region", "cross-cloud", "egress" | `references/queries/data-transfer.md` |
| "over budget", "at risk budget", "list all budgets", "compare budgets", "which budgets" | `references/queries/budgets.md` |
| "create budget", "set budget", "activate budget", "spending limit", "budget notifications", "add to budget", "budget actions", "deactivate budget", "drop budget", "delete budget", "remove budget", "budget alerts", "custom budget", "account budget", "budget status", "budget spend", "budget usage" | `skills/budget/SKILL.md` |

**Never write ad-hoc queries when a verified query exists in the routed file.**
