Snowflake Industry Solutions
Install pre-built Snowflake solution accelerators from multiple industry repositories. Solutions are registered in registry.json alongside this skill.
Parse Arguments
Parse the action from $ARGUMENTS:
- If
$ARGUMENTSis empty → run List flow (all industries) - If
$ARGUMENTSmatches an industry name in registry.json → run List flow (filtered) - If
$ARGUMENTScontains a solution name (e.g.,predictive-maintenance) → run Install flow - If
$ARGUMENTScontains a solution name followed byteardown→ run Teardown flow - If
$ARGUMENTScontains a solution name followed bynext→ run Next Actions flow - Otherwise → show usage help
Step 1: Load the Registry
Read registry.json from the same directory as this skill file. The registry has this structure:
[
{
"industry": "<industry-id>",
"description": "<industry description>",
"repo": "<github-repo-url>",
"solutions": [
{"name": "<solution-name>", "description": "<short description>"}
]
}
]
Step 2: List Available Solutions
If no solution name was provided (or an industry name was provided as a filter):
- Read registry.json
- If an industry filter is specified, include only matching entries
- Present a table dynamically generated from registry.json in this format:
Available Solutions:
┌───┬──────────────────────┬───────────────┬─────────────────────────────┐
│ # │ Solution │ Industry │ Description │
├───┼──────────────────────┼───────────────┼─────────────────────────────┤
│ │ (from registry.json) │ │ │
└───┴──────────────────────┴───────────────┴─────────────────────────────┘
To install: $sf-solutions:<solution-name>
To remove: $sf-solutions:<solution-name> teardown
Filter by industry: $sf-solutions <industry-name>
STOP after listing. Do not install anything unless explicitly requested.
Step 3: Resolve Repository for a Solution
When a solution name is provided (e.g., $sf-solutions:predictive-maintenance):
- Search registry.json for the solution name across all industries
- Identify the matching industry entry and its
repoURL - If not found, show available solutions and stop
Store the resolved values:
$REPO_URL— the GitHub repository URL$INDUSTRY— the industry identifier$SOLUTION_NAME— the solution name
Step 4: Locate or Clone the Repository
Search for the repository locally using the Bash tool. The following logic is cross-platform:
import os, subprocess
from pathlib import Path
repo_dir_name = REPO_URL.rstrip("/").split("/")[-1].removesuffix(".git")
# Use a private per-user cache directory (not world-writable /tmp)
cache_dir = Path.home() / ".cache" / "sf-solutions"
cache_dir.mkdir(parents=True, exist_ok=True)
os.chmod(str(cache_dir), 0o700)
search_paths = [
Path.cwd() / repo_dir_name,
Path.cwd().parent / repo_dir_name,
Path.home() / repo_dir_name,
Path.home() / "projects" / repo_dir_name,
cache_dir / repo_dir_name,
]
repo_root = None
for d in search_paths:
if (d / "solutions").is_dir():
# Verify git remote matches expected REPO_URL before trusting
result = subprocess.run(
["git", "-C", str(d), "remote", "get-url", "origin"],
capture_output=True, text=True
)
if result.returncode == 0 and REPO_URL in result.stdout.strip():
repo_root = d
break
# If not a git repo or remote doesn't match, skip this path
if repo_root is None:
clone_target = cache_dir / repo_dir_name
result = subprocess.run(["git", "clone", REPO_URL, str(clone_target)], capture_output=True, text=True)
if result.returncode == 0:
repo_root = clone_target
If the clone fails (private repo, no git, no network), show a clear error:
Could not locate or clone the repository. Either:
- Clone it manually:
git clone <repo-url>- Or navigate to the directory containing it before invoking this skill.
STOP — do not proceed without the repository.
Once $REPO_ROOT is resolved, confirm the path with the user before executing any install or teardown steps:
Repository found at: <repo_root>
Remote: <verified remote URL>
Use this repository? (yes/no)
Store the resolved path as $REPO_ROOT for subsequent steps.
Step 5: Install a Solution
Read and follow references/install.md from this skill's directory. It contains the full install workflow (validate → manifest → account info → plan → confirm → execute → verify).
Step 6: Teardown a Solution
Read and follow references/teardown.md from this skill's directory. It contains the full teardown workflow (manifest → show removal plan → confirm → execute → verify).
Step 7: Next Actions
When next is specified (e.g., $sf-solutions:ltv-prediction next):
- Resolve the repository using Steps 3 and 4 (registry lookup + locate/clone)
- Read the next actions guide with the Read tool:
$REPO_ROOT/solutions/$SOLUTION_NAME/NEXT_ACTIONS.md
- If the file exists, present its contents to the user and answer any follow-up questions based on it
- If the file does not exist, suggest the user check the solution's README or manifest for guidance
Notes
- This skill requires
giton the user's machine for the clone fallback - Solutions are self-contained — each has its own SQL scripts and sample data
- The registry.json file is the source of truth for which solutions exist and where they live
- Each industry repository follows the same convention:
solutions/<name>/manifest.json - Each solution may include a
NEXT_ACTIONS.mdwith post-install guidance - To add a new solution: update registry.json with the solution entry under the appropriate industry