cortex-run

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

An explicitly invoked command for sending a prompt directly to Cortex Code, Snowflake's command-line coding assistant. It first checks that the Cortex command-line program is installed before forwarding the request.

In plain words
What is it for?
Use it when you specifically want Cortex Code to handle a Snowflake task, after confirming the command-line program is installed and working.
Why use it?
It gives the user a clear way to bypass automatic routing and choose Cortex Code deliberately. It also prevents work from continuing when the required command-line tool is unavailable.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

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-run
Any agent
npx skills add Snowflake-Labs/snowflake-ai-kit --skill cortex-run
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-run

README.md
[![agentmods](https://agentmods.dev/badge/skills/snowflake-labs/snowflake-ai-kit/cortex-run.svg)](https://agentmods.dev/skills/snowflake-labs/snowflake-ai-kit/cortex-run)
Your own site
<a href="https://agentmods.dev/skills/snowflake-labs/snowflake-ai-kit/cortex-run"><img src="https://agentmods.dev/badge/skills/snowflake-labs/snowflake-ai-kit/cortex-run.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.1 $0.00052 $0.01194
Opus 5 $0.00026 $0.00597
Sonnet 5 $0.00010 $0.00239
Haiku 4.5 $0.00005 $0.00119

Measured 5d ago against content hash 3cafe6938d7a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

cortex-run scanned grade C with 1 finding 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 5d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| **RW** | Data modifications, DDL | Destructive Bash (rm -rf, sudo) |
plugins/cortex-code/skills/cortex-run/SKILL.md · 146 lines

How it starts

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

Cortex Code (Explicit Invocation)

Send a prompt directly to Cortex Code CLI, bypassing the auto-routing keyword filter. Use this when the user explicitly wants Cortex Code to handle their request.

Prerequisites

Cortex Code CLI must be installed and on PATH:

which cortex && cortex --version

If cortex is not found, load the snowflake-cortex-code:cortex-setup skill to install it. Do NOT proceed without it.

Workflow

Step 1: Check Cortex CLI

This step is mandatory. Do it first, every time.

which cortex 2>/dev/null && cortex --version

If cortex is NOT found or the command fails:

  1. Tell the user: "Cortex Code CLI is not installed. Setting it up now."
  2. Load the snowflake-cortex-code:cortex-setup skill using the Skill tool.
  3. Follow its instructions to install the CLI.
  4. STOP here — do NOT proceed to Step 2 until the CLI is installed and working.

Step 2: Extract the User Prompt

The user's message after $cortex-run is the prompt to send. If the user typed only $cortex-run with no additional text, ask what they want to do in Snowflake.

Step 3: Choose Security Envelope

Pick the envelope based on what the operation needs:

Envelope Use when Blocks
RO Queries, reads, exploration Edit, Write, destructive Bash
RW Data modifications, DDL Destructive Bash (rm -rf, sudo)
RESEARCH Exploration + web access Edit, Write, destructive Bash
DEPLOY Full access needed Nothing

Default to RW unless the request is clearly read-only.

Step 4: Execute via Cortex Code

Run the prompt through the execution script:

python "${CLAUDE_PLUGIN_ROOT}/scripts/router/execute_cortex.py" \
  --prompt "USER_PROMPT_HERE" \
  --envelope "RW"

For read-only queries:

python "${CLAUDE_PLUGIN_ROOT}/scripts/router/execute_cortex.py" \
  --prompt "USER_PROMPT_HERE" \
  --envelope "RO"

To specify a Snowflake connection:

Read the full file on GitHub · 146 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. 5d ago First seen · 146 lines · 52 tokens per session scan C 3cafe6938d7a

Subscribe to this mod's changes

cortex-run is a skill published in the GitHub repository Snowflake-Labs/snowflake-ai-kit (37 stars, last pushed 23d ago), licensed Apache-2.0. It adds 52 tokens to every session and 1,194 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

cocoreview

CocoReview — structured code review with six-severity findings vocabulary, progressive disclosure architecture, and universal anti-pattern baseline. Invoked via $review [file] [--complexity] [--security] [--architecture] [--language ].

Snowflake-Labs/cocoplus · 57 tokens

pod-init

Initialize CocoPlus project bundle in the current directory. Creates .cocoplus/ directory structure, copies all templates, initializes AGENTS.md, project.md, flow.json, and creates the initial git commit. Run this once per project before using any other CocoPlus command.

Snowflake-Labs/cocoplus · 57 tokens

spec

Enter the Spec phase of CocoBrew. Guides the developer through structured requirements capture: goal, success criteria, constraints, personas involved, data sources, and deliverables. Writes spec.md to .cocoplus/lifecycle/ and creates a git commit.

Snowflake-Labs/cocoplus · 53 tokens

cocoharvest

Decompose an approved plan into parallel workstreams, assign specialist personas, classify stages as HITL or AFK (CocoLens), generate flow.json stages with checkpoints and dual-file state, and create per-stage prompt files. Includes adaptive parallelism, stall detection, shell identity injection, and consecutive…

Snowflake-Labs/cocoplus · 68 tokens

pull

Distill large context files (evaluation artifacts, schema dumps, query result sets, analysis outputs) into LLM-optimized dense form or human-readable narrative (--human). Default output is machine-dense; --human produces a prose summary for stakeholder consumption.

Snowflake-Labs/cocoplus · 52 tokens

cocoscout

Relevance-ranked context loading — Tier 2 async subagent (Haiku, <5s) that fires after Tier 1 deterministic checks in UserPromptSubmit. Injects ranked context from CocoGrove, CocoContext, Environment Inspector, Prompt Studio, and CocoDream.

Snowflake-Labs/cocoplus · 59 tokens