Agent skill

Connecting Streamlit To Snowflake

by iusztinpaul in iusztinpaul/designing-real-world-ai-agents-workshop

Connecting Streamlit apps to Snowflake. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

Apache-2.0Auto-check passedDatabases

Install Connecting Streamlit To Snowflake

skills CLI
$ npx skills add iusztinpaul/designing-real-world-ai-agents-workshop --skill connecting-streamlit-to-snowflake -a claude-code

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

GitHub CLI
$ gh skill install iusztinpaul/designing-real-world-ai-agents-workshop connecting-streamlit-to-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/iusztinpaul/designing-real-world-ai-agents-workshop.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake .claude/skills/connecting-streamlit-to-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
connecting-streamlit-to-snowflake
GitHub stars
512
Token cost
~1.3k tokens
SKILL.md length
234 words
Files
1
Skills in repo
23
Repo updated
First seen
Licence
Apache-2.0

At a glance

Connecting Streamlit apps to Snowflake. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

  • Setting up database connections
  • SKILL.md covers Use st.connection, Caller's rights connection…, Cached queries and Configure with st.secrets, plus 6 more sections
  • Calls snow
  • Managing secrets

What it does

Connecting Streamlit To Snowflake is an agent skill from iusztinpaul/designing-real-world-ai-agents-workshop. Connecting Streamlit apps to Snowflake. Use when setting up database connections, managing secrets, or querying Snowflake from a Streamlit app.

Its SKILL.md is about 1.3k 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 Streamlit, Snowflake and Python. The repository describes itself as: Hands-on workshop: Build a multi-agent AI system from scratch — Deep Research Agent + Writing Workflow served as MCP servers. Includes code, slides, and video. The licence is Apache-2.0.

When your agent uses it

  • Setting up database connections
  • Managing secrets
  • Querying Snowflake from a Streamlit app

Example prompts

  • “/connecting-streamlit-to-snowflake”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit ea4f6e9. 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:

    • snow

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

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.streamlit.io

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Connecting Streamlit To Snowflake loads about 1.3k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 234 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 iusztinpaul/designing-real-world-ai-agents-workshop at commit ea4f6e9, republished under its Apache-2.0 licence (© iusztinpaul). 234 words, ~1,261 tokens.

Download SKILL.mdSave it as .claude/skills/connecting-streamlit-to-snowflake/SKILL.md (or your agent's skills folder).
name
connecting-streamlit-to-snowflake
description
Connecting Streamlit apps to Snowflake. Use when setting up database connections, managing secrets, or querying Snowflake from a Streamlit app.
license
Apache-2.0

Streamlit Snowflake connection

Connect your Streamlit app to Snowflake the right way.

Use st.connection

Always use st.connection("snowflake") instead of raw connectors.

python
import streamlit as st

conn = st.connection("snowflake")

# Query data
df = conn.query("SELECT * FROM my_table LIMIT 100")
st.dataframe(df)

Why st.connection:

  • Automatic connection pooling
  • Built-in caching
  • Handles reconnection
  • Works with st.secrets

Caller's rights connection (Streamlit 1.53+)

For apps running in Snowflake, use caller's rights to run queries with the viewer's permissions instead of the app owner's:

python
conn = st.connection("snowflake", type="snowflake-callers-rights")

This is useful when:

  • Different users should see different data based on their Snowflake roles
  • You want row-level security to apply based on the viewer
  • You don't want the app to have elevated permissions

Cached queries

Use the built-in ttl parameter to cache query results:

python
from datetime import timedelta

conn = st.connection("snowflake")

# Cache for 10 minutes
df = conn.query("SELECT * FROM metrics", ttl=timedelta(minutes=10))

# Cache for 1 hour
df = conn.query("SELECT * FROM reference_data", ttl=3600)

Configure with st.secrets

Store credentials in .streamlit/secrets.toml (never commit this file).

CRITICAL: Derive the account and host values from the user's Snowflake CLI connection config. Run snow connection list and use the exact values. A wrong account will redirect to the wrong login page.

toml
# .streamlit/secrets.toml
[connections.snowflake]
account = "ORGNAME-ACCTNAME"            # from `snow connection list`
host = "myaccount.snowflakecomputing.com"  # from `snow connection list` (include if present)
user = "your_user"
authenticator = "externalbrowser"
warehouse = "your_warehouse"
database = "your_database"
schema = "your_schema"

Add to .gitignore:

.streamlit/secrets.toml

Parameterized queries

Use parameters to prevent SQL injection:

python
conn = st.connection("snowflake")

# Safe: parameterized
df = conn.query(
    "SELECT * FROM users WHERE region = :region",
    params={"region": selected_region}
)

# UNSAFE: string formatting - don't do this
# df = conn.query(f"SELECT * FROM users WHERE region = '{selected_region}'")

Write data

Use the session for write operations:

python
conn = st.connection("snowflake")
session = conn.session()

# Write a dataframe
session.write_pandas(df, "MY_TABLE", auto_create_table=True)

# Execute statements
session.sql("INSERT INTO logs VALUES (:ts, :msg)", params={...}).collect()

Multiple connections

Define multiple connections in secrets:

toml
# .streamlit/secrets.toml
[connections.snowflake]
account = "prod_account"
# ... prod credentials

[connections.snowflake_staging]
account = "staging_account"
# ... staging credentials
python
prod_conn = st.connection("snowflake")
staging_conn = st.connection("snowflake_staging")

Chat with Cortex

Build a chat interface using Snowflake Cortex LLMs:

python
import streamlit as st
from snowflake.cortex import complete

st.set_page_config(page_title="AI Assistant", page_icon=":sparkles:")

if "messages" not in st.session_state:
    st.session_state.messages = []

for msg in st.session_state.messages:
    with st.chat_message(msg["role"]):
        st.write(msg["content"])

if prompt := st.chat_input("Ask anything"):
    st.session_state.messages.append({"role": "user", "content": prompt})

    with st.chat_message("user"):
        st.write(prompt)

    with st.chat_message("assistant"):
        response = st.write_stream(
            complete(
                "claude-3-5-sonnet",
                prompt,
                session=st.connection("snowflake").session(),
                stream=True,
            )
        )

    st.session_state.messages.append({"role": "assistant", "content": response})

See building-streamlit-chat-ui for more chat patterns (avatars, suggestions, history management).

Python 3.12+ dependency caveat

streamlit[snowflake] gates snowflake-connector-python on python_version < "3.12". On Python 3.12+, the connector is silently skipped and you get No module named 'snowflake' at runtime. Always add snowflake-connector-python>=3.3.0 as an explicit dependency in pyproject.toml:

toml
dependencies = [
    "snowflake-connector-python>=3.3.0",
    "streamlit[snowflake]>=1.54.0",
]

References

© iusztinpaul, Apache-2.0. 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 .agents/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake of iusztinpaul/designing-real-world-ai-agents-workshop.

Open the folder on GitHubat commit ea4f6e9

Compare with similar skills

Connecting Streamlit To 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.

Connecting Streamlit To Snowflake compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Connecting Streamlit To Snowflake this skilliusztinpaul/designing-real-world-ai-agents-workshop512—~1.3kAutomated safety check: PassApache-2.0
Snowflake Developmentsickn33/agentic-awesome-skills47k2 repos~2.1kAutomated safety check: PassMIT
Snowflake Developmentalirezarezvani/claude-skills28k—~3.2kAutomated safety check: PassMIT
Data Warehouse Experimentationrampstackco/claude-skills945—~7.3kAutomated safety check: PassMIT
Snowflake Snowpark DbtMindrally/skills271—~2.5kAutomated safety check: PassApache-2.0
Chdb SQLvemetric/vemetric3951 repos~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Snowflake Development

    sickn33/agentic-awesome-skills

    Comprehensive Snowflake development assistant covering SQL best practices, data pipeline design (Dynamic Tables, Streams, Tasks, Snowpipe), Cortex AI functions, Cortex Agents, Snowpark Python, dbt…

    47k GitHub starsUsed in 2 repos~2.1k tokens
    DatabasesAuto-check passed
  • Snowflake Development

    alirezarezvani/claude-skills

    A skill your agent uses when writing Snowflake SQL, building data pipelines with Dynamic Tables or Streams/Tasks, using Cortex AI functions, creating Cortex Agents, writing Snowpark Python…

    28k GitHub stars~3.2k tokensUpdated 1 mo ago
    DatabasesAuto-check passed
  • Data Warehouse Experimentation

    rampstackco/claude-skills

    Running experiments out of the data warehouse instead of via dedicated experiment platforms.

    945 GitHub stars~7.3k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Snowflake Snowpark Dbt

    Mindrally/skills

    Best practices for Snowpark Python (DataFrames, UDFs, UDTFs, stored procedures) and dbt with the dbt-snowflake adapter.

    271 GitHub stars~2.5k tokensUpdated 2 days ago
    Data & AnalyticsAuto-check passed
  • Chdb SQL

    vemetric/vemetric

    A skill your agent uses when the user wants to run SQL — especially analytical SQL — on local files (parquet/csv/json), URLs, S3 paths, or remote databases (Postgres, MySQL, MongoDB, ClickHouse…

    395 GitHub starsUsed in 1 repo~1.2k tokens
    DatabasesAuto-check passed
  • 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 11 days ago
    DatabasesAuto-check passed

More from iusztinpaul/designing-real-world-ai-agents-workshop

All 23 skills in this repo
  • Building Streamlit Custom Components V2

    iusztinpaul/designing-real-world-ai-agents-workshop

    Builds bidirectional Streamlit Custom Components v2 (CCv2) using st.components.v2.component.

    512 GitHub stars~2.8k tokensUpdated 4 mo ago
    Auto-check passed
  • Building Streamlit Chat UI

    iusztinpaul/designing-real-world-ai-agents-workshop

    Building chat interfaces in Streamlit. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

    512 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Building Streamlit Dashboards

    iusztinpaul/designing-real-world-ai-agents-workshop

    Building dashboards in Streamlit. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

    512 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Building Streamlit Multipage Apps

    iusztinpaul/designing-real-world-ai-agents-workshop

    Building multi-page Streamlit apps. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

    512 GitHub stars~1.6k tokensUpdated 4 mo ago
    Auto-check passed
  • Choosing Streamlit Selection Widgets

    iusztinpaul/designing-real-world-ai-agents-workshop

    Choosing the right Streamlit selection widget. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

    512 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Creating Streamlit Themes

    iusztinpaul/designing-real-world-ai-agents-workshop

    Creating and customizing Streamlit themes. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop.

    512 GitHub stars~3.7k tokensUpdated 4 mo ago
    Auto-check passed

Categories

Questions about Connecting Streamlit To Snowflake

What does Connecting Streamlit To Snowflake do?

Connecting Streamlit apps to Snowflake. An agent skill from iusztinpaul/designing-real-world-ai-agents-workshop. Connecting Streamlit To Snowflake is an agent skill from iusztinpaul/designing-real-world-ai-agents-workshop. Connecting Streamlit apps to Snowflake.

When should I use Connecting Streamlit To Snowflake?

Connecting Streamlit To Snowflake fits situations like: setting up database connections; managing secrets; querying Snowflake from a Streamlit app.

How do I install Connecting Streamlit To Snowflake in Claude Code?

Run `npx skills add iusztinpaul/designing-real-world-ai-agents-workshop --skill connecting-streamlit-to-snowflake -a claude-code`. Or copy the skill folder (.agents/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake in iusztinpaul/designing-real-world-ai-agents-workshop) into .claude/skills/connecting-streamlit-to-snowflake in your project. Claude Code loads it when a task matches its description.

How do I install Connecting Streamlit To Snowflake in Codex?

Run `npx skills add iusztinpaul/designing-real-world-ai-agents-workshop --skill connecting-streamlit-to-snowflake -a codex`. Or copy the skill folder (.agents/skills/developing-with-streamlit/skills/connecting-streamlit-to-snowflake in iusztinpaul/designing-real-world-ai-agents-workshop) into .agents/skills/connecting-streamlit-to-snowflake in your project. Codex loads it when a task matches its description.

Can I use Connecting Streamlit To 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 iusztinpaul/designing-real-world-ai-agents-workshop --skill connecting-streamlit-to-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/connecting-streamlit-to-snowflake, .gemini/skills/connecting-streamlit-to-snowflake, .github/skills/connecting-streamlit-to-snowflake and .opencode/skills/connecting-streamlit-to-snowflake in your project.

What does Connecting Streamlit To Snowflake need to run?

Going by SKILL.md and its folder, Connecting Streamlit To Snowflake needs the command-line tools its instructions call (snow). Our summary lists: Python 3.

Does Connecting Streamlit To Snowflake access the network?

SKILL.md names 1 domain. As links in the text: docs.streamlit.io. This is read from the text; nothing was executed.

Is Connecting Streamlit To Snowflake safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Connecting Streamlit To Snowflake use?

Connecting Streamlit To Snowflake is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Connecting Streamlit To Snowflake use?

About 1.3k tokens (SKILL.md is roughly 5k 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 Connecting Streamlit To Snowflake?

Skills that share tags, products or a category with Connecting Streamlit To Snowflake: Snowflake Development (sickn33/agentic-awesome-skills, 47k stars), Snowflake Development (alirezarezvani/claude-skills, 28k stars), Data Warehouse Experimentation (rampstackco/claude-skills, 945 stars) and Snowflake Snowpark Dbt (Mindrally/skills, 271 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Connecting Streamlit To Snowflake?

iusztinpaul (a GitHub user) maintains it in iusztinpaul/designing-real-world-ai-agents-workshop, which has 512 GitHub stars. The repository holds 23 skills in this directory. The repository was last updated on June 3, 2026.

Source: iusztinpaul/designing-real-world-ai-agents-workshop on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.