Reference for Snowflake Cortex AI Functions (AICOMPLETE, AICLASSIFY, AIEXTRACT, AIFILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .claude/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add Mindrally/skills --skill snowflake-cortex-ai -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .agents/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add Mindrally/skills --skill snowflake-cortex-ai -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .cursor/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add Mindrally/skills --skill snowflake-cortex-ai -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .gemini/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add Mindrally/skills --skill snowflake-cortex-ai -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .github/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add Mindrally/skills --skill snowflake-cortex-ai -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "snowflake-cortex-ai" agent skill from https://github.com/Mindrally/skills/tree/main/snowflake-cortex-ai into .opencode/skills/snowflake-cortex-ai/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "snowflake-cortex-ai", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
snowflake-cortex-ai
GitHub stars
269
Token cost
~2.4k tokens
SKILL.md length
734 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
Apache-2.0
At a glance
Reference for Snowflake Cortex AI Functions (AICOMPLETE, AICLASSIFY, AIEXTRACT, AIFILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake.
Works in 7 steps: Pick the narrowest function for the task… → Check token cost before batch jobs — Run… → Prototype in SQL — Call the function on… → …
Writing SQL that calls an LLM
SKILL.md covers Workflow for Building a…, Cortex AI Functions, Cortex Search — Hybrid Vector… and Best Practices, plus 1 more section
Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
What it does
Snowflake Cortex AI is an agent skill from Mindrally/skills. Reference for Snowflake Cortex AI Functions (AICOMPLETE, AICLASSIFY, AIEXTRACT, AIFILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake. Use when writing SQL that calls an LLM, classifying or extracting structured data from text, building a natural-language WHERE filter, or setting up hybrid vector+keyword search for retrieval-augmented generation.
Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in AI & LLM Engineering, covering Retrieval-augmented generation, Data warehousing and Schema markup. It works with Snowflake and SQL. The repository describes itself as: 265+ Claude Code skills for every major framework and language. Install with: npx skills add Mindrally/skills. The licence is Apache-2.0.
When your agent uses it
Writing SQL that calls an LLM
Extracting structured data from text
Building a natural-language WHERE filter
Setting up hybrid vector+keyword search for retrieval-augmented generation
Example prompts
“/snowflake-cortex-ai”
Requirements
Python 3
Workflow steps
7 steps, taken from the first numbered list in SKILL.md.
1Pick the narrowest function for the task — Use AI_CLASSIFY for categorization, AI_FILTER for natural-language row filtering, AI_EXTRACT…
2Check token cost before batch jobs — Run AI_COUNT_TOKENS(model, text) on a sample before running a function over a large table.
3Prototype in SQL — Call the function on a small LIMIT-ed sample and inspect results before running it over a full table.
4Structure prompts explicitly — Use PROMPT('template {0}', arg) for parameterized prompts and cast JSON output to VARIANT when you need…
5For RAG, stand up Cortex Search — Create a CORTEX SEARCH SERVICE over the source table, query it via the Python or REST API to retrieve…
6Use dedicated compute — Size Cortex Search's backing warehouse no larger than MEDIUM, and separate it from other pipeline warehouses.
7Guard against failures — Use TRY_COMPLETE in place of AI_COMPLETE for batch jobs where a single failure shouldn't fail the whole run; it…
What it can do on your machine
Read from SKILL.md and the folder at commit 7682ca7. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
No scripts in the folder and no shell commands in SKILL.md (its code samples are sql and python).
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Snowflake Cortex AI loads about 2.4k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 734 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~102
When it runs· the whole SKILL.md, loaded when a task matches
~2.4k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check passed
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/snowflake-cortex-ai/SKILL.md (or your agent's skills folder).
name
snowflake-cortex-ai
description
Reference for Snowflake Cortex AI Functions (AI_COMPLETE, AI_CLASSIFY, AI_EXTRACT, AI_FILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake. Use when writing SQL that calls an LLM, classifying or extracting structured data from text, building a natural-language WHERE filter, or setting up hybrid vector+keyword search for retrieval-augmented generation.
metadata.maintainer
Mindrally
metadata.source
https://github.com/Mindrally/skills
Snowflake Cortex AI
This skill covers Snowflake Cortex — the SQL-callable AI layer of Snowflake, including Cortex AI Functions for LLM/ML tasks and Cortex Search for managed hybrid (vector + keyword) search — all running inside Snowflake with no data leaving the platform.
Workflow for Building a Cortex-Powered Feature
Pick the narrowest function for the task — Use AI_CLASSIFY for categorization, AI_FILTER for natural-language row filtering, AI_EXTRACT for structured field pulls, and reserve AI_COMPLETE for open-ended generation — narrower functions are cheaper and more reliable than routing everything through AI_COMPLETE.
Check token cost before batch jobs — Run AI_COUNT_TOKENS(model, text) on a sample before running a function over a large table.
Prototype in SQL — Call the function on a small LIMIT-ed sample and inspect results before running it over a full table.
Structure prompts explicitly — Use PROMPT('template {0}', arg) for parameterized prompts and cast JSON output to VARIANT when you need structured fields back.
For RAG, stand up Cortex Search — Create a CORTEX SEARCH SERVICE over the source table, query it via the Python or REST API to retrieve context, then pass that context into AI_COMPLETE.
Use dedicated compute — Size Cortex Search's backing warehouse no larger than MEDIUM, and separate it from other pipeline warehouses.
Guard against failures — Use TRY_COMPLETE in place of AI_COMPLETE for batch jobs where a single failure shouldn't fail the whole run; it returns NULL instead of raising an error.
Cortex AI Functions
Available functions (use these current names — do not use deprecated names like COMPLETE or CLASSIFY_TEXT):
Function
Purpose
AI_COMPLETE
General-purpose LLM completion over text, images, or documents
AI_CLASSIFY
Classify text/images into user-defined categories (multi-label supported)
AI_FILTER
Returns TRUE/FALSE for text/image input — usable directly in WHERE
AI_AGG
Aggregate insights across many rows of text, no context-window limit
AI_EMBED
Generate embedding vectors for similarity search or clustering
AI_EXTRACT
Extract structured fields from text, images, or documents
AI_SENTIMENT
Sentiment score from text, ranging -1 to 1
AI_SUMMARIZE_AGG
Summarize across many rows, no context-window limit
AI_SIMILARITY
Embedding similarity between two inputs
AI_TRANSCRIBE
Transcribe audio/video files from a stage
AI_PARSE_DOCUMENT
OCR or text+layout extraction from documents in a stage
AI_REDACT
Redact PII from text
AI_TRANSLATE
Translate text between supported languages
Helper functions:
TO_FILE('@stage', 'filename') — build a file reference for document/image processing.
AI_COUNT_TOKENS(model, text) — check token count before calling a model, especially before large batch jobs.
PROMPT('template {0}', arg) — build parameterized prompt objects for AI_COMPLETE.
TRY_COMPLETE — like AI_COMPLETE but returns NULL on failure instead of raising an error.
AI_COMPLETE — the primary function
Supported models include claude-4-opus, claude-4-sonnet, claude-sonnet-4-5, claude-opus-4-5, claude-haiku-4-5, gemini-3-pro, llama3.1-70b, llama3.1-8b, llama3.3-70b, mistral-large2, mistral-small2, and deepseek-r1. Model availability varies by region — do not hardcode a model name without checking regional availability.
sql
-- Text completion
SELECT AI_COMPLETE(MODEL => 'claude-4-sonnet', PROMPT => 'Summarize: ' || review_text) FROM reviews;
-- Document processing
SELECT AI_COMPLETE(
MODEL => 'claude-4-sonnet',
PROMPT => PROMPT('Extract the invoice total from {0}', TO_FILE('@docs', 'invoice.pdf'))
);
-- Structured JSON output
SELECT AI_COMPLETE(MODEL => 'claude-4-sonnet',
PROMPT => 'Extract name, email, company as JSON: ' || raw_text)::VARIANT AS extracted
FROM contacts;
Show full SKILL.md (290 more words)Show less
Classification, filtering, and aggregation
sql
-- AI_CLASSIFY: cheaper than AI_COMPLETE for categorization tasks
SELECT AI_CLASSIFY(ticket_text, ['billing', 'technical', 'account', 'other']) AS category FROM tickets;
-- Multi-label: AI_CLASSIFY(input, categories, {'output_mode': 'multi'})
-- AI_FILTER: natural-language predicate directly in WHERE
SELECT * FROM reviews WHERE AI_FILTER(review_text, 'mentions product quality issues');
-- AI_AGG: cross-row aggregation with no context-window limit
SELECT AI_AGG(feedback_text, 'What are the top 3 themes?') FROM customer_feedback;
-- AI_EXTRACT: pull named fields out of free text
SELECT AI_EXTRACT(email_body, 'meeting date', 'attendees', 'action items') FROM emails;
Other functions
sql
SELECT review_text, AI_SENTIMENT(review_text) AS sentiment FROM product_reviews;
SELECT AI_EMBED(description) AS embedding FROM products;
SELECT AI_PARSE_DOCUMENT(TO_FILE('@docs', 'contract.pdf'), MODE => 'LAYOUT');
SELECT AI_TRANSCRIBE(TO_FILE('@media', 'recording.mp3')) AS transcript;
SELECT AI_REDACT(customer_notes) AS redacted FROM support_cases;
Privileges
Cortex AI functions require the USE AI FUNCTIONS account privilege plus the SNOWFLAKE.CORTEX_USER database role — both are granted to PUBLIC by default, so most workloads work without extra grants.
Cortex Search — Hybrid Vector + Keyword Search
Cortex Search is fully managed search combining vector (semantic) and keyword (lexical) retrieval. Typical use cases are RAG for LLM chatbots, enterprise search, and AI-powered Q&A.
Single-index service
sql
CREATE OR REPLACE CORTEX SEARCH SERVICE my_search
ON transcript_text
ATTRIBUTES region, agent_id
WAREHOUSE = my_wh
TARGET_LAG = '1 day'
EMBEDDING_MODEL = 'snowflake-arctic-embed-l-v2.0'
AS (SELECT transcript_text, region, agent_id FROM support_transcripts);
Multi-index service (text + vector across columns)
sql
CREATE OR REPLACE CORTEX SEARCH SERVICE my_multi_search
TEXT INDEXES transcript_text, summary
VECTOR INDEXES transcript_text (model='snowflake-arctic-embed-l-v2.0')
ATTRIBUTES region
WAREHOUSE = my_wh
TARGET_LAG = '1 hour'
AS (SELECT transcript_text, summary, region FROM support_transcripts);
Key parameters: ON (single-index column), TEXT INDEXES, VECTOR INDEXES, ATTRIBUTES (filterable columns), TARGET_LAG (freshness), EMBEDDING_MODEL, and PRIMARY KEY (enables optimized incremental refresh — set it whenever the source table has a stable key).
Querying — Python API (recommended for applications)
Snowflake Cortex AI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
A skill your agent uses when writing Snowflake SQL, building data pipelines with Dynamic Tables or Streams/Tasks, using Cortex AI functions, creating Cortex Agents, writing Snowpark Python…
UiPath Process Mining via uip pm — build and operate a process app end-to-end from a CSV / event log: templates, data mapping, upload, ingest, the dbt (Snowflake) transformation layer, publish, and…
Best practices for AutoML and hyperparameter search with Optuna, Ray Tune, and PyCaret, covering search-space design, validation splits, and leakage prevention.
Clean, maintainable, human-readable code principles combined with anti-over-engineering discipline: naming, single responsibility, DRY, and scoping changes to exactly what was requested.
Reference for Snowflake Cortex AI Functions (AICOMPLETE, AICLASSIFY, AIEXTRACT, AIFILTER, etc.) and Cortex Search for building RAG applications entirely inside Snowflake. Snowflake Cortex AI is an agent skill from Mindrally/skills.) and Cortex Search for building RAG applications entirely inside Snowflake.
When should I use Snowflake Cortex AI?
Snowflake Cortex AI fits situations like: writing SQL that calls an LLM; extracting structured data from text; building a natural-language WHERE filter; setting up hybrid vector+keyword search for retrieval-augmented generation.
How do I install Snowflake Cortex AI in Claude Code?
Run `npx skills add Mindrally/skills --skill snowflake-cortex-ai -a claude-code`. Or copy the skill folder (snowflake-cortex-ai in Mindrally/skills) into .claude/skills/snowflake-cortex-ai in your project. Claude Code loads it when a task matches its description.
How do I install Snowflake Cortex AI in Codex?
Run `npx skills add Mindrally/skills --skill snowflake-cortex-ai -a codex`. Or copy the skill folder (snowflake-cortex-ai in Mindrally/skills) into .agents/skills/snowflake-cortex-ai in your project. Codex loads it when a task matches its description.
Can I use Snowflake Cortex AI in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mindrally/skills --skill snowflake-cortex-ai -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/snowflake-cortex-ai, .gemini/skills/snowflake-cortex-ai, .github/skills/snowflake-cortex-ai and .opencode/skills/snowflake-cortex-ai in your project.
What does Snowflake Cortex AI need to run?
SKILL.md names no scripts, command-line tools or credentials: Snowflake Cortex AI is instructions for the agent only. Our summary lists: Python 3.
Does Snowflake Cortex AI access the network?
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Is Snowflake Cortex AI safe to install?
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
What licence does Snowflake Cortex AI use?
Snowflake Cortex AI is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Snowflake Cortex AI use?
About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
What are the alternatives to Snowflake Cortex AI?
Skills that share tags, products or a category with Snowflake Cortex AI: Snowflake Development (sickn33/agentic-awesome-skills, 47k stars), Snowflake Development (alirezarezvani/claude-skills, 28k stars), Uipath Process Mining (UiPath/skills, 168 stars) and dbt Snowflake to BigQuery Translator (google/skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Snowflake Cortex AI?
Mindrally (a GitHub organization) maintains it in Mindrally/skills, which has 269 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 8, 2026.
Source: Mindrally/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.