cortex-code
Routes Snowflake-related operations to Cortex Code CLI for specialized Snowflake expertise.
Skill by Snowflake Integration Team
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/kilo-org-cortex-code
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops, data, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cortex-code
What's inside
- Skill name
cortex-code- Description
- Routes Snowflake-related operations to Cortex Code CLI for specialized Snowflake expertise. Use when user asks about Snowflake databases, data warehouses, SQL queries on Snowflake, Cortex AI features, Snowpark, dynamic tables, data governance in Snowflake, Snowflake security, or mentions "Cortex" explicitly. Do NOT use for general programming, local file operations, non-Snowflake databases, web development, or infrastructure tasks unrelated to Snowflake.
- License
- Apache-2.0
- Metadata
- author: Snowflake Integration Team · version: 1.0.0 · category: data · compatibility: Requires Cortex Code CLI installed and configured
- Instructions
- 472 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Instructions read files in your home folder (~/.ssh, ~/.aws…)
Files (19)
- LICENSE
- SKILL.md
- config.yaml.example
- cortex-snowflake-routing.mdc
- local.patch
- discover_cortex.py · scripts/
- execute_cortex.py · scripts/
- predict_tools.py · scripts/
- read_cortex_sessions.py · scripts/
- route_request.py · scripts/
- security_wrapper.py · scripts/
- __init__.py · security/
- approval_handler.py · security/
- audit_logger.py · security/
- cache_manager.py · security/
- config_manager.py · security/
- default_policy.yaml · security/
- default_policy.yaml · security/policies/
- prompt_sanitizer.py · security/
SKILL.md (first lines)
# Cortex Code Integration Skill ## Prerequisite This marketplace skill is already installed; do not install or replace skill instructions dynamically. Cortex Code CLI must be installed and configured from the official Snowflake documentation. Verify the reviewed installation with: ```bash which cortex ``` This skill enables your coding agent to leverage Cortex Code's specialized Snowflake expertise by intelligently routing Snowflake-related operations to Cortex Code CLI in headless mode. ## Architecture Overview **Routing Principle**: ONLY Snowflake operations → Cortex Code. Everything else → your coding agent. **Key Components**: - Dynamic skill discovery at session initialization - LLM-based semantic routing (not keyword matching) - Security wrapper with approval modes (prompt/auto/envelope_only) - Stateless Cortex execution with context enrichment - Hybrid memory management - Audit logging for compliance ## Security The skill includes a security wrapper around Cortex execution with three approval modes: ### Approval Modes 1. **prompt** (default): High security - User shown approval prompt with predicted tools and confidence - User must approve before execution - No audit logging required - Best for: Interactive sessions, untrusted prompts, production 2. **auto**: Medium security - All operations auto-approved - Mandatory audit logging - Envelopes still enforced - Best for: Automated workflows, trusted environments 3. **envelope_only**: Medium security - No tool prediction (faster) - Auto-approved with audit logging - Relies on envelope blocklist only - Best for: Trusted environments, low latency needs **Configuration**: Set in `config.yaml` in the skill's install directory, or via organization policy. > **IMPORTANT — `config.yaml` is optional.** The skill ships only `config.yaml.example` as a template. If no `config.yaml` exists, the Python scripts apply safe defaults (`approval_mode: prompt`, `default_envelope: RO`). **Do not search, glob, or `ls` for `config.yaml` before executing** — `ConfigManager` handles this internally. Only read/create `config.yaml` if the user explicitly asks to change settings. ### Built-in Protections - **Prompt Sanitization**: Automatic PII removal and injection detection - **Credential Blocking**: Prevents routing when credential paths detected - **Secure Caching**: SHA256-validated cache in `~/.cache/cortex-skill/` - **Audit Logging**: Structured JSONL logs (mandatory for auto/envelope_only) - **Organization Policy**: Enterprise override via `~/.snowflake/cortex/agent-skill-policy.yaml` ## Fast Path for Repeat Queries **Session state is cached — do not re-run initialization steps on every query.** Skip the following steps if they've already run in the current session: - `discover_cortex.py` — output cached to `~/.cache/cortex-skill/cortex-capabilities.json` - `route_request.py` — for obvious Snowflake queries (user says "Snowflake", "Cortex", "databases", "warehouse", etc.), you can skip routing and go straight to execution - `cortex connections list` — the active connection doesn't change within a session; reuse it - Any `config.yaml` / org-policy inspection — `ConfigManager` handles this (see note above) **Minimal flow for a follow-up Snowflake query** (after the first query in a session): 1. (If `approval_mode: prompt`) ask user for approval 2. Call `execute_cortex.py` with the enriched prompt and envelope 3. Return results That's it. Three steps — no re-discovery, no re-routing, no config inspection. ## Session Initialization When this skill is first loaded: ### Step 1: Discover Cortex Capabilities ```bash PYTHON=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || echo python3) $PYTHON scripts/discover_cortex.py ``` This script: 1. Runs `cortex skill list` to enumerate all available Cortex skills 2. Reads each skill's SKILL.md frontmatter and trigger patterns 3. Caches capabilities with `CacheManager` in the configured cache directory 4. Returns structured data about what Cortex can handle Expected output: JSON mapping of skill names to their trigger patterns and capabilities. ### Step 2: Load Routing Context The discovered capabilities are loaded into memory to inform routing decisions throughout the session. ## Workflow: Handling User Requests ### Step 1: Analyze Request with LLM-Based Routing Before taking any action, analyze the user's request: ```bash PYTHON=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || echo python3) $PYTHON scripts/route_request.py --prompt "USER_PROMPT_HERE" ``` This script: 1. Loads Cortex capabilities from cache 2. Uses LLM reasoning to classify the request 3. Returns routing decision with confidence score **Routing Logic**: - **Route to Cortex** if request involves: - Snowflake databases, warehouses, schemas, tables - SQL queries specifically for Snowflake - Cortex AI features (Cortex Search, Cortex Analyst, ML functions)
From Kilo-Org/kilo-marketplace, Apache-2.0.
More from Kilo-Org/kilo-marketplace
- 0.795score
dbt-analytics-engineering
dbt-labs
Builds and modifies dbt models, writes SQL transformations using ref() and source(), creates tests, and validates results with dbt show.
SkillAFreshness: A★ 195Claude Code +9 - 0.795score
dynamic-tables-tutorial
Snowflake
Interactive tutorial that teaches Snowflake Dynamic Tables hands-on.
SkillAFreshness: A★ 195Claude Code +9 - 0.795score
database-redshift
christopher huffman
Amazon Redshift expert.
SkillAFreshness: A★ 195Claude Code +9 - 0.791score
gcp-event-driven-architecture-review
github: Raishin
Review GCP Pub/Sub, Eventarc, Cloud Tasks, Cloud Scheduler, and Workflows designs — dead-letter topics, message ordering, idempotency, fan-out blast radius…
SkillAFreshness: A★ 195Claude Code +9 - 0.791score
jupyter-notebook
Kilo
Use whenever the user works with Jupyter notebooks (`.ipynb`), including creating, inspecting, editing, executing, or visualizing notebook content for…
SkillAFreshness: A★ 195Claude Code +9 - 0.789score
dbt
dbt-labs
Skills for analytics engineering with dbt - building models, writing tests, querying the semantic layer, troubleshooting jobs, and more.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
prefect
terminal-skills
Prefect is a modern workflow orchestration framework for Python data pipelines.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
dagster
terminal-skills
Dagster is a data pipeline orchestrator built around the concept of software-defined assets.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
apache-arrow
terminal-skills
Expert guidance for Apache Arrow, the cross-language columnar memory format for analytics workloads.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
data-investigation
Pedro / Kilo Code
A workflow for conducting rigorous, reproducible data investigations and ad-hoc analyses.
SkillAFreshness: A★ 195Claude Code +9 - 0.786score
cassandra
terminal-skills
Apache Cassandra is a distributed NoSQL database designed for high availability and linear scalability.
SkillAFreshness: A★ 195Claude Code +9 - 0.783score
dbt-migration
dbt-labs
Skills for migrating dbt projects - moving from dbt Core to the Fusion engine or across data platforms.
SkillAFreshness: A★ 195Claude Code +9
Signals
- Stars
- 195
- Forks
- 328
- Open issues
- 18
- Last commit (this folder)
- Jun 24, 2026 (4 months ago)
- Last release
- Sep 28, 2026 (29 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- Apache-2.0
- Repository
- github.com/Kilo-Org/kilo-marketplace
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Cite this page
cortex-code skill. Agent Mart. https://agentmart.dev/skills/kilo-org-cortex-code (last updated 2026-10-24)