snowflake-platform
from jezweb/claude-skills
Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.
npx skills add https://github.com/jezweb/claude-skills --skill snowflake-platformSKILL.md
Snowflake Platform Skill
Build and deploy applications on Snowflake's AI Data Cloud using the snow CLI, Cortex AI functions, Native Apps, and Snowpark.
Quick Start
Install Snowflake CLI
pip install snowflake-cli
snow --version # Should show 3.14.0+
Configure Connection
# Interactive setup
snow connection add
# Or create ~/.snowflake/config.toml manually
[connections.default]
account = "orgname-accountname"
user = "USERNAME"
authenticator = "SNOWFLAKE_JWT"
private_key_path = "~/.snowflake/rsa_key.p8"
Test Connection
snow connection test -c default
snow sql -q "SELECT CURRENT_USER(), CURRENT_ACCOUNT()"
When to Use This Skill
Use when:
- Building applications on Snowflake platform
- Using Cortex AI functions in SQL queries
- Developing Native Apps for Marketplace
- Setting up JWT key-pair authentication
- Working with Snowpark Python
Don't use when:
- Building Streamlit apps (use
streamlit-snowflakeskill) - Need data engineering/ETL patterns
- Working with BI tools (Tableau, Looker)
Cortex AI Functions
Snowflake Cortex provides LLM capabilities directly in SQL. Functions are in the SNOWFLAKE.CORTEX schema.
Core Functions
| Function | Purpose | GA Status |
|---|---|---|
COMPLETE / AI_COMPLETE | Text generation from prompt | GA Nov 2025 |
SUMMARIZE / AI_SUMMARIZE | Summarize text | GA |
TRANSLATE / AI_TRANSLATE | Translate between languages | GA Sep 2025 |
SENTIMENT / AI_SENTIMENT | Sentiment analysis | GA Jul 2025 |
AI_FILTER | Natural language filtering | GA Nov 2025 |
AI_CLASSIFY | Categorize text/images | GA Nov 2025 |
AI_AGG | Aggregate insights across rows | GA Nov 2025 |
COMPLETE Function
-- Simple prompt
SELECT SNOWFLAKE.CORTEX.COMPLETE(
'llama3.1-70b',
'Explain quantum computing in one sentence'
) AS response;
-- With conversation history
SELECT SNOWFLAKE.CORTEX.COMPLETE(
'llama3.1-70b',
[
{'role': 'system', 'content': 'You are a helpful assistant'},
{'role': 'user', 'content': 'What is Snowflake?'}
]
) AS response;
-- With options
SELECT SNOWFLAKE.CORTEX.COMPLETE(
'mistral-large2',
'Summarize this document',
{'temperature': 0.3, 'max_tokens': 500}
) AS response;
Available Models:
llama3.1-70b,llama3.1-8b,llama3.2-3bmistral-large2,mistral-7bsnowflake-arcticgemma-7bclaude-3-5-sonnet(200K context)
Model Context Windows (Updated 2025):
| Model | Context Window | Best For |
|---|---|---|
| Claude 3.5 Sonnet | 200,000 tokens | Large documents, long conversations |
| Llama3.1-70b | 128,000 tokens | Complex reasoning, medium documents |
| Llama3.1-8b | 8,000 tokens | Simple tasks, short text |
| Llama3.2-3b | 8,000 tokens | Fast inference, minimal text |
| Mistral-large2 | Variable | Check current docs |
| Snowflake Arctic | Variable | Check current docs |
Token Math: ~4 characters = 1 token. A 32,000 character document ≈ 8,000 tokens.
Error: Input exceeds context window limit → Use smaller model or chunk your input.
SUMMARIZE Function
-- Single text
SELECT SNOWFLAKE.CORTEX.SUMMARIZE(article_text) AS summary
FROM articles
LIMIT 10;
-- Aggregate across rows (no context window limit)
SELECT AI_SUMMARIZE_AGG(review_text) AS all_reviews_summary
FROM product_reviews
WHERE product_id = 123;
TRANSLATE Function
-- Translate to English (auto-detect source)
SELECT SNOWFLAKE.CORTEX.TRANSLATE(
review_text,
'', -- Empty = auto-detect source language
'en' -- Target language
) AS translated
FROM international_reviews;
-- Explicit source language
SELECT AI_TRANSLATE(
description,
'es', -- Source: Spanish
'en' -- Target: English
) AS translated
FROM spanish_products;
AI_FILTER (Natural Language Filtering)
Performance: As of September 2025, AI_FILTER includes automatic optimization delivering 2-10x speedup and up to 60% token reduction for suitable queries.
-- Filter with plain English
SELECT * FROM customer_feedback
WHERE AI_FILTER(
feedback_text,
'mentions shipping problems or delivery delays'
);
-- Combine with SQL predicates for maximum optimization
-- Query planner applies standard filters FIRST, then AI on smaller dataset
SELECT * FROM support_tickets
WHERE created_date > '2025-01-01' -- Standard filter applied first
AND AI_FILTER(description, 'customer is angry or frustrated');
Best Practice: Always combine AI_FILTER with traditional SQL predicates (date ranges, categories, etc.) to reduce the dataset before AI processing. This maximizes the automatic optimization benefits.
Throttling: During peak usage, AI function requests may be throttled with retry-able errors. Implement exponential backoff for production applications (see Known Issue #10).
AI_CLASSIFY
-- Categorize support tickets
...