Cortex Skills
  • Skills Directory
  • Categories
  • Docs
Add SkillBrowse Skills
  1. Home
  2. Skills Directory
  3. Cortex Analyst
  4. cortex-code-guide
IntermediateCortex Analyst

cortex-code-guide

Complete reference guide for Cortex Code (CoCo) CLI.
Jump to Installation

Compatible with

Cortex

About this skill

Cortex Code Guide

Comprehensive reference for Cortex Code (CoCo) -- Snowflake's AI-powered coding assistant CLI.

Quick Reference

TopicFile
CLI & Slash CommandsCOMMANDS.md
Keyboard ShortcutsSHORTCUTS.md
ConfigurationCONFIGURATION.md
Skills SystemSKILLS.md
MCP IntegrationMCP.md
Hooks SystemHOOKS.md
Agents & Task SystemAGENTS.md
Snowflake-Native ToolsSNOWFLAKE.md
Session ManagementSESSIONS.md

Quick Start

cortex                              # Start interactive REPL
cortex -p "summarize README.md"     # Non-interactive mode
cortex --resume last                # Resume last session
cortex -r <session_id>              # Resume specific session
cortex --connection <name>          # Use specific Snowflake connection

Essential Shortcuts

ShortcutAction
EnterSubmit message
Ctrl+JInsert newline
Ctrl+CCancel/Exit
Shift+TabCycle modes
Ctrl+DOpen fullscreen todo view
Ctrl+BBackground bash process
Ctrl+OCycle display mode
@File completion
$Skill tagging
#Snowflake table
!Run bash command
/Slash commands
?Quick help

Operational Modes

ModeCommandDescription
Confirm Actions(default)Normal with permission checks
Plan Mode/plan or Ctrl+PReview actions before execution
Bypass Safeguards/bypassAuto-approve all tools (use with caution)

Cycle modes with Shift+Tab.

Common Commands

# CLI
cortex --help              # Show help
cortex --version           # Show version
cortex mcp list            # List MCP servers
cortex connections list    # List Snowflake connections

# Slash commands (in REPL)
/help                      # Show help
/status                    # Session status
/model <name>              # Switch model
/sql <query>               # Execute SQL
/skill                     # Manage skills
/agents                    # Manage agents
/compact                   # Summarize and compact context
/fork                      # Fork conversation
/rewind                    # Rewind to previous state
/diff                      # Fullscreen git diff viewer

Configuration

Config directory: ~/.snowflake/cortex/

Key files:

  • settings.json -- Main settings
  • skills/ -- Global skills
  • agents/ -- Custom agent definitions
  • mcp.json -- MCP server config

Tips

  1. Use @path/to/file to include file context
  2. Use @file$10-50 to include specific lines
  3. Use $skill-name to activate skills
  4. Use #DB.SCHEMA.TABLE to reference Snowflake tables (auto-injects schema + sample rows)
  5. Use !git status to run bash (output goes to agent)
  6. Use /plan for risky operations
  7. Use /compact when context gets long
  8. Use /fork before experimental approaches
  9. Use /rewind when the agent goes down a wrong path
  10. Use Ctrl+B to background long-running bash commands
  11. Use /agents to manage and view available subagents

Official Documentation

  • Cortex Code CLI docs: https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli

For detailed documentation, load the specific reference file listed above.

Installation

Install using the Cortex CLI:

bash
$cortex skill install cortex-code-guide

Requires Cortex CLI v2.0+. Install guide →

Repository Sources

Loading repository files...

SKILL.md Preview

SKILL.md
---
name: cortex-code-guide
description: "Complete reference guide for Cortex Code (CoCo) CLI. Use when: learning cortex features, understanding commands, troubleshooting setup, exploring Snowflake tools, managing sessions, configuring agents, keyboard shortcuts, MCP integration. Triggers: how to use cortex, cortex guide, cortex help, cortex commands, getting started, snowflake tools, #table syntax, subagents, sessions, resume, fork, rewind, compact, /agents, configuration."
---

# Cortex Code Guide

Comprehensive reference for **Cortex Code** (CoCo) -- Snowflake's AI-powered coding assistant CLI.

## Quick Reference

| Topic | File |
|-------|------|
| CLI & Slash Commands | `COMMANDS.md` |
| Keyboard Shortcuts | `SHORTCUTS.md` |
| Configuration | `CONFIGURATION.md` |
| Skills System | `SKILLS.md` |
| MCP Integration | `MCP.md` |
| Hooks System | `HOOKS.md` |
| Agents & Task System | `AGENTS.md` |
| Snowflake-Native Tools | `SNOWFLAKE.md` |
| Session Management | `SESSIONS.md` |


---

## Quick Start

```bash
cortex                              # Start interactive REPL
cortex -p "summarize README.md"     # Non-interactive mode
cortex --resume last                # Resume last session
cortex -r <session_id>              # Resume specific session
cortex --connection <name>          # Use specific Snowflake connection
```

## Essential Shortcuts

| Shortcut | Action |
|----------|--------|
| `Enter` | Submit message |
| `Ctrl+J` | Insert newline |
| `Ctrl+C` | Cancel/Exit |
| `Shift+Tab` | Cycle modes |
| `Ctrl+D` | Open fullscreen todo view |
| `Ctrl+B` | Background bash process |
| `Ctrl+O` | Cycle display mode |
| `@` | File completion |
| `$` | Skill tagging |
| `#` | Snowflake table |
| `!` | Run bash command |
| `/` | Slash commands |
| `?` | Quick help |

## Operational Modes

| Mode | Command | Description |
|------|---------|-------------|
| Confirm Actions | (default) | Normal with permission checks |
| Plan Mode | `/plan` or `Ctrl+P` | Review actions before execution |
| Bypass Safeguards | `/bypass` | Auto-approve all tools (use with caution) |

Cycle modes with `Shift+Tab`.

## Common Commands

```bash
# CLI
cortex --help              # Show help
cortex --version           # Show version
cortex mcp list            # List MCP servers
cortex connections list    # List Snowflake connections

# Slash commands (in REPL)
/help                      # Show help
/status                    # Session status
/model <name>              # Switch model
/sql <query>               # Execute SQL
/skill                     # Manage skills
/agents                    # Manage agents
/compact                   # Summarize and compact context
/fork                      # Fork conversation
/rewind                    # Rewind to previous state
/diff                      # Fullscreen git diff viewer
```

## Configuration

Config directory: `~/.snowflake/cortex/`

Key files:
- `settings.json` -- Main settings
- `skills/` -- Global skills
- `agents/` -- Custom agent definitions
- `mcp.json` -- MCP server config

## Tips

1. Use `@path/to/file` to include file context
2. Use `@file$10-50` to include specific lines
3. Use `$skill-name` to activate skills
4. Use `#DB.SCHEMA.TABLE` to reference Snowflake tables (auto-injects schema + sample rows)
5. Use `!git status` to run bash (output goes to agent)
6. Use `/plan` for risky operations
7. Use `/compact` when context gets long
8. Use `/fork` before experimental approaches
9. Use `/rewind` when the agent goes down a wrong path
10. Use `Ctrl+B` to background long-running bash commands
11. Use `/agents` to manage and view available subagents

---

## Official Documentation

- **Cortex Code CLI docs**: https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli

---

**For detailed documentation, load the specific reference file listed above.**

Tags

#cortex-code-guide

Related Skills

Browse all
v1.0.0

snowpark-connect

cortex-community
|
#snowpark-connect
Cortex
4465.0k
2 hours ago
v1.0.0

semantic-view

cortex-community
[REQUIRED] Use for ALL requests that mention: create, build, debug, fix, troubleshoot, optimize, improve, or analyze a semantic view — AND for requests about VQR suggestions, verified queries, verified query representations, or seeding/generating queries for a semantic view. This is the REQUIRED entry point - even if the request seems simple. DO NOT attempt to create, debug, or generate VQR suggestions for semantic views manually - always invoke this skill first. This skill guides users through creation, setup, auditing, VQR suggestion generation, and SQL generation debugging workflows for semantic views with Cortex Analyst.
#semantic-view
Cortex
4033.7k
2 hours ago
v1.0.0

internal-marketplace-org-listing

cortex-community
#data-products
Cortex
1664.4k
2 hours ago
v1.0.0

data-quality

cortex-community
trending
Schema-level data quality monitoring, table comparison, dataset popularity analysis, and ad-hoc column quality assessment using Snowflake Data Metric Functions (DMFs) and Access History. Use when user asks about: data quality, schema health, DMF results, quality score, trust my data, quality regression, quality trends, SLA alerting, data metric functions, failing metrics, quality issues, compare tables, data diff, validate migration, table comparison, popular tables, most used tables, unused data, dataset usage, table popularity, listing quality, listing health, listing freshness, provider data quality, consumer data quality, one-time quality check, quick quality scan, check data quality without DMFs, recommend monitors, what should I monitor, DQ coverage gaps, unmonitored tables, DMF coverage report, monitoring health, noisy monitors, silent monitors, misconfigured monitors, DMF cost optimization, investigate DQ incident, why did freshness drop, why did row count drop, correlate violation, multi-dimensional root cause, circuit breaker, pause pipeline on violation, halt bad data propagation, custom DMF, format validation DMF, email format check, value range check, referential integrity DMF, DMF expectations, set threshold, tune DMF threshold, DMF expectation management, attach DMFs, set up DMFs for first time, DMF setup wizard, accepted values, ACCEPTED_VALUES, validate column values, allowed values check, value in set, categorical validation.
#data-quality
Cortex
98313
2 hours ago

Details

Stars195
Installs3.9k
Authorcortex-community
Versionv1.0.0
Updated2 hours ago
LicenseMIT
View Repository
quick install
$ cortex skill install cortex-code-guide