SnowGram: Cursor rule for Cursor

.cursor/spcs-best-practices.mdc

spcs-best-practices is a cursor rule for Cursor from sfc-gh-abannerjee/SnowGram. It costs 8 tokens per session (908 once invoked), scanned A, original, MIT.

A deployment checklist for running SnowGram services on Snowflake's managed container platform, SPCS. It covers secrets, permissions, container images, service specifications, compute pools, and production settings.

In plain words
What is it for?
Use it when building Docker images, configuring Snowflake secrets and service roles, defining services and endpoints, setting resources, or preparing SPCS deployments.
Why use it?
It helps avoid exposed credentials, excessive access, incompatible container builds, and incomplete deployment configuration. The checklist turns platform requirements into items developers can verify.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

This is sfc-gh-abannerjee/SnowGram's own configuration. It tells Cursor how to work on SnowGram itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SnowGram configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sfc-gh-abannerjee/SnowGram. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sfc-gh-abannerjee/SnowGram/main/.cursor/spcs-best-practices.mdc
Clone the repo
git clone --depth 1 https://github.com/sfc-gh-abannerjee/SnowGram

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 spcs-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/rules/sfc-gh-abannerjee/snowgram/spcs-best-practices.svg)](https://agentmods.dev/rules/sfc-gh-abannerjee/snowgram/spcs-best-practices)
Your own site
<a href="https://agentmods.dev/rules/sfc-gh-abannerjee/snowgram/spcs-best-practices"><img src="https://agentmods.dev/badge/rules/sfc-gh-abannerjee/snowgram/spcs-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 908 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.00008 $0.00908
Opus 5 $0.00004 $0.00454
Sonnet 5 $0.00002 $0.00182
Haiku 4.5 $0.00001 $0.00091

Measured 7d ago against content hash 1cdf4b6f44ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

spcs-best-practices 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 7d 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.

.cursor/spcs-best-practices.mdc · 143 lines

How it starts

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

SPCS Best Practices for SnowGram

Reference for maintaining 85%+ compliance with Snowflake's SPCS best practices.

Critical Security Practices ✅

Secrets Management:

  • Always use Snowflake secrets via secretKeyRef in spec files
  • Never hardcode credentials in Dockerfiles or code
  • Grant secret usage to service roles only
env:
  SNOWFLAKE_PASSWORD:
    secretKeyRef: snowgram_credentials  # ✅ Correct

RBAC:

  • Follow principle of least privilege
  • Grant only necessary permissions to service roles
  • Use dedicated service accounts (SVC_CURSOR, not human accounts)

Deployment Requirements ✅

Docker Image:

  • MUST build with --platform linux/amd64 (SPCS requirement)
  • Use multi-stage builds to minimize size
  • No secrets in image layers

Service Specification:

  • Fully qualified image paths: /<database>/<schema>/<repo>/<image>:<tag>
  • Specify resource requests and limits
  • Configure public endpoints with public: true

Compute Pool:

  • Set appropriate instance family (CPU_X64_M for web apps)
  • Configure AUTO_SUSPEND_SECS (300-900 seconds)
  • Set MIN_NODES and MAX_NODES for scaling

Production Requirements ⚠️

Before Production Deployment:

  1. Implement health checks (readinessProbe + livenessProbe)
  2. Scale to MIN_INSTANCES = 2 for high availability
  3. Set up automated monitoring and alerting
  4. Configure structured logging (JSON format)

Health Checks Template:

readinessProbe:
  httpGet:
    path: /health
    port: 80
  initialDelaySeconds: 30
  periodSeconds: 10
  failureThreshold: 3

livenessProbe:
  httpGet:
    path: /health
    port: 80
  initialDelaySeconds: 60
  periodSeconds: 30
  failureThreshold: 3

Monitoring Setup ✅

Required Views:

  • Service status monitoring (SYSTEM$GET_SERVICE_STATUS)
  • Health check history table
  • Alert views for failures

Automated Tasks:

  • Health check stored procedures (every 5 minutes)
  • Resource usage tracking
  • Error rate monitoring

High Availability Configuration

Read the full file on GitHub · 143 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. 7d ago First seen · 143 lines · 8 tokens per session scan A 1cdf4b6f44ef

Subscribe to this mod's changes

spcs-best-practices is a cursor rule published in the GitHub repository sfc-gh-abannerjee/SnowGram (2 stars, last pushed 2mo ago), licensed MIT. It adds 8 tokens to every session and 908 once invoked, about $0.0000 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-31.