482-snowflake

482-snowflake is a cursor rule for Cursor from d-padmanabhan/agent-engineering-handbook. It costs 27 tokens per session (755 once invoked), scanned A, original, MIT.

A collection of engineering rules for Snowflake, a cloud data platform for storing and analyzing data.

In plain words
What is it for?
It guides warehouse sizing, automatic shutdown, spending limits, role-based access, data loading, and query design.
Why use it?
It helps control cloud costs, query performance, access permissions, and the handling of sensitive data.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

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.

agentmods
npx agentmods add rules/d-padmanabhan/agent-engineering-handbook/482-snowflake
Clone the repo
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook

Made for: Cursor.

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 482-snowflake

README.md
[![agentmods](https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/482-snowflake.svg)](https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/482-snowflake)
Your own site
<a href="https://agentmods.dev/rules/d-padmanabhan/agent-engineering-handbook/482-snowflake"><img src="https://agentmods.dev/badge/rules/d-padmanabhan/agent-engineering-handbook/482-snowflake.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00027 $0.00755
Opus 5 $0.00014 $0.00378
Sonnet 5 $0.00005 $0.00151
Haiku 4.5 $0.00003 $0.00076

Measured 2d ago against content hash 4fef142a212a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

482-snowflake 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 2d 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.

rules/482-snowflake.mdc · 114 lines

How it starts

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

Snowflake Engineering Ruleset

Audience: engineers building datasets and pipelines on Snowflake

Goal: secure, cost-aware, high-performance analytics with predictable operations


Warehouses (compute) and cost defaults

  • Enable auto-suspend and set an explicit low idle timeout.
  • Prefer right-sized warehouses; scale out (multi-cluster) only for concurrency needs.
  • Use resource monitors (account/object) to prevent runaway spend.

[!IMPORTANT] Warehouse size is a performance lever and a cost lever. Treat sizing as an explicit decision, not a default.


Security and governance (RBAC-first)

  • Prefer roles over users; assign users/service principals to roles.
  • Use least privilege:
    • separate read roles from write/admin roles
    • separate raw vs curated vs serving schemas
  • Use platform features for sensitive data:
    • masking policies
    • row access policies
    • secure views
    • network policies (where applicable)

[!CAUTION] “Just grant on the database” is usually a governance smell. Scope grants to schemas/tables needed.


Query performance: design for pruning

  • Avoid SELECT * on wide tables in production queries.
  • Make filters selective and prune-friendly (for example, time ranges).
  • Prefer joins on properly typed keys; avoid string casting in join predicates.
  • Use clustering keys only when there is evidence of persistent pruning issues.

Anti-patterns to avoid

  • Leading-wildcard pattern matching (ILIKE '%foo') on large datasets.
  • Unbounded joins across huge tables without predicates.

Data modeling and change management

  • Use clear layering (raw/bronze, curated/silver, serving/gold).
  • Treat breaking schema changes as migrations:
    • dual write / dual read
    • versioned objects when needed
    • clear rollback plan

Loading data (stages, COPY, Snowpipe)

  • Prefer COPY INTO with explicit file formats and error handling policies.
  • For continuous ingestion, use Snowpipe with monitoring/alerting on lag and errors.
  • Keep ingestion idempotent:
    • stable file naming
    • load history checks
    • merge/upsert downstream if duplicates possible

Read the full file on GitHub · 114 lines

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. 2d ago First seen · 114 lines · 27 tokens per session scan A 4fef142a212a

Subscribe to this mod's changes

482-snowflake is a cursor rule published in the GitHub repository d-padmanabhan/agent-engineering-handbook (16 stars, last pushed 6d ago), licensed MIT. It adds 27 tokens to every session and 755 once invoked, about $0.0001 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-09-03.