Skip to main content

One Claude Code skill that runs a Snowflake cost audit from ACCOUNT_USAGE

Updated 3 min readMarkdown

Most Snowflake “cost tips” posts end with a screenshot of a worksheet. Useful once. Useless the twentieth time you reopen the same tab at month-end.

If you already live in Claude Code, the better packaging is a skill: a SKILL.md that tells the agent when to run a FinOps pass, which read-only ACCOUNT_USAGE scripts to execute, how to interpret idle burn vs attributed credits, and what the written report should look like for your team.

What the Cost Guardrail skill does

In one invocation (/cost-guardrail or “run a Snowflake cost audit”), the skill walks a fixed sequence:

  1. Idle warehouse burn — warehouse metering credits minus query-attributed credits (the auto-suspend / idle gap QUERY_ATTRIBUTION_HISTORY deliberately leaves out).
  2. Top costly queries — outliers by attributed credits, plus recurring parameterized hashes that quietly dominate the month.
  3. Guardrail gaps — warehouses that never suspend, suspend slowly, or have no resource monitor; a light queued-vs-spill cue for sizing judgment.
  4. Storage / Time Travel hogs — tables ranked by active + Time Travel + Fail-safe bytes, plus a 90-day storage trend.
  5. Monitor checklist — what monitors exist, what’s missing, and a commented monthly resource-monitor template (no surprise CREATE/ALTER).

Everything is read-only against public Snowflake ACCOUNT_USAGE patterns. No third-party FinOps SaaS. No customer data leaves your account.

Why a skill instead of a prompt pack

A pasted ChatGPT prompt does not ship SQL, does not remember your report template, and does not install into .claude/skills/ for the whole team. A Claude Code skill does: drop the folder in, invoke it, get a consistent Markdown report (executive summary → idle burn → queries → gaps → storage → prioritized actions).

A sketch of the idle-burn idea (illustrative)

Conceptually you compare:

  • credits billed per warehouse from WAREHOUSE_METERING_HISTORY
  • credits attributed to queries from QUERY_ATTRIBUTION_HISTORY

The gap is your idle / non-attributed compute — the first place many accounts leak credits. (Exact skill scripts ship with the pack; treat anything in a blog post as a sketch, not production copy.)

Get the pack

I packaged this as a Snowflake Claude Skills download for Claude Code users: Cost Guardrail, RBAC/Security Audit, and Performance/Cache/Spillage skills.

Get the pack on Gumroad: Snowflake Claude Skills Pack ($49, three skills, 18 read-only SQL scripts).

Or build the same habit yourself: put the workflow in SKILL.md, keep SQL under scripts/, and make Claude produce the same report every time.

No comments yet. Be the first to comment.