Build and deploy Streamlit apps natively in Snowflake with production-ready templates. Covers project scaffolding (snowflake.yml, environment.yml), Snowpark session patterns, multi-page structure, and Marketplace publishing as Native Apps. Use when building data apps on Snowflake, deploying Streamlit in Snowflake (SiS), or publishing to Snowflake Marketplace. Prevents package channel errors, outdated Streamlit versions, and authentication issues.
/plugin marketplace add jezweb/claude-skills/plugin install jezweb-tooling-skills@jezweb/claude-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdreferences/authentication.mdreferences/available-packages.mdreferences/ci-cd.mdscripts/check-packages.sqltemplates-container-runtime/README.mdtemplates-container-runtime/requirements.txttemplates-native-app/README.mdtemplates-native-app/manifest.ymltemplates-native-app/setup.sqltemplates/common/utils.pytemplates/environment.ymltemplates/pages/data_explorer.pytemplates/snowflake.ymltemplates/streamlit_app.pyBuild and deploy Streamlit apps natively within Snowflake, including Marketplace publishing as Native Apps.
Copy the templates to your project:
# Create project directory
mkdir my-streamlit-app && cd my-streamlit-app
# Copy templates (Claude will provide these)
Update placeholders in snowflake.yml:
definition_version: 2
entities:
my_app:
type: streamlit
identifier: my_streamlit_app # ← Your app name
stage: my_app_stage # ← Your stage name
query_warehouse: my_warehouse # ← Your warehouse
main_file: streamlit_app.py
pages_dir: pages/
artifacts:
- common/
- environment.yml
# Deploy to Snowflake
snow streamlit deploy --replace
# Open in browser
snow streamlit deploy --replace --open
Use when:
Don't use when:
Snowflake offers two runtime options for Streamlit apps:
environment.yml with Snowflake Anaconda Channelrequirements.txt or pyproject.toml with PyPI packagesContainer Runtime Configuration:
CREATE STREAMLIT my_app
FROM '@my_stage/app_folder'
MAIN_FILE = 'streamlit_app.py'
RUNTIME_NAME = 'SYSTEM$ST_CONTAINER_RUNTIME_PY3_11'
COMPUTE_POOL = my_compute_pool
QUERY_WAREHOUSE = my_warehouse;
Key difference: Container runtime allows external PyPI packages - not limited to Snowflake Anaconda Channel.
See: Runtime Environments
Streamlit apps run under owner's rights (like stored procedures):
Security implications:
my-streamlit-app/
├── snowflake.yml # Project definition (required)
├── environment.yml # Package dependencies (required)
├── streamlit_app.py # Main entry point
├── pages/ # Multi-page apps
│ └── data_explorer.py
├── common/ # Shared utilities
│ └── utils.py
└── .gitignore
import streamlit as st
# Get Snowpark session (native SiS connection)
conn = st.connection("snowflake")
session = conn.session()
# Query data
df = session.sql("SELECT * FROM my_table LIMIT 100").to_pandas()
st.dataframe(df)
@st.cache_data(ttl=600) # Cache for 10 minutes
def load_data(query: str):
conn = st.connection("snowflake")
return conn.session().sql(query).to_pandas()
# Use cached function
df = load_data("SELECT * FROM large_table")
environment.yml (required format):
name: sf_env
channels:
- snowflake # REQUIRED - only supported channel
dependencies:
- streamlit=1.35.0 # Explicit version (default is old 1.22.0)
- pandas
- plotly
- altair=4.0 # Version 4.0 supported in SiS
- snowflake-snowpark-python
| Error | Cause | Prevention |
|---|---|---|
PackageNotFoundError | Using conda-forge or external channel | Use channels: - snowflake (or Container Runtime for PyPI) |
| Missing Streamlit features | Default version 1.22.0 | Explicitly set streamlit=1.35.0 (or use Container Runtime for 1.49+) |
ROOT_LOCATION deprecated | Old CLI syntax | Use Snowflake CLI 3.14.0+ with FROM source_location |
| Auth failures (2026+) | Password-only authentication | Use key-pair or OAuth (see references/authentication.md) |
| File upload fails | File >200MB | Keep uploads under 200MB limit |
| DataFrame display fails | Data >32MB | Paginate or limit data before display |
page_title not supported | SiS limitation | Don't use page_title, page_icon, or menu_items in st.set_page_config() |
| Custom component error | SiS limitation | Only components without external service calls work |
_snowflake module not found | Container Runtime | Use from snowflake.snowpark.context import get_active_session instead |
# Deploy and replace existing
snow streamlit deploy --replace
# Deploy and open in browser
snow streamlit deploy --replace --open
# Deploy specific entity (if multiple in snowflake.yml)
snow streamlit deploy my_app --replace
See references/ci-cd.md for GitHub Actions workflow template.
To publish your Streamlit app to Snowflake Marketplace:
templates-native-app/ templatesSee templates-native-app/README.md for complete workflow.
my-native-app/
├── manifest.yml # Native App manifest
├── setup.sql # Installation script
├── streamlit/
│ ├── environment.yml
│ ├── streamlit_app.py
│ └── pages/
└── README.md
Only packages from the Snowflake Anaconda Channel are available:
-- Query available packages
SELECT * FROM information_schema.packages
WHERE language = 'python'
ORDER BY package_name;
-- Search for specific package
SELECT * FROM information_schema.packages
WHERE language = 'python'
AND package_name ILIKE '%plotly%';
Common available packages:
Not available:
See: Snowpark Python Packages Explorer
st.dataframe)st.file_uploader.so files - Native compiled libraries unsupportedst.set_page_config - page_title, page_icon, menu_items not supportedst.bokeh_chart - Not supportedeval() blocked - CSP prevents unsafe JavaScript executionst.cache_data and st.cache_resource don't persist across usersPassword-only authentication is being deprecated:
| Milestone | Date | Requirement |
|---|---|---|
| Milestone 1 | Sept 2025 - Jan 2026 | MFA required for Snowsight users |
| Milestone 2 | May - July 2026 | All new users must use MFA |
| Milestone 3 | Aug - Oct 2026 | All users must use MFA or key-pair/OAuth |
Recommended authentication methods:
See references/authentication.md for implementation patterns.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.