Check Prerequisites
Verify all required tools are installed and guide installation of missing dependencies.
Prerequisites
None - this skill helps you install prerequisites!
Error Logging
Follow the Error Logging convention in AGENTS.md. Log file prefix:
routing-prerequisites.
Workflow
Step 1: Check All Prerequisites
Goal: Identify which tools are installed and which are missing
Actions:
Check which container runtimes are installed:
# Check Cortex Code CLI cortex --version 2>/dev/null && echo "Cortex Code: INSTALLED" || echo "Cortex Code: NOT FOUND" # Check Podman podman --version 2>/dev/null && echo "Podman: INSTALLED" || echo "Podman: NOT FOUND" # Check Docker (optional if Podman is installed) docker --version 2>/dev/null && echo "Docker: INSTALLED" || echo "Docker: NOT FOUND" # Check container runtime is running (Podman or Docker) podman info >/dev/null 2>&1 && echo "Podman Daemon: RUNNING" || docker info >/dev/null 2>&1 && echo "Docker Daemon: RUNNING" || echo "Container Runtime: NOT RUNNING" # Check Snowflake CLI snow --version 2>/dev/null && echo "Snowflake CLI: INSTALLED" || echo "Snowflake CLI: NOT FOUND" # Check Git git --version 2>/dev/null && echo "Git: INSTALLED" || echo "Git: NOT FOUND" # Check GitHub CLI (optional) gh --version 2>/dev/null && echo "GitHub CLI: INSTALLED" || echo "GitHub CLI: NOT FOUND (optional)"Check Snowflake CLI connections:
snow connection list 2>/dev/null || echo "No Snowflake connections configured"Present results to user in a summary table:
Prerequisite Status Required Cortex Code CLI ✅/❌ Yes Podman ✅/❌ Yes (or Docker) Docker ✅/❌ Yes (or Podman) Container Runtime ✅/❌ Yes Snowflake CLI ✅/❌ Yes Snowflake Connection ✅/❌ Yes Git ✅/❌ Yes GitHub CLI ✅/❌ No (optional) If all required prerequisites are installed: Inform user they are ready to proceed and skip to Verification section.
If any required prerequisites are missing: Proceed to Step 2.
Output: Prerequisites status summary
Step 2: Installation Wizard
Goal: Guide user through installing missing prerequisites
Actions:
Ask user which missing prerequisites they want to install now.
For each selected prerequisite, provide installation guidance:
Cortex Code CLI Installation
- Installation: See Cortex Code documentation
- Verify:
cortex --version
Container Runtime Installation (Podman or Docker)
Podman (recommended - no daemon required):
macOS:
brew install podman podman machine init podman machine startWindows: Download Podman Desktop: https://podman-desktop.io/downloads
Linux:
# Ubuntu/Debian sudo apt-get update sudo apt-get install podman # RHEL/CentOS/Fedora sudo dnf install podmanVerify:
podman --version && podman info
Docker (alternative if Podman is not available):
macOS:
brew install --cask dockerOr download Docker Desktop: https://docs.docker.com/desktop/install/mac-install/
Windows: Download Docker Desktop: https://docs.docker.com/desktop/install/windows-install/
Linux:
# Ubuntu/Debian sudo apt-get update sudo apt-get install docker.io sudo systemctl start docker sudo systemctl enable dockerPost-install: Start Docker Desktop (macOS/Windows) or the daemon (Linux)
Verify:
docker --version && docker info
Snowflake CLI Installation
All platforms:
pip install snowflake-cli-labsConfigure connection:
snow connection addFollow prompts to enter:
- Connection name (e.g.,
my-snowflake) - Account identifier
- Username
- Authentication method (password, SSO, key-pair)
- Connection name (e.g.,
Verify:
snow --version && snow connection list
Git Installation
macOS:
brew install gitOr install Xcode Command Line Tools:
xcode-select --installWindows: Download from https://git-scm.com/download/win
Linux:
# Ubuntu/Debian sudo apt-get install git # RHEL/CentOS sudo yum install gitConfigure:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"Verify:
git --version
GitHub CLI Installation (Optional)
macOS:
brew install ghWindows:
winget install --id GitHub.cliLinux:
# Ubuntu/Debian curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install ghAuthenticate:
gh auth loginVerify:
gh --version
Output: Installation commands executed or provided
Step 3: Verify Installation
Goal: Confirm all prerequisites are now installed correctly
Actions:
Re-run the checks from Step 1
If all required prerequisites pass:
- Congratulate user
- Inform them they can now run:
build routing solution
If any required prerequisites still missing:
- List the remaining missing items
- Offer to retry installation or provide manual installation links
Output: Final verification status
Stopping Points
- ✋ After Step 1: Review which prerequisites need to be installed
- ✋ After Step 2: Confirm installations completed without errors
Verification
After completion, all these commands should succeed:
cortex --version # Cortex Code CLI
podman --version # Podman (or docker --version for Docker)
podman info # Podman running (or docker info for Docker)
snow --version # Snowflake CLI
snow connection list # At least one connection configured
git --version # Git
Note: Either Podman or Docker is required - you don't need both.
Common Issues
Issue: brew command not found (macOS)
- Solution: Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Issue: Docker daemon not running
- Solution:
- macOS/Windows: Open Docker Desktop application
- Linux:
sudo systemctl start docker
Issue: Permission denied for Docker
- Solution: Add user to docker group:
sudo usermod -aG docker $USERthen log out and back in
Issue: pip command not found
- Solution: Install Python first, or use
pip3instead
Issue: snow CLI prints version update warnings
- Solution: Set
export SNOWFLAKE_CLI_NO_UPDATE_CHECK=1in your shell profile to suppress update check noise during builds
Issue: Snowflake connection fails
- Solution: Verify account identifier format (e.g.,
ACCOUNT.REGIONorORG-ACCOUNT)
Output
All prerequisites verified and installed. Environment ready for deploying Route Optimizer.