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.
/plugin marketplace add Snowflake-Labs/snowflake-ai-kit/plugin install snowflake-cortex-codeWrote 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.
[](https://agentmods.dev/skills/snowflake-labs/snowflake-ai-kit/cortex-run)<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.
<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>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.
| Model | Per session | Once 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 |
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) | 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:
- Tell the user: "Cortex Code CLI is not installed. Setting it up now."
- Load the
snowflake-cortex-code:cortex-setupskill using the Skill tool. - Follow its instructions to install the CLI.
- 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"
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.
- 1mo ago Changed · +5 lines 451f65cddef9
- 2mo ago First seen · 146 lines · 52 tokens per session scan C 3cafe6938d7a
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.
cortex-run compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| cortex-runSnowflake-Labs/snowflake-ai-kit | Skill | 42 | 3d ago | Apache-2.0 | C | 52 | Claude Code |
| cocoreviewSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 57 | Claude Code |
| pod-initSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 57 | Claude Code, Codex |
| cocoharvestSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 68 | Claude Code |
| pullSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 52 | Claude Code |
| shipSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 41 | Claude Code, Codex |
| specSnowflake-Labs/cocoplus | Skill | 728 | 2d ago | MIT | A | 53 | Claude Code, Codex |