Skip to content

Skills for Claude Code CLI such as full stack dev Cloudflare, React, Tailwind v4, and AI integrations.

refactor: Move domain rules to respective skills

Jeza98a3f30cb66
diff --git a/skills/cloudflare-workers-ai/references/cloudflare-workers-ai-models.md b/skills/cloudflare-workers-ai/references/cloudflare-workers-ai-models.md
new file mode 100644
index 00000000..1fd1cb8f
--- /dev/null
+++ b/skills/cloudflare-workers-ai/references/cloudflare-workers-ai-models.md
@@ -0,0 +1,80 @@
+---
+globs: ["**/*.ts", "**/*.tsx", "wrangler.jsonc", "wrangler.toml"]
+---
+
+# Cloudflare Workers AI Function-Calling Models
+
+Reference for Workers AI models that support tool/function calling.
+
+## Function-Calling Models (Verified Jan 2026)
+
+| Model ID | Name | Context |
+|----------|------|---------|
+| `@cf/meta/llama-4-scout-17b-16e-instruct` | Llama 4 Scout 17B | 131k |
+| `@cf/meta/llama-3.3-70b-instruct-fp8-fast` | Llama 3.3 70B (Fast) | 24k |
+| `@cf/ibm-granite/granite-4.0-h-micro` | IBM Granite 4.0 Micro | 131k |
+| `@cf/qwen/qwen3-30b-a3b-fp8` | Qwen 3 30B | 32k |
+| `@cf/mistralai/mistral-small-3.1-24b-instruct` | Mistral Small 3.1 24B | 128k |
+| `@hf/nousresearch/hermes-2-pro-mistral-7b` | Hermes 2 Pro 7B | 24k |
+| `@cf/openai/gpt-oss-120b` | OpenAI GPT-OSS 120B | 128k |
+| `@cf/openai/gpt-oss-20b` | OpenAI GPT-OSS 20B | 128k |
+
+πŸ“š **Source**: https://developers.cloudflare.com/workers-ai/features/function-calling/
+
+## New 2025 Partner Models
+
+| Model ID | Type | Provider | Added |
+|----------|------|----------|-------|
+| `@cf/openai/gpt-oss-120b` | Text Gen | OpenAI | Aug 2025 |
+| `@cf/openai/gpt-oss-20b` | Text Gen | OpenAI | Aug 2025 |
+| `@cf/deepgram/aura-1` | TTS | Deepgram | Aug 2025 |
+| `@cf/deepgram/nova-3` | STT | Deepgram | Aug 2025 |
+| `@cf/leonardo/lucid-origin` | Image Gen | Leonardo | Aug 2025 |
+| `@cf/leonardo/phoenix-1.0` | Image Gen | Leonardo | Aug 2025 |
+| `@cf/pipecat-ai/smart-turn-v2` | Turn Detect | Pipecat | Aug 2025 |
+| `@cf/myshell-ai/melotts` | TTS | MyShell | Mar 2025 |
+| `@cf/baai/bge-m3` | Embeddings | BAAI | Mar 2025 |
+| `@cf/baai/bge-reranker-base` | Reranker | BAAI | Mar 2025 |
+| `@cf/openai/whisper-large-v3-turbo` | STT | OpenAI | Mar 2025 |
+
+πŸ“š **Source**: https://developers.cloudflare.com/changelog/
+
+## Model ID Corrections
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| `@cf/ibm/granite-4.0-h-micro` | `@cf/ibm-granite/granite-4.0-h-micro` |
+| `@cf/qwen/qwen2.5-coder-32b-instruct` | Remove (no function calling support) |
+
+## Dynamic Discovery via API
+
+Cloudflare has an API to list models with metadata including function-calling support:
+
+```bash
+# Via Wrangler CLI
+npx wrangler ai models --json
+
+# Via REST API
+GET https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/models/search
+Authorization: Bearer {CF_API_TOKEN}
+```
+
+### Filtering for Function-Calling Models
+
+```typescript
+const functionCallingModels = data.result
+ .filter(m => {
+ const isTextGen = m.task?.name === 'Text Generation';
+ const hasFunctionCalling = m.properties?.some(
+ p => p.property_id === 'function_calling' && p.value === 'true'
+ );
+ return isTextGen && hasFunctionCalling;
+ });
+```
+
+## Important Notes
+
+- **Qwen 2.5** does NOT support function calling (only Qwen 3 does)
+- **Qwen 3** outputs tool calls as JSON in text response (parse with regex fallback)
+- All Workers AI models are FREE - no API key required
+- Use native `env.AI.run()` binding, not AI Gateway
diff --git a/skills/cloudflare-workers-ai/rules/cloudflare-workers-ai-prefixes.md b/skills/cloudflare-workers-ai/rules/cloudflare-workers-ai-prefixes.md
new file mode 100644
index 00000000..c6c89bb4
--- /dev/null
+++ b/skills/cloudflare-workers-ai/rules/cloudflare-workers-ai-prefixes.md
@@ -0,0 +1,52 @@
+---
+globs: ["**/wrangler.jsonc", "**/wrangler.toml", "**/*.ts", "**/*.tsx", "**/*.js"]
+---
+
+# Cloudflare Workers AI Model Prefixes
+
+Workers AI models use two prefixes that BOTH require routing through the native `env.AI.run()` binding, not AI Gateway.
+
+## Prefixes
+
+| Prefix | Source | Example |
+|--------|--------|---------|
+| `@cf/` | Cloudflare-hosted models | `@cf/meta/llama-4-scout-17b-16e-instruct` |
+| `@hf/` | Hugging Face on Workers AI | `@hf/nousresearch/hermes-2-pro-mistral-7b` |
+
+## Corrections
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| Route only `@cf/` through `env.AI.run()` | Route BOTH `@cf/` AND `@hf/` through `env.AI.run()` |
+| Send `@hf/` models to AI Gateway | Use native Workers AI binding |
+| `model.startsWith('@cf/')` only | `model.startsWith('@cf/') \|\| model.startsWith('@hf/')` |
+
+## Correct Routing Pattern
+
+```typescript
+// In parseModelId()
+if (modelId.startsWith('@cf/') || modelId.startsWith('@hf/')) {
+ return { provider: 'cloudflare', model: modelId };
+}
+
+// In chat() - route through native binding
+if ((model.startsWith('@cf/') || model.startsWith('@hf/')) && env.AI) {
+ const response = await env.AI.run(model, { messages, tools });
+ // ...
+}
+
+// When detecting OpenRouter models (exclude Workers AI)
+const isOpenRouterModel = options.model.includes('/') &&
+ !options.model.startsWith('@cf/') &&
+ !options.model.startsWith('@hf/');
+```
+
+## Error Symptom
+
+If `@hf/` models return "not a valid model ID" error, they're being sent to AI Gateway instead of Workers AI binding.
+
+## Why This Matters
+
+- AI Gateway doesn't recognize Workers AI model IDs
+- Workers AI models are FREE on the edge - no API key needed
+- Native binding has better performance than gateway routing
diff --git a/skills/snowflake-platform/rules/snowflake-jwt-auth.md b/skills/snowflake-platform/rules/snowflake-jwt-auth.md
new file mode 100644
index 00000000..e0d9f11f
--- /dev/null
+++ b/skills/snowflake-platform/rules/snowflake-jwt-auth.md
@@ -0,0 +1,105 @@
+---
+globs: ["**/snowflake*.ts", "**/snowflake*.py", "**/*snowflake*", "**/wrangler.jsonc", "**/.env*"]
+---
+
+# Snowflake JWT Key-Pair Authentication
+
+Snowflake REST API authentication requires careful handling of account identifiers. They have TWO different formats used in different contexts.
+
+## Account Identifier Formats
+
+| Format | Example | Used For |
+|--------|---------|----------|
+| **Organization-Account** | `irjoewf-wq46213` | REST API URL subdomain |
+| **Account Locator** | `NZ90655` | JWT claims (`iss`, `sub`) |
+
+**Critical**: These are NOT interchangeable. Using org-account in JWT claims causes silent auth failures.
+
+## How to Discover Your Account Locator
+
+```sql
+SELECT CURRENT_ACCOUNT(); -- Returns: NZ90655
+```
+
+Or via snow CLI:
+```bash
+snow sql -q "SELECT CURRENT_ACCOUNT()" -c your_connection
+```
+
+## Corrections
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| Single `SNOWFLAKE_ACCOUNT` env var | Separate `SNOWFLAKE_ACCOUNT_URL` and `SNOWFLAKE_ACCOUNT_LOCATOR` |
+| `irjoewf-wq46213` in JWT iss claim | Account locator (e.g., `NZ90655`) |
+| Guessing account format from URL | Run `SELECT CURRENT_ACCOUNT()` to get actual locator |
+
+## JWT Claim Format
+
+```
+iss: ACCOUNT_LOCATOR.USERNAME.SHA256:fingerprint
+sub: ACCOUNT_LOCATOR.USERNAME
+```
+
+**Example**:
+```
+iss: NZ90655.JEZWEB.SHA256:jpZO6LvU2SpKd8tE61OGfas5ZXpfHloiJd7XHLPDEEA=
+sub: NZ90655.JEZWEB
+```
+
+## REST API URL Format
+
+Uses org-account format (NOT account locator):
+```
+https://irjoewf-wq46213.snowflakecomputing.com/api/v2/statements
+```
+
+## Configuration Pattern
+
+```typescript
+// In wrangler.jsonc vars
+"SNOWFLAKE_ACCOUNT_URL": "irjoewf-wq46213", // For REST URLs
+"SNOWFLAKE_ACCOUNT_LOCATOR": "NZ90655", // For JWT claims
+"SNOWFLAKE_USER": "JEZWEB",
+"SNOWFLAKE_PUBLIC_KEY_FP": "SHA256:jpZO6LvU2SpKd8tE61OGfas5ZXpfHloiJd7XHLPDEEA=",
+
+// In generateSnowflakeJWT()
+const issuer = `${accountLocator}.${user}.${fingerprint}`;
+
+// In executeSnowflakeSQL()
+const url = `https://${accountUrl}.snowflakecomputing.com/api/v2/statements`;
+```
+
+## RSA Key Setup
+
+```bash
+# Generate key pair (PKCS#8 format required)
+openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out ~/.snowflake/rsa_key.p8 -nocrypt
+openssl rsa -in ~/.snowflake/rsa_key.p8 -pubout -out ~/.snowflake/rsa_key.pub
+
+# Get fingerprint for JWT claims
+openssl rsa -in ~/.snowflake/rsa_key.p8 -pubout -outform DER | openssl dgst -sha256 -binary | openssl enc -base64
+
+# Add public key to Snowflake user (in Snowflake worksheet)
+ALTER USER JEZWEB SET RSA_PUBLIC_KEY='MIIBIj...';
+```
+
+## Debugging with snow CLI
+
+The `snow` CLI is useful for verifying credentials work before debugging REST API:
+
+```bash
+# Test connection
+snow connection test -c your_connection
+
+# Discover actual account values
+snow sql -q "SELECT CURRENT_USER(), CURRENT_ACCOUNT(), CURRENT_REGION()" -c your_connection
+```
+
+## Symptom of Wrong Account Identifier
+
+- REST API returns 200 but with JWT validation error
+- Queries don't appear in Snowflake Query History
+- No clear error message indicating which identifier is wrong
+
+**Fix**: Always use `SELECT CURRENT_ACCOUNT()` to get the actual account locator for JWT claims.
diff --git a/skills/snowflake-platform/rules/snowflake-marketplace-listing.md b/skills/snowflake-platform/rules/snowflake-marketplace-listing.md
new file mode 100644
index 00000000..bc896840
--- /dev/null
+++ b/skills/snowflake-platform/rules/snowflake-marketplace-listing.md
@@ -0,0 +1,194 @@
+---
+globs:
+ - "**/PROVIDER_STUDIO.md"
+ - "**/manifest.yml"
+ - "**/setup.sql"
+---
+
+# Snowflake Marketplace Listing
+
+Generate copy-paste content for Snowflake Provider Studio listings.
+
+## When to Use
+
+- After completing a Native App ready for marketplace submission
+- When user says "prepare marketplace listing"
+- When user says "provider studio content"
+
+## Output Format
+
+Create `docs/PROVIDER_STUDIO.md` with all fields formatted for copy-paste into Provider Studio.
+
+## Provider Studio Fields
+
+| Field | Max Length | Notes |
+|-------|------------|-------|
+| Title | 72 chars | App name |
+| Subtitle | 128 chars | One-liner value prop |
+| Description | 10,000 chars | HTML editor (H1, H2, bold, italic, lists, links) |
+| Business Needs | 6 max | Select from dropdown |
+| Quick Start Examples | 10 max | Title + Description + SQL |
+| Video | URL | YouTube/Vimeo embed |
+| Documentation | URL | External link |
+| **Data Dictionary** | Required | **MANDATORY for data listings** (2025) |
+| Data Attributes | Structured | Column descriptions, types, sample values |
+
+## Data Dictionary Requirement (2025)
+
+**MANDATORY** for all data listings. Provider Studio now requires structured data documentation:
+
+| Component | What to Include |
+|-----------|-----------------|
+| Table descriptions | Purpose, row count, update frequency |
+| Column metadata | Name, type, description, sample values |
+| Data attributes | Geographic coverage, time range, refresh rate |
+
+**Tip**: Generate data dictionary from your schema using:
+```sql
+DESCRIBE TABLE my_schema.my_table;
+SELECT * FROM my_schema.my_table LIMIT 5;
+```
+
+## Business Needs Dropdown (Complete List)
+
+**Healthcare/Insurance:**
+- Real World Data (RWD)
+- Population Health Management
+- Patient 360
+- Life Sciences Commercialization
+
+**Location/Geographic:**
+- Location Data Enrichment
+- Location Geocoding
+- Location Planning
+- Foot Traffic Analytics
+
+**Business/Company:**
+- Contact Data Enrichment
+- Market Analysis
+- Fundamental Analysis
+- 360-Degree Customer View
+- Customer Acquisition
+
+**Financial:**
+- Risk Analysis
+- Pricing Analysis
+- Asset Valuation
+- Quantitative Analysis
+- Fraud Remediation
+- Blockchain Analysis
+
+**Customer/Marketing:**
+- Audience Segmentation
+- Audience Activation
+- Personalize Customer Experiences
+- Identity Resolution
+- Attribution Analysis
+- Subscriber Acquisition and Retention
+
+**Operations:**
+- Data Quality and Cleansing
+- Demand Forecasting
+- Inventory Management
+- Supply Chain
+- Machine Learning
+
+**Compliance/Government:**
+- Regulatory Reporting
+- Economic Impact Analysis
+- ESG Investment Analysis
+- Customer Onboarding (KYC)
+
+## Description Template
+
+```html
+<h2>Overview</h2>
+<p>{{OVERVIEW_PARAGRAPH}}</p>
+
+<h2>What's Included</h2>
+
+<p><strong>{{TABLE_1_NAME}} ({{COUNT}} records)</strong></p>
+<ul>
+ <li>{{BULLET_1}}</li>
+ <li>{{BULLET_2}}</li>
+ <li>{{BULLET_3}}</li>
+</ul>
+
+<h2>Key Features</h2>
+<ul>
+ <li><strong>{{FEATURE_1}}</strong> - {{DESC}}</li>
+ <li><strong>{{FEATURE_2}}</strong> - {{DESC}}</li>
+ <li><strong>{{FEATURE_3}}</strong> - {{DESC}}</li>
+</ul>
+
+<h2>Use Cases</h2>
+<ol>
+ <li><strong>{{USE_CASE_1}}</strong> - {{DESC}}</li>
+ <li><strong>{{USE_CASE_2}}</strong> - {{DESC}}</li>
+ <li><strong>{{USE_CASE_3}}</strong> - {{DESC}}</li>
+</ol>
+
+<h2>Data Source</h2>
+<p>{{DATA_SOURCE_PARAGRAPH}}</p>
+```
+
+## Quick Start Example Format
+
+Each example needs 3 separate fields in Provider Studio:
+
+**Usage example title:** (short name)
+```
+{{EXAMPLE_TITLE}}
+```
+
+**Description:** (what it demonstrates)
+```
+{{EXAMPLE_DESCRIPTION}}
+```
+
+**Query:** (working SQL)
+```sql
+{{EXAMPLE_SQL}}
+```
+
+## Region Availability (Required)
+
+**Important:** The "All regions" option with "Automatic" fulfillment may not be available for all accounts. You must configure:
+
+| Setting | Value | Notes |
+|---------|-------|-------|
+| Region availability | **Custom regions** | "All regions" option may be restricted |
+| Regions | Asia Pacific (14) | Or select specific regions for your data |
+| Fulfillment method | **Manual** | "Automatic" may not be allowed |
+
+**Manual fulfillment** means you must create remote accounts and manage replication manually. This gives more control but requires more setup.
+
+## Submission Checklist
+
+- [ ] Title under 72 characters
+- [ ] Subtitle under 128 characters
+- [ ] 6 business needs selected
+- [ ] Description formatted correctly in HTML editor
+- [ ] All SQL examples tested and return results
+- [ ] Video URL works (if provided)
+- [ ] Documentation URL works (if provided)
+- [ ] **Region availability configured** (Custom regions + Manual fulfillment)
+- [ ] App version created and security scan APPROVED
+- [ ] Release directive set on DEFAULT channel
+
+## Paid Listing Prerequisites
+
+Before enabling monetization (paid listings), complete these steps in order:
+
+| # | Requirement | How to Check/Complete |
+|---|-------------|----------------------|
+| 1 | Full Snowflake account (not trial) | Admin β†’ Billing (check account type) |
+| 2 | ACCOUNTADMIN role | `SELECT CURRENT_ROLE();` |
+| 3 | Provider Profile approved | Provider Studio β†’ Profiles β†’ Must show "Approved" |
+| 4 | Stripe account configured | Admin β†’ Billing β†’ Marketplace billing β†’ Provider billing β†’ Activate account |
+| 5 | Provider & Consumer Terms accepted | ORGADMIN must accept (may be same as ACCOUNTADMIN for single-org accounts) |
+| 6 | Contact Marketplace Ops | Submit support case with: account locator, role, profile status, terms status |
+
+**Important**: Cannot convert existing free listing to paid. Must create new paid listing.
+
+πŸ“š **Source**: Snowflake Support (Jan 2026)
diff --git a/skills/snowflake-platform/rules/snowflake-native-app-marketplace.md b/skills/snowflake-platform/rules/snowflake-native-app-marketplace.md
new file mode 100644
index 00000000..b5b50fed
--- /dev/null
+++ b/skills/snowflake-platform/rules/snowflake-native-app-marketplace.md
@@ -0,0 +1,118 @@
+---
+globs: ["**/snowflake.yml", "**/snowflake.yaml", "**/manifest.yml", "**/setup_script.sql", "**/PROVIDER_STUDIO.md"]
+---
+
+# Snowflake Native App Marketplace
+
+Rules for publishing Native Apps to Snowflake Marketplace.
+
+## Security Review Workflow (snow CLI - Recommended)
+
+Use the `snow` CLI (Snowflake CLI) for native app workflows. Legacy SQL commands still work but CLI is preferred.
+
+| Step | snow CLI Command |
+|------|------------------|
+| 1. Deploy app | `snow app run` |
+| 2. Create version | `snow app version create V1_0` |
+| 3. Check status | `snow app version list` |
+| 4. Wait for approval | `review_status` must be `APPROVED` |
+| 5. Publish to channel | `snow app publish --version V1_0 --patch 0` |
+
+πŸ“š **Source**: https://docs.snowflake.com/en/developer-guide/snowflake-cli/native-apps/publish-app
+
+## Release Channels (Feb 2025 - Preview)
+
+Release channels allow separate release tracks for different customer groups:
+
+| Channel | Purpose |
+|---------|---------|
+| `DEFAULT` | Production releases |
+| `ALPHA` | Early access customers |
+| Custom channels | QA, beta testing, specific customer groups |
+
+**Enable in snowflake.yml**:
+```yaml
+native_app:
+ name: my_app
+ package:
+ name: my_app_pkg
+ application:
+ name: my_app
+ enable_release_channels: true # Required for release channels
+```
+
+**snow CLI commands**:
+```bash
+# List channels
+snow app release-channel list
+
+# Add version to channel
+snow app release-channel add-version --channel ALPHA --version V1_0
+
+# Publish with specific directive
+snow app publish --version V1_0 --patch 0 --channel ALPHA --directive early_access
+```
+
+πŸ“š **Source**: https://docs.snowflake.com/en/developer-guide/native-apps/release-channels
+
+## Legacy SQL Workflow (Still Works)
+
+| Step | SQL Command |
+|------|-------------|
+| 1. Set distribution | `ALTER APPLICATION PACKAGE pkg SET DISTRIBUTION = 'EXTERNAL';` |
+| 2. Create version | `ALTER APPLICATION PACKAGE pkg ADD VERSION V1_0 USING '@pkg.stage/v1';` |
+| 3. Check status | `SHOW VERSIONS IN APPLICATION PACKAGE pkg;` |
+| 4. Add to channel | `ALTER APPLICATION PACKAGE pkg MODIFY RELEASE CHANNEL DEFAULT ADD VERSION V1_0;` |
+
+## Security Review Status Values
+
+| Status | Meaning | Action |
+|--------|---------|--------|
+| `NOT_REVIEWED` | Scan hasn't run | Wait or check DISTRIBUTION is EXTERNAL |
+| `IN_PROGRESS` | Scan running | Wait a few minutes |
+| `APPROVED` | Passed | Can publish to marketplace |
+| `REJECTED` | Failed | Fix issues or appeal |
+| `MANUAL_REVIEW` | Automated passed, human reviewing | Wait (can take business days) |
+
+**Apps that trigger manual review**: External access integrations, Streamlit components, network calls to external services.
+
+## External Access Integration (Streamlit Apps)
+
+Native Apps with Streamlit that call external APIs need 4-step setup:
+
+```sql
+-- 1. Network rule
+CREATE OR REPLACE NETWORK RULE app_network_rule
+ MODE = EGRESS
+ TYPE = HOST_PORT
+ VALUE_LIST = ('api.example.com:443');
+
+-- 2. Integration
+CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION app_integration
+ ALLOWED_NETWORK_RULES = (app_network_rule)
+ ENABLED = TRUE;
+
+-- 3. Grant to app
+GRANT USAGE ON INTEGRATION app_integration
+ TO APPLICATION MY_APP;
+
+-- 4. CRITICAL: Attach to Streamlit object
+ALTER STREAMLIT MY_APP.schema.streamlit_name
+ SET EXTERNAL_ACCESS_INTEGRATIONS = (app_integration);
+```
+
+**Note**: Step 4 resets on every app redeploy. Users must re-run it after updates.
+
+## Corrections
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| `GRANT ON FUTURE TABLES TO APPLICATION` | Remove - apps own tables they create |
+| Testing external access against httpbin.org | Test against the actual allowed domain |
+| Only 4 review statuses | Include `MANUAL_REVIEW` as 5th status |
+
+## Provider Studio Content
+
+- Description field uses WYSIWYG editor - cannot paste HTML
+- Use plain text and format with editor toolbar
+- Business Needs require individual descriptions (not just selection)
diff --git a/skills/snowflake-platform/rules/snowflake-native-app.md b/skills/snowflake-platform/rules/snowflake-native-app.md
new file mode 100644
index 00000000..c06d1930
--- /dev/null
+++ b/skills/snowflake-platform/rules/snowflake-native-app.md
@@ -0,0 +1,102 @@
+---
+globs: ["**/snowflake.yml", "**/snowflake.yaml", "**/setup_script.sql", "**/streamlit_app.py", "**/environment.yml"]
+---
+
+# Snowflake Native App Development
+
+Rules for building and deploying Snowflake Native Apps with Streamlit.
+
+## snow CLI Commands (Recommended)
+
+| Task | Command |
+|------|---------|
+| Deploy/run app | `snow app run` |
+| Create version | `snow app version create V1_0` |
+| List versions | `snow app version list` |
+| Drop version | `snow app version drop V1_0` |
+| Publish | `snow app publish --version V1_0` |
+| Teardown | `snow app teardown` |
+
+πŸ“š **Source**: https://docs.snowflake.com/en/developer-guide/snowflake-cli/native-apps/overview
+
+## Deployment Sequence
+
+After every `snow app run`, you MUST re-attach external access integrations:
+
+```sql
+ALTER STREAMLIT [APP_NAME].config_schema.[streamlit_name]
+ SET EXTERNAL_ACCESS_INTEGRATIONS = (integration_name)
+```
+
+The setup_script.sql CREATE STREAMLIT does NOT persist this setting across deploys.
+
+## Corrections
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| `src: app/streamlit/` with `dest: streamlit/` | List individual files explicitly to avoid nested `streamlit/streamlit/` |
+| `dict(result[0])` for Snowpark Row | Access columns explicitly: `row['COLUMN_NAME']` |
+| Privileges in manifest.yml | Remove privileges section entirely (Native Apps can't declare privileges) |
+| GRANT ALL/FUTURE in setup_script.sql | Use specific table grants only |
+
+## External Access Integration Setup
+
+Must be created in a real database (not the app package). Run in order:
+
+```sql
+-- 1. Create database for rules (if needed)
+CREATE DATABASE IF NOT EXISTS [APP]_UTILS;
+
+-- 2. Create network rule (fully qualified)
+CREATE OR REPLACE NETWORK RULE [DB].PUBLIC.[rule_name]
+ MODE = EGRESS
+ TYPE = HOST_PORT
+ VALUE_LIST = ('[hostname]:443');
+
+-- 3. Create integration referencing the rule
+CREATE OR REPLACE EXTERNAL ACCESS INTEGRATION [integration_name]
+ ALLOWED_NETWORK_RULES = ([DB].PUBLIC.[rule_name])
+ ENABLED = TRUE;
+
+-- 4. Grant to app
+GRANT USAGE ON INTEGRATION [integration_name]
+ TO APPLICATION [APP_NAME];
+
+-- 5. Attach to Streamlit (must repeat after each deploy!)
+ALTER STREAMLIT [APP_NAME].config_schema.[streamlit]
+ SET EXTERNAL_ACCESS_INTEGRATIONS = ([integration_name]);
+```
+
+## Artifact Mapping in snowflake.yml
+
+Directory mappings nest the folder. Always list files explicitly:
+
+```yaml
+# WRONG - creates streamlit/streamlit/
+artifacts:
+ - src: app/streamlit/
+ dest: streamlit/
+
+# CORRECT - flat structure
+artifacts:
+ - src: app/streamlit/environment.yml
+ dest: streamlit/environment.yml
+ - src: app/streamlit/streamlit_app.py
+ dest: streamlit/streamlit_app.py
+ - src: app/streamlit/pages/01_sync.py
+ dest: streamlit/pages/01_sync.py
+```
+
+## Snowpark Row Access
+
+```python
+# WRONG
+config = dict(result[0]) # Doesn't work as expected
+
+# CORRECT
+row = result[0]
+config = {
+ 'COLUMN_A': row['COLUMN_A'],
+ 'COLUMN_B': row['COLUMN_B'],
+}
+```
diff --git a/skills/snowflake-platform/rules/snowflake-streamlit.md b/skills/snowflake-platform/rules/snowflake-streamlit.md
new file mode 100644
index 00000000..33b0b7c1
--- /dev/null
+++ b/skills/snowflake-platform/rules/snowflake-streamlit.md
@@ -0,0 +1,112 @@
+---
+paths: "**/streamlit/*.py", "environment.yml", "**/streamlit_app.py"
+---
+
+# Snowflake Streamlit Corrections
+
+## Map Rendering
+
+`st.map()` may not render properly in Snowflake's Streamlit environment. Use PyDeck instead.
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| `st.map(df)` | `st.pydeck_chart(pdk.Deck(...))` |
+
+Required setup:
+1. Add `pydeck` to `environment.yml` dependencies
+2. Import: `import pydeck as pdk`
+3. Use `map_style=None` to inherit Streamlit theme
+
+```python
+import pydeck as pdk
+
+st.pydeck_chart(
+ pdk.Deck(
+ map_style=None, # Uses Streamlit theme
+ initial_view_state=pdk.ViewState(
+ latitude=-25.0,
+ longitude=134.0,
+ zoom=3,
+ ),
+ layers=[
+ pdk.Layer(
+ "ScatterplotLayer",
+ data=df,
+ get_position="[lon, lat]",
+ get_color="[30, 136, 229, 180]",
+ get_radius=15000,
+ pickable=True,
+ ),
+ ],
+ tooltip={"text": "{name}"}
+ )
+)
+```
+
+## Startup Performance
+
+Snowflake Streamlit uses Warehouse Runtime by default:
+- Creates new instance per viewer = cold start each time
+- Slow startup is expected (warehouse resume + env init + package install)
+- Container Runtime (Preview) is faster but requires compute pool setup
+
+## Git Integration (Jan 2025)
+
+Streamlit in Snowflake now supports **Git repository integration** for version-controlled apps:
+
+```sql
+-- Create Git repository reference
+CREATE OR REPLACE GIT REPOSITORY my_repo
+ API_INTEGRATION = github_api_int
+ ORIGIN = 'https://github.com/org/repo.git';
+
+-- Create Streamlit from Git
+CREATE OR REPLACE STREAMLIT my_app
+ ROOT_LOCATION = '@my_repo/branches/main/streamlit'
+ MAIN_FILE = 'app.py'
+ QUERY_WAREHOUSE = 'MY_WH';
+
+-- Sync latest changes
+ALTER GIT REPOSITORY my_repo FETCH;
+```
+
+**Benefits**:
+- Deploy updates by pushing to Git (no manual upload)
+- Branch-based environments (main, staging, dev)
+- Full version history and rollback capability
+
+πŸ“š **Source**: https://docs.snowflake.com/en/developer-guide/streamlit/create-streamlit-git
+
+## Column Names for Maps
+
+PyDeck expects lowercase column names for coordinates:
+- Rename `LATITUDE` β†’ `lat`, `LONGITUDE` β†’ `lon`
+- Or use `get_position="[LONGITUDE, LATITUDE]"` explicitly
+
+## Query Building Pattern
+
+When building filtered queries with counts, build filter clause separately to avoid SQL errors.
+
+| If Claude suggests... | Use instead... |
+|----------------------|----------------|
+| `count_query = data_query.replace("SELECT cols", "SELECT COUNT(*)")` | Build filter clause separately, use in both queries |
+
+**Wrong approach** (creates invalid SQL with leftover columns):
+```python
+data_query = "SELECT col1, col2 FROM table WHERE 1=1"
+data_query += filter_clause
+count_query = data_query.replace("SELECT col1", "SELECT COUNT(*) as CNT") # Leaves col2!
+```
+
+**Correct approach:**
+```python
+filter_clause = ""
+if search_term:
+ filter_clause += f" AND UPPER(NAME) LIKE '%{search_term.upper()}%'"
+if selected_state != "All":
+ filter_clause += f" AND STATE = '{selected_state}'"
+
+# Separate queries using same filter
+count_query = f"SELECT COUNT(*) as CNT FROM table WHERE 1=1 {filter_clause}"
+data_query = f"SELECT col1, col2 FROM table WHERE 1=1 {filter_clause} ORDER BY col1 LIMIT 500"
+```