cortex-run

cortex-run is a skill for Claude Code from Snowflake-Labs/snowflake-ai-kit. It costs 52 tokens per session (1,303 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 Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions Claude Code; $skill-name invocation.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

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

Good fit Use it when you specifically want Cortex Code to handle a Snowflake task, after confirming the command-line program is installed and working.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Snowflake-Labs/snowflake-ai-kit
Claude Code
/plugin install snowflake-cortex-code

Made for: Claude Code.

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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cortex-run

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.01303
Opus 5.5 $0.00021 $0.00521
Sonnet 5.5 $0.00010 $0.00261
Haiku 4.5 $0.00005 $0.00130

Measured 1mo ago against content hash 451f65cddef9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 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 (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:

Use the shared launcher in Bash (Git Bash on Windows). It prefers python3, accepts python only if it is Python 3, and never retries a failed script. On a configuration/policy error, STOP and report it; do not switch interpreters or bypass the plugin.

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

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. 1mo ago Changed · +5 lines 451f65cddef9
  2. 2mo 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 (42 stars, last pushed 3d ago), licensed Apache-2.0. It adds 52 tokens to every session and 1,303 once invoked, about $0.0002 per session on Opus 5.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

cortex-run compared with skills from other repositories

cortex-run next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cortex-runSnowflake-Labs/snowflake-ai-kitSkill423d agoApache-2.0C52Claude Code
cocoreviewSnowflake-Labs/cocoplusSkill7282d agoMITA57Claude Code
pod-initSnowflake-Labs/cocoplusSkill7282d agoMITA57Claude Code, Codex
cocoharvestSnowflake-Labs/cocoplusSkill7282d agoMITA68Claude Code
pullSnowflake-Labs/cocoplusSkill7282d agoMITA52Claude Code
shipSnowflake-Labs/cocoplusSkill7282d agoMITA41Claude Code, Codex
specSnowflake-Labs/cocoplusSkill7282d agoMITA53Claude Code, Codex