/snowflake-cortex-code:cortex-setupfrom snowflake-cortex-code
Sets up Cortex Code backend by installing local CLI or configuring remote MCP. Also installs Snowflake AIM for database migrations in Devin.
Ships in snowflake-cortex-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run bash "${CLAUDE_PLUGIN_ROOT}/scripts/run_python.sh" "${CLAUDE_PLUGIN_ROOT}/scripts/router/backend.py" before any other
check. Codex may use ${PLUGIN_ROOT} instead. In Devin, use the absolute plugin
root the prompt hook gives you.
remote, follow that guide: have the user/admin configure a Coding Agent
and managed MCP server, connect and authenticate it in the host, then select
the exact exposed tool identifier. Do not handle credentials yourself. Confirm
the tool's schema is compatible using the
remote workflow. Explain the approval
boundary and use a read-only smoke task only with user consent. Stop here:
do not run the local MCP conflict check or install the CLI.local, follow the existing local setup below. If the user specifically
requested remote mode but settings still show local, help them select remote
using the guide instead of installing the CLI.Install Snowflake CLI (snow) and Cortex Code CLI (cortex) using the appropriate installer for the current OS.
For local mode only, run this check before checking or installing CLIs, even if the CLIs are already installed. It does not apply to remote mode.
Use the host that's running this skill: claude_code, codex, or devin_cli (also for Devin Desktop). In Devin, ${CLAUDE_PLUGIN_ROOT} isn't set; replace it with the absolute plugin root the prompt hook gives you.
bash "${CLAUDE_PLUGIN_ROOT}/scripts/run_python.sh" - "${CLAUDE_PLUGIN_ROOT}" <host> <<'PY'
import os, sys
from pathlib import Path
sys.path.insert(0, os.path.join(sys.argv[1], "scripts", "router"))
import hosts
found = hosts.find_snowflake_mcp_server(hosts.by_name(sys.argv[2]), Path.home(), Path.cwd(), os.environ)
if found:
print(f"CONFLICT: {found[0]} in {found[1]}")
sys.exit(1)
print("OK: No Snowflake MCP server found")
PY
This is the same check the plugin's prompt hook runs, so it reads every MCP config file the agent reads.
If exit code is 1 (conflict found), STOP IMMEDIATELY and tell the user:
Snowflake MCP Server detected in local mode. The local plugin path does not support this configuration. Keep the connection if you want remote mode and follow the remote setup guide; otherwise, disable it before local setup:
- Open the config file named in the CONFLICT line (Devin: run
devin mcp list, thendevin mcp disable <name>)- Remove or disable that Snowflake MCP server entry
- Restart your agent (Claude Code, Codex, Devin CLI, or Devin Desktop)
Then re-run this setup.
Do NOT proceed. Do NOT check CLI versions. Do NOT install anything. STOP HERE.
cortex binary is missingimport platform
print(platform.system()) # "Windows", "Darwin", or "Linux"
Windows (Command Prompt or PowerShell):
where cortex 2>nul && cortex --version || echo "cortex not installed"
where snow 2>nul && snow --version || echo "snow not installed"
macOS / Linux:
which cortex 2>/dev/null && cortex --version || echo "cortex not installed"
which snow 2>/dev/null && snow --version || echo "snow not installed"
The installer is bundled with the snowflake-ai-kit repo. Find and run it:
Step 2a — Find the installer:
macOS / Linux:
find ~ -maxdepth 4 -name "install.sh" -path "*/snowflake-ai-kit/*" 2>/dev/null | head -1
Windows (PowerShell):
Get-ChildItem -Path $HOME -Recurse -Depth 4 -Filter "install.ps1" -ErrorAction SilentlyContinue | Where-Object { $_.FullName -match "snowflake-ai-kit" } | Select-Object -First 1 -ExpandProperty FullName
Step 2b — Run the installer:
In Devin CLI or Devin Desktop, add --include-aim (Windows: -IncludeAim). It also installs the Snowflake AIM plugin (snowflake-migration), which Devin uses for database migrations. In Claude Code and Codex, run the installer without it.
If found (macOS/Linux):
bash /path/to/snowflake-ai-kit/install.sh
If found (Windows — look for install.ps1 in the same directory):
powershell -ExecutionPolicy Bypass -File /path/to/snowflake-ai-kit/install.ps1
If NOT found, install Cortex Code CLI directly:
macOS / Linux:
curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh
Windows (PowerShell):
irm https://ai.snowflake.com/static/cc-scripts/install.ps1 | iex
Or follow the official install guide: https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli
The installer handles Snowflake CLI, Cortex Code CLI, and connection verification.
Step 2c — Devin CLI or Devin Desktop only: make sure the Snowflake AIM plugin is installed. Do this even when Cortex Code CLI was already installed, and after a direct install. Check first:
cortex plugin list
If snowflake-migration isn't listed, install it:
cortex plugin install https://github.com/Snowflake-Labs/cortex-code-migrations/tree/main/plugin
Then, even if snowflake-migration was already listed, make sure SnowConvert AI (scai), which AIM needs, is installed. AIM normally installs it from a session-start hook, but routed Cortex sessions don't run that hook, so run the same script directly if scai --version fails:
macOS / Linux:
scai --version || bash ~/.snowflake/cortex/plugins/snowflake-migration/hooks/install-dependencies.sh
Windows (PowerShell):
scai --version; if ($LASTEXITCODE -ne 0) { powershell -ExecutionPolicy Bypass -File "$HOME\.snowflake\cortex\plugins\snowflake-migration\hooks\install-dependencies.ps1" }
It installs scai into ~/.local/bin (Windows: %LOCALAPPDATA%\snowconvertai\bin, which needs a new terminal to be on PATH). If either step fails, tell the user and continue: Cortex Code still works, and Cortex Code offers to install AIM the first time they start a migration. SnowConvert's terms and source drivers are set up when the first migration starts.
Windows:
where cortex && cortex --version
where snow && snow --version
macOS / Linux:
which cortex && cortex --version
which snow && snow --version
Both commands should return version numbers.
Check if a connection exists:
snow connection list
If no connections exist, prompt the user to create one:
snow connection add
This is interactive — the user will need to provide their Snowflake account URL, username, and authentication method.
After setup, the cortex-router skill should work. Tell the user to try their original Snowflake prompt again.
pip install snowflake-cortex-code or similar — that package does not existbash is not available, use the PowerShell installer (install.ps1)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
3 skills in this plugin
/cortex-routerRoutes Snowflake operations to the selected local CLI or remote MCP backend. Loaded by the prompt filter for requests such as 'show Snowflake warehouses', 'list Snowflake tables', 'check data quality', 'inspect governance', and 'analyze Snowflake queries'. Not for direct invocation or local file work; use $cortex-run for explicit delegation./cortex-runONLY load this skill when the user explicitly types $cortex-run, /cortex-run, or /snowflake-cortex-code:cortex-run (Devin CLI and Desktop). NEVER load this skill from auto-routing hooks or keyword matching. For auto-routed prompts, use snowflake-cortex-code:cortex-router instead.npx claudepluginhub snowflake-labs/snowflake-ai-kit --plugin snowflake-cortex-codeOther plugins' skills for the same job