Databricks finops cost

From VincentChuWaiChow/vanguard-frontier-agentic · View interactive version

Databricks finops cost is an AI agent skill from the GitHub repository VincentChuWaiChow/vanguard-frontier-agentic. Use this skill to statically review Databricks cost and cost-attribution: system.billing.usage and system.billing.list_prices for correct joins, custom-tag-based attribution with coverage-confidence reporting, DBU uptime charging semantics, serverless versus classic cost comparison validity, budgets

How to use this skill

Skill file

databricks-finops-cost

Purpose

This skill decides whether cost data is correct and whether cost attribution is reliable enough to act on. Cost analysis is only valid when system.billing.usage and system.billing.list_prices are joined correctly (time-predicate join is critical), custom-tag coverage is sufficient (typically >75%), DBU uptime charging is correctly understood, and serverless versus classic comparisons include infrastructure cost. Query-cost inferences are labelled, not presented as measured facts. Any cost-cutting recommendation is T2 and requires human approval and rollback planning.

When to use

When NOT to use

Scope

Decision workflow

  1. Establish data scope: date range, workspace(s), and what exports are available (system.billing.usage, system.billing.list_prices, system.compute.clusters, system.lakeflow.jobs). Refuse-and-ask if core tables are missing.
  2. Inspect system.billing.usage schema: confirm account_id, workspace_id, usage_date, sku_name, usage_quantity, custom_tags, usage_metadata, identity_metadata columns are present.
  3. Verify the pricing join: check that price_start_time <= usage_date AND usage_date < price_end_time is used; any other join predicate double-counts charges.
  4. Analyse custom-tag coverage: calculate the % of spend with custom_tags != NULL or empty. Report this as attribution confidence (e.g., '85% tagged, 15% untagged').
  5. Identify expensive workloads: join usage to clusters/jobs to name the top spenders by custom tag. Flag the ranking as incomplete if coverage < 75%.
  6. Review DBU uptime charging: confirm that warehouses and clusters are charged by uptime (not execution), serverless emits multiple records per hour when rates change, and auto-stop incurs full uptime charge.
  7. Check serverless vs classic comparison: if comparing cost, confirm both VM and DBU costs are included (serverless VM is in the DBU price, classic VM is separate). Flag per-DBU comparisons as incomplete.

Lean operating rules

Evidence requirements

No recommendation is issued before the evidence below exists. When it is missing, name the smallest artifact that would supply it and stop.

Context7 MCP policy

Context7 supplies current, version-specific library and SDK documentation. It does not establish Databricks service behaviour — Databricks' own documentation does. Use it exactly when:

If Context7 is not exposed in the session, say so and label every version-sensitive claim unknown rather than answering from memory. Never state that Context7 was consulted when it was not, and never assume an MCP server or tool name.

Official documentation policy

Databricks service semantics come from current Databricks documentation, not from memory, blog posts, conference talks, or release-note summaries. Where the behaviour differs by cloud (AWS / Azure / GCP), name the cloud the claim applies to. Where a feature is Public Preview or Beta, say so on first mention and never describe it as a production default. Anything that cannot be grounded stays out of the answer and is reported as an open question.

Security boundaries

Runtime authority

T0 (static analysis only). Reads billing tables, compute configuration, system tables, and cluster policies; never executes any query, never invokes Databricks APIs, and never recommends a cost-cutting action without explicit human approval. A recommendation to change compute policy, turn off auto-scaling, or reduce instance-pool size is a T2 decision because it has operational consequences (potential downtime, reduced concurrency).

Authority tiers used across this board: T0 static review (read artifacts only); T1 read-only runtime (allowlisted read-only queries against a workspace, no writes); T2 sandbox-mutating (dry-run or non-production only); T3 mutating-runtime (changes production state — human-approved live guards only). This skill never raises its own tier, and never hands a task to a higher tier without an explicit named human owner.

Production caveats

References

Progressive disclosure — load only the one the task needs:

Response minimum

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.