stored-procedures

stored-procedures is a cursor rule for Cursor from sfc-gh-cconner/support-rules-mcp. It costs 533 tokens per session, scanned A, original, Apache-2.0.

A complete set of project rules for creating Snowflake stored procedures, which are saved programs that run database operations. It covers requirements, data mapping, queries, examples, error handling, testing, and documentation.

In plain words
What is it for?
Use it to plan, write, test, and document Snowflake stored procedures, including choosing the right tables and building queries with error handling.
Why use it?
It gives the assistant a repeatable workflow for producing procedures that fit the project's data sources and quality standards. This reduces missed steps during design, implementation, and review.

Cursor rule for Cursor

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

Good fit Use it to plan, write, test, and document Snowflake stored procedures, including choosing the right tables and building queries with error handling.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/sfc-gh-cconner/support-rules-mcp/stored-procedures
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.

Clone the repo
git clone --depth 1 https://github.com/sfc-gh-cconner/support-rules-mcp

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 stored-procedures

README.md
[![agentmods](https://agentmods.dev/badge/rules/sfc-gh-cconner/support-rules-mcp/stored-procedures.svg)](https://agentmods.dev/rules/sfc-gh-cconner/support-rules-mcp/stored-procedures)
Your own site
<a href="https://agentmods.dev/rules/sfc-gh-cconner/support-rules-mcp/stored-procedures"><img src="https://agentmods.dev/badge/rules/sfc-gh-cconner/support-rules-mcp/stored-procedures.svg" alt="Measured on agentmods" height="20"></a>
Per session 533 This file is loaded in full into every session.
When invoked 533 The same file — it is already loaded in full.
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.00533 $0.00533
Opus 5 $0.00267 $0.00267
Sonnet 5 $0.00107 $0.00107
Haiku 4.5 $0.00053 $0.00053

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

Security

Grade A, and why

stored-procedures 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.

rules/_meta/stored-procedures.mdc · 76 lines

How it starts

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

Stored Procedures Generation - Complete Ruleset

PURPOSE: Complete workflow for developing Snowflake stored procedures with code examples, documentation access, and quality standards.

Meta-Rule: This combines core Snowflake knowledge, code quality guidance, and stored procedure patterns.


📦 Included Rules

This meta-rule includes:

  • ✅ Core: Source code access (GitHub MCP)
  • ✅ Core: Documentation access (Snowflake Docs MCP)
  • ✅ Core: Code quality & examples (Context7 MCP)
  • ✅ Core: DPO to table mappings
  • ✅ Core: Snowhouse querying patterns
  • ✅ Workflow: Stored procedure generation guide

@include core/01-github-mcp.mdc @include core/02-docs-mcp.mdc @include core/03-code-quality-mcp.mdc @include core/04-dpo-mappings.mdc @include core/05-snowhouse-querying.mdc @include workflows/stored-procedures.mdc


🎯 Quick Reference

Procedure Development Flow

  1. Define Requirements → What data to collect?
  2. Map DPOs → Which tables to query?
  3. Get Examples → Context7 for best practices
  4. Build Query → Snowhouse patterns
  5. Write Procedure → With error handling
  6. Test → Validate functionality
  7. Document → Complete usage guide

Key Principles

  • Always validate inputs
  • Use type hints
  • Add comprehensive error handling
  • Include logging
  • Write to temp tables for large results
  • Document thoroughly

Code Quality Resources

# Get Snowpark examples
mcp_context7_get-library-docs(
    context7CompatibleLibraryID="/snowflakedb/snowpark-python",
    topic="stored procedures best practices",
    tokens=2000
)

# Get error handling patterns
mcp_context7_get-library-docs(
    context7CompatibleLibraryID="/snowflakedb/snowpark-python",
    topic="exception handling",
    tokens=1500
)

Critical Reminders

  • Image reposstage_etl_v with stage_type = 'IMAGE_REPOSITORY'
  • Git reposstage_etl_v with stage_type = 'GIT_REPOSITORY'
  • Always filter by account_id
  • Always use time bounds
  • Always include LIMIT for safety

Read the full file on GitHub · 76 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 · 76 lines · 533 tokens per session scan A 85d453e34f12

Subscribe to this mod's changes

stored-procedures is a cursor rule published in the GitHub repository sfc-gh-cconner/support-rules-mcp (0 stars, last pushed 11mo ago), licensed Apache-2.0. It adds 533 tokens to every session, about $0.0027 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.