| 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
cortex
cortex -p "summarize README.md"
cortex --resume last
cortex -r <session_id>
cortex --connection <name>
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
cortex --help
cortex --version
cortex mcp list
cortex connections list
/help
/status
/model <name>
/sql <query>
/skill
/agents
/compact
/fork
/rewind
/diff
Configuration
Config directory: ~/.snowflake/cortex/
Key files:
settings.json -- Main settings
skills/ -- Global skills
agents/ -- Custom agent definitions
mcp.json -- MCP server config
Tips
- Use
@path/to/file to include file context
- Use
@file$10-50 to include specific lines
- Use
$skill-name to activate skills
- Use
#DB.SCHEMA.TABLE to reference Snowflake tables (auto-injects schema + sample rows)
- Use
!git status to run bash (output goes to agent)
- Use
/plan for risky operations
- Use
/compact when context gets long
- Use
/fork before experimental approaches
- Use
/rewind when the agent goes down a wrong path
- Use
Ctrl+B to background long-running bash commands
- Use
/agents to manage and view available subagents
For detailed documentation, load the specific reference file listed above.