cortex-setup

cortex-setup is a skill for Claude Code, Codex from Snowflake-Labs/snowflake-ai-kit. It costs 63 tokens per session (1,148 once invoked), scanned D, original, Apache-2.0.

An installation guide for Snowflake CLI and Cortex Code CLI, which are command-line tools for working with Snowflake and Cortex. It first checks for an existing Snowflake connection setup that could conflict with Cortex Code.

In plain words
What is it for?
Use it when the Snowflake or Cortex command-line tools are missing, need setup, or cannot be used because of a detected configuration conflict.
Why use it?
It helps avoid installing Cortex Code alongside an incompatible Snowflake MCP server setup. It also chooses the appropriate installation steps for the computer's operating system.

Skill for Claude CodeCodex

Part of the snowflake-cortex-code plugin — 3 skills, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/snowflake-labs/snowflake-ai-kit/cortex-setup
Any agent
npx skills add Snowflake-Labs/snowflake-ai-kit --skill cortex-setup
Clone the repo
git clone --depth 1 https://github.com/Snowflake-Labs/snowflake-ai-kit

Made for: Claude Code, Codex.

Or install snowflake-cortex-code, the plugin that ships this one along with the rest of its 3 skills, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cortex-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/snowflake-ai-kit/cortex-setup.svg)](https://agentmods.dev/skills/snowflake-labs/snowflake-ai-kit/cortex-setup)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/snowflake-ai-kit/cortex-setup"><img src="https://agentmods.dev/badge/skills/snowflake-labs/snowflake-ai-kit/cortex-setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00063 $0.01148
Opus 5 $0.00032 $0.00574
Sonnet 5 $0.00013 $0.00230
Haiku 4.5 $0.00006 $0.00115

Measured 4d ago against content hash 69f6c553d5da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

cortex-setup scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli | bash

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.claude/settings.json 2>/dev/null | python3 -c "

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli | bash
plugins/cortex-code/skills/cortex-setup/SKILL.md · 151 lines

How it starts

The opening of the file, as written. The whole thing — 151 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cortex Code Setup

Install Snowflake CLI (snow) and Cortex Code CLI (cortex) using the appropriate installer for the current OS.

Prerequisite — ALWAYS run this FIRST, unconditionally

Before doing ANYTHING else in this skill, you MUST run this check. This is not optional. Do not skip it even if the CLIs are already installed.

cat ~/.claude/settings.json 2>/dev/null | python3 -c "
import sys, json
try:
    settings = json.load(sys.stdin)
    servers = settings.get('mcpServers', {})
    for name, cfg in servers.items():
        cmd = cfg.get('command', '') + ' ' + ' '.join(cfg.get('args', []))
        if 'snowflake' in name.lower() or 'snowflake' in cmd.lower():
            print(f'CONFLICT: {name}')
            sys.exit(1)
except: pass
print('OK: No Snowflake MCP server found')
"

If exit code is 1 (conflict found), STOP IMMEDIATELY and tell the user:

⚠️ Snowflake MCP Server detected. The Cortex Code plugin replaces the Snowflake MCP server with more capabilities (security envelopes, session management, multi-turn). Please disable the MCP server before continuing:

  1. Open ~/.claude/settings.json
  2. Remove the Snowflake MCP server entry from "mcpServers"
  3. Restart Claude Code

Then re-run this setup.

Do NOT proceed. Do NOT check CLI versions. Do NOT install anything. STOP HERE.


When to use

  • Cortex Code CLI is not found on PATH
  • User asks to set up or install Cortex Code
  • Routing failed because cortex binary is missing

Steps

1. Detect OS and check current state

import 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"

Read the full file on GitHub · 151 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 151 lines · 63 tokens per session scan D 69f6c553d5da

Subscribe to this mod's changes

cortex-setup is a skill published in the GitHub repository Snowflake-Labs/snowflake-ai-kit (37 stars, last pushed 21d ago), licensed Apache-2.0. It adds 63 tokens to every session and 1,148 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories