Skip to content

Snowflake-Labs/snowflake-ai-kit

Repository files navigation

Snowflake AI Kit

Developer tools for building on Snowflake with AI coding agents. Includes a one-command installer for Snowflake CLI + Cortex Code CLI and a Claude Code plugin that automatically routes Snowflake prompts to Cortex Code.

Table of Contents

Get Started

The installer sets up Snowflake CLI and Cortex Code CLI. The Cortex Code plugin for Claude Code is installed separately via the Claude Code plugin marketplace -- it automatically detects Snowflake prompts and routes them to Cortex Code.

What's Included

This repo includes:

Component What it does Install location
Snowflake CLI (snow) Manage Snowflake objects, deploy apps, run SQL from the terminal System PATH (via pipx/pip/brew)
Cortex Code CLI (cortex) AI coding assistant for Snowflake — generate code, explore data, build apps System PATH (via official installer)
Cortex Code plugin for Claude Code Auto-route Snowflake prompts from Claude Code to Cortex Code Claude Code marketplace (separate install)

Install

git clone https://github.com/Snowflake-Labs/snowflake-ai-kit.git
cd snowflake-ai-kit

Installer Options

Flag Description
--check / -Check Check installation status without installing
--update / -Update Re-install (overwrite existing)
--help / -Help Show help

macOS / Linux

bash install.sh

Windows (PowerShell)

.\install.ps1

npx (any platform)

npx @snowflake-labs/ai-kit

Snowflake Connection

Snow CLI and Cortex Code CLI both share the same Snowflake connection config (~/.snowflake/connections.toml). Set one up with:

snow connection add

Usage

After installing, open a terminal and run:

cortex                         # Start Cortex Code (interactive AI assistant)
snow connection list           # Verify your Snowflake connection
cortex skill list              # Browse 40+ built-in skills

With the plugin installed, Claude Code automatically routes Snowflake prompts to Cortex Code:

claude                         # Start Claude Code — Snowflake queries auto-route to Cortex

Ask naturally ("show me my tables", "check data quality on SALES_DATA") and it routes to Cortex Code. Non-Snowflake prompts stay in Claude Code.

To explicitly invoke Cortex Code (bypassing auto-routing):

$cortex-run analyze query performance for the last 7 days

See the plugin docs for security model and configuration.

Skills

Bundled Skills (Cortex Code CLI)

Cortex Code CLI ships with 40+ built-in skills that activate automatically based on your prompt. No setup required -- they're included in every install.

View all available skills:

cortex skill list

Skills are organized by source:

Category Description
BUNDLED Ship with the CLI binary. Updated automatically on cortex update.
GLOBAL User-installed skills in ~/.snowflake/cortex/skills/. Shared across all projects.
EXTERNAL Added via cortex skill add <path>. Point to local directories or Git repos.
PROJECT Discovered from the current working directory (e.g. .claude/skills/).

Examples of bundled skills: semantic-view, cortex-agent, data-quality, dynamic-tables, cost-intelligence, machine-learning, iceberg, data-governance, cortex-ai-functions, deploy-to-spcs, lineage, dbt-projects-on-snowflake, snowflake-notebooks, security-investigation, workload-performance-analysis.

Add a custom skill from a local path or GitHub:

cortex skill add /path/to/my-skill
cortex skill add owner/repo

Plugins

Cortex Code Plugin for Claude Code

Automatically route Snowflake work from Claude Code to Cortex Code. When you ask about your Snowflake data, the plugin detects the intent and delegates to Cortex Code -- no slash command needed. Just ask naturally:

  • "Show me the top 10 customers by revenue"
  • "Check data quality for the SALES_DATA table"
  • "Create a dynamic table that refreshes hourly"

Non-Snowflake prompts ("fix the bug in auth.py", "write a unit test") stay in Claude Code as usual.

Install via Claude Code marketplace

No clone required. Run these commands inside Claude Code:

# Add the official Anthropic marketplace (one-time setup)
/plugin marketplace add anthropics/claude-plugins-official

# Install the plugin
/plugin install snowflake-cortex-code

To update the marketplace catalog: /plugin marketplace update anthropics/claude-plugins-official

To update the plugin: /plugin update snowflake-cortex-code

See plugins/cortex-code/ for full documentation, security model, and configuration.

Troubleshooting

Problem Fix
snow: command not found Make sure ~/.local/bin (pipx) or your Python scripts dir is in $PATH. Try opening a new terminal.
cortex: command not found Re-run the installer. If it still fails, install manually from the Cortex Code CLI docs.
pip/pipx not found Install Python 3.10+ first: python.org
Connection errors Run snow connection add to create ~/.snowflake/connections.toml. Docs: Specify credentials
Installer hangs on Windows Run PowerShell as Administrator, or download and run the script manually.
Plugin not routing Make sure the plugin is enabled: check ~/.claude/settings.json has "enabledPlugins": { "snowflake-cortex-code@snowflake-ai-kit": true }

Contributing

All PRs run CI automatically on macOS and Windows via GitHub Actions (test.yml). The full test suite (209 tests) must pass on both platforms before merging.

To run tests locally:

bash tests/run-tests.sh --verbose        # macOS / Linux
.\tests\run-tests.ps1 -Verbose           # Windows (PowerShell)

License

Copyright (c) Snowflake Inc. All rights reserved.

The skills in this project are licensed under the Snowflake Skills License.

All other content is licensed under the Apache 2.0 license.

About

Snowflake AI Kit: Cortex Code plugin for automatic Snowflake routing, envelope-based permission policy, and one-command installers for Snowflake CLI + Cortex Code CLI.

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE-SKILLS.md

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors