Agent skill

Connect Snowflake

by ai-analyst-lab in ai-analyst-lab/ai-analyst

Query the live/remote Snowflake warehouse instead of the local practice copy.

MITAuto-check: notesDatabases

Install Connect Snowflake

skills CLI
$ npx skills add ai-analyst-lab/ai-analyst --skill connect-snowflake -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ai-analyst-lab/ai-analyst connect-snowflake --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ai-analyst-lab/ai-analyst.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/connect-snowflake .claude/skills/connect-snowflake && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
connect-snowflake
GitHub stars
304
Token cost
~1.4k tokens
SKILL.md length
594 words
Files
1
Skills in repo
43
Repo updated
First seen
Licence
MIT

At a glance

Query the live/remote Snowflake warehouse instead of the local practice copy.

  • Works in 3 steps: Run through ConnectionManager with… → Verify you're actually on Snowflake (not… → Log every query
  • The user says connect to snowflake
  • SKILL.md covers Purpose, When to Use, How the repo decides local vs.… and Instructions, plus 2 more sections
  • Calls python3 and pip; needs SNOWFLAKE_TOKEN and SNOWFLAKE_PASSWORD

What it does

Connect Snowflake is an agent skill from ai-analyst-lab/ai-analyst. Query the live/remote Snowflake warehouse instead of the local practice copy. Use when the user says "connect to snowflake", "use the live data", "go remote", "query the warehouse", or asks "is this hitting snowflake or duckdb?". Assumes credentials already exist (first-time setup is /setup-snowflake); opts into remote via ConnectionManager and verifies the connection type before any query runs.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Data warehousing. It works with Snowflake and DuckDB. The repository describes itself as: AI Product Analyst — Claude Code-powered data analysis toolkit. The licence is MIT.

When your agent uses it

  • The user says connect to snowflake
  • Use the live data
  • Query the warehouse
  • Asks is this hitting snowflake

Example prompts

  • “connect to snowflake”
  • “use the live data”
  • “go remote”
  • “/connect-snowflake”

Requirements

  • Python 3
  • A credential in SNOWFLAKE_TOKEN

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Run through ConnectionManager with remote opted in
  2. Verify you're actually on Snowflake (not the DuckDB fallback)
  3. Log every query

What it can do on your machine

Read from SKILL.md and the folder at commit 52c0744. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • SNOWFLAKE_TOKEN
    • SNOWFLAKE_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Connect Snowflake loads about 1.4k tokens when it runs. Until then it costs about 104 tokens; SKILL.md has 594 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~104
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:20
    elds, stores the approved credential in `.env`, and verifies the native
  • NoteMentions a .env fileSKILL.md:50
    `ConnectionManager` auto-loads `.env`, expands the `$SNOWFLAKE_*` placeholders
  • NoteMentions a .env fileSKILL.md:84
    config** (`.env` / `connection_templates/`) — compare against what you expect,
  • NoteMentions a .env fileSKILL.md:105
    - A PAT lives in `.env` as `SNOWFLAKE_TOKEN`; a legacy password uses
  • NoteMentions a .env fileSKILL.md:107
    manifest. Never echo or cat `.env`.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ai-analyst-lab/ai-analyst at commit 52c0744, republished under its MIT licence (© ai-analyst-lab). 594 words, ~1,411 tokens.

Download SKILL.mdSave it as .claude/skills/connect-snowflake/SKILL.md (or your agent's skills folder).
name
connect-snowflake
description
Query the live/remote Snowflake warehouse instead of the local practice copy. Use when the user says "connect to snowflake", "use the live data", "go remote", "query the warehouse", or asks "is this hitting snowflake or duckdb?". Assumes credentials already exist (first-time setup is /setup-snowflake); opts into remote via ConnectionManager and verifies the connection type before any query runs.

Skill: Connect to Live Snowflake

Purpose

Run queries against the live Snowflake warehouse — not the local DuckDB practice copy. This is the runbook for "actually go remote." Credentials and config already exist; this skill is about opting into remote and verifying you landed there.

This is distinct from /setup-snowflake (the first-time wizard that collects the connection fields, stores the approved credential in .env, and verifies the native ConnectionManager session). Use this skill when the warehouse is already configured and you just want to query the live data through ConnectionManager.

When to Use

Trigger on any request to use the live/remote Snowflake data, e.g.:

  • "connect to snowflake", "query snowflake", "use the live data / live warehouse"
  • "run this against snowflake / the real data / production", "go remote"
  • "is this hitting snowflake or duckdb?", "query the live tables"
  • Any analysis where the user explicitly wants live warehouse numbers rather than the local DuckDB practice snapshot

How the repo decides local vs. remote

detect_active_source() (in helpers/data/data_helpers.py) defaults to the local DuckDB copy even though the active dataset declares connection_type: snowflake. It only goes remote when you opt in, via either:

  • Env flag (per-shell): AAP_USE_REMOTE=1 (also accepts true / yes), OR
  • Persisted flag: use_remote: true in .knowledge/active.yaml

Set use_remote: true in .knowledge/active.yaml for a persistent opt-in, and set AAP_USE_REMOTE=1 in the same shell command as python3 as a belt-and-suspenders guard. To confirm you actually landed on the warehouse (not the local fallback), call ConnectionManager.verify_remote(): it returns {"remote": bool, "identity": {account, warehouse, database, schema, version}, "reason": ...} from Snowflake's own session context functions. Treat remote: False as "you are NOT on Snowflake" and fix the reason before querying.

Instructions

Step 1 — Run through ConnectionManager with remote opted in

ConnectionManager auto-loads .env, expands the $SNOWFLAKE_* placeholders from the manifest, and lazy-connects. The export must be in the same Bash call as the python3 — shell env does not persist between separate tool calls.

bash
export AAP_USE_REMOTE=1 && python3 -W ignore -c "
import warnings; warnings.filterwarnings('ignore')
from helpers.data.connection_manager import ConnectionManager
mgr = ConnectionManager()
print('backend:', mgr.connection_type)   # MUST print 'snowflake'
events = mgr.table_reference('events')
df = mgr.query(f'SELECT event_type, COUNT(*) n FROM {events} GROUP BY event_type ORDER BY n DESC')
print(df.to_string(index=False))
mgr.close()
"

Use DATABASE.SCHEMA.TABLE for physical Snowflake sources, obtained from mgr.table_reference('orders') or the verified connection configuration. The data warehouse is compute, not part of this object name. Short names are valid Snowflake syntax but are rejected by the course analytical-query policy so execution and evaluation use the same explicit source. CTE aliases stay unqualified. On rejection, correct the reference and retry once; never change the intended source or disable the guard. Use Snowflake dialect: DATE_TRUNC('month', col), etc. — or get_dialect("snowflake") from helpers/data/sql_dialect.py.

Show full SKILL.md (203 more words)Show less
Step 2 — Verify you're actually on Snowflake (not the DuckDB fallback)

Before trusting any number, confirm:

  • mgr.connection_type returns snowflake (if it prints duckdb, the opt-in didn't take — re-check that export AAP_USE_REMOTE=1 ran in the same command).
  • A SELECT CURRENT_ACCOUNT(), CURRENT_WAREHOUSE(), CURRENT_DATABASE(), CURRENT_SCHEMA() returns the account, warehouse, database, and schema from your own connection config (.env / connection_templates/) — compare against what you expect, never assume.

Always tell the user which source is live.

Step 3 — Log every query

ConnectionManager.query() auto-logs at execution by default — that covers the requirement. If you query some other way (raw connector, MCP), log manually:

bash
python3 scripts/log_query.py --dataset {active} --agent ad-hoc \
  --purpose "..." --sql "..." --result "..."

Gotchas

  • export AAP_USE_REMOTE=1 and the python3 call must share one Bash command (&&), or the flag is lost and you silently get DuckDB.
  • Read .knowledge/datasets/{active}/quirks.md before trusting edge columns.
  • Ignore the LibreSSL / urllib3 / NotOpenSSL warnings — harmless. Suppress with -W ignore + warnings.filterwarnings('ignore') as shown.
  • Requires snowflake-connector-python (pip install -e ".[warehouses]"; see the /setup-snowflake prerequisite).
  • A PAT lives in .env as SNOWFLAKE_TOKEN; a legacy password uses SNOWFLAKE_PASSWORD. Account, user, warehouse, database, schema, and role live in the dataset manifest. Never echo or cat .env.

To go back to local DuckDB

Unset the opt-in: unset AAP_USE_REMOTE for the shell, and/or set use_remote: false in .knowledge/active.yaml. connection_type will then report duckdb.

© ai-analyst-lab, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/connect-snowflake of ai-analyst-lab/ai-analyst.

Open the folder on GitHubat commit 52c0744

Compare with similar skills

Connect Snowflake next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Connect Snowflake compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Connect Snowflake this skillai-analyst-lab/ai-analyst304—~1.4kAutomated safety check: NotesMIT
Ade Bench Cross DB Tasksdbt-labs/ade-bench125—~2kAutomated safety check: PassApache-2.0
Rocky Configrocky-data/rocky304—~6.9kAutomated safety check: PassApache-2.0
Webapp Buildersidequery/sidemantic129—~5.5kAutomated safety check: PassAGPL-3.0
Modelersidequery/sidemantic129—~4.2kAutomated safety check: PassApache-2.0
Altimate Data Warehouse DelegateAltimateAI/data-engineering-skills128—~1.4kAutomated safety check: PassMIT

Similar skills

  • Ade Bench Cross DB Tasks

    dbt-labs/ade-bench

    Official

    A skill your agent uses when authoring or debugging ade-bench tasks that must run on both DuckDB and Snowflake, including shared project migrations, setup patches, and solution patches

    125 GitHub stars~2k tokensUpdated 9 days ago
    DatabasesAuto-check passed
  • Rocky Config

    rocky-data/rocky

    Canonical rocky.toml authoring reference. An agent skill from rocky-data/rocky.

    304 GitHub stars~6.9k tokensUpdated today
    DatabasesAuto-check passed
  • Webapp Builder

    sidequery/sidemantic

    Build interactive analytics webapps, demos, dashboards, or embedded app surfaces from Sidemantic semantic models using copyable component primitives and deterministic query inspection.

    129 GitHub stars~5.5k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Modeler

    sidequery/sidemantic

    Build, validate, and manage semantic models using Sidemantic.

    129 GitHub stars~4.2k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Altimate Data Warehouse Delegate

    AltimateAI/data-engineering-skills

    Delegates dbt and warehouse tasks such as lineage, migrations and cost attribution to the altimate-code CLI agent and relays its answer back.

    128 GitHub stars~1.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated 2 days ago
    DatabasesAuto-check passed

More from ai-analyst-lab/ai-analyst

All 43 skills in this repo
  • Always Compare

    ai-analyst-lab/ai-analyst

    Never present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available.

    304 GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed
  • Archaeology

    ai-analyst-lab/ai-analyst

    Retrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused.

    304 GitHub stars~1.3k tokensUpdated 9 days ago
    Auto-check passed
  • Archive Analysis

    ai-analyst-lab/ai-analyst

    Save completed analyses to the knowledge system's analysis archive for future reference.

    304 GitHub stars~2.7k tokensUpdated 9 days ago
    Auto-check passed
  • Auth Preflight

    ai-analyst-lab/ai-analyst

    Verify Google Workspace MCP authentication at the start of any session that needs Google APIs (Docs, Slides, Drive).

    304 GitHub stars~3.1k tokensUpdated 9 days ago
    Auto-check passed
  • Causal

    ai-analyst-lab/ai-analyst

    Causal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats.

    304 GitHub stars~1.8k tokensUpdated 9 days ago
    Auto-check passed
  • Chart To Drive

    ai-analyst-lab/ai-analyst

    Standardized workflow for uploading local chart PNGs to Google Drive and making them available for insertion into Google Docs and Slides.

    304 GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed

Works with

Categories

Questions about Connect Snowflake

What does Connect Snowflake do?

Query the live/remote Snowflake warehouse instead of the local practice copy. Connect Snowflake is an agent skill from ai-analyst-lab/ai-analyst. Query the live/remote Snowflake warehouse instead of the local practice copy.

When should I use Connect Snowflake?

Connect Snowflake fits situations like: the user says connect to snowflake; use the live data; query the warehouse; asks is this hitting snowflake.

How do I install Connect Snowflake in Claude Code?

Run `npx skills add ai-analyst-lab/ai-analyst --skill connect-snowflake -a claude-code`. Or copy the skill folder (.claude/skills/connect-snowflake in ai-analyst-lab/ai-analyst) into .claude/skills/connect-snowflake in your project. Claude Code loads it when a task matches its description.

How do I install Connect Snowflake in Codex?

Run `npx skills add ai-analyst-lab/ai-analyst --skill connect-snowflake -a codex`. Or copy the skill folder (.claude/skills/connect-snowflake in ai-analyst-lab/ai-analyst) into .agents/skills/connect-snowflake in your project. Codex loads it when a task matches its description.

Can I use Connect Snowflake in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ai-analyst-lab/ai-analyst --skill connect-snowflake -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/connect-snowflake, .gemini/skills/connect-snowflake, .github/skills/connect-snowflake and .opencode/skills/connect-snowflake in your project.

What does Connect Snowflake need to run?

Going by SKILL.md and its folder, Connect Snowflake needs the command-line tools its instructions call (python3 and pip) and credentials named SNOWFLAKE_TOKEN and SNOWFLAKE_PASSWORD. Our summary lists: Python 3; A credential in SNOWFLAKE_TOKEN.

Does Connect Snowflake access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Connect Snowflake safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Connect Snowflake use?

Connect Snowflake is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Connect Snowflake use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Connect Snowflake?

Skills that share tags, products or a category with Connect Snowflake: Ade Bench Cross DB Tasks (dbt-labs/ade-bench, 125 stars), Rocky Config (rocky-data/rocky, 304 stars), Webapp Builder (sidequery/sidemantic, 129 stars) and Modeler (sidequery/sidemantic, 129 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Connect Snowflake?

ai-analyst-lab (a GitHub organization) maintains it in ai-analyst-lab/ai-analyst, which has 304 GitHub stars. The repository holds 43 skills in this directory. The repository was last updated on September 30, 2026.

Source: ai-analyst-lab/ai-analyst on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.