/snowflake-pack:snowflake-debug-bundlefrom snowflake-pack
Collects Snowflake diagnostic evidence for support tickets, including query history, session info, and warehouse load data.
Ships in snowflake-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Collect diagnostic information from Snowflake's ACCOUNT_USAGE views, QUERY_HISTORY, and driver logs for support tickets and troubleshooting.
SNOWFLAKE.ACCOUNT_USAGE schema (typically ACCOUNTADMIN)-- Find the problematic query by ID
SELECT query_id, query_text, execution_status, error_code, error_message,
start_time, end_time, total_elapsed_time / 1000 AS elapsed_seconds,
bytes_scanned, rows_produced, compilation_time, execution_time,
warehouse_name, warehouse_size
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE query_id = '<paste-query-id-here>';
-- Recent failed queries
SELECT query_id, query_text, error_code, error_message,
start_time, user_name, role_name, warehouse_name
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE execution_status = 'FAIL'
AND start_time >= DATEADD(hours, -24, CURRENT_TIMESTAMP())
ORDER BY start_time DESC
LIMIT 20;
-- Slow queries (> 60 seconds)
SELECT query_id, query_text, total_elapsed_time / 1000 AS seconds,
bytes_scanned / 1e9 AS gb_scanned, partitions_scanned, partitions_total,
warehouse_name, warehouse_size
FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY
WHERE total_elapsed_time > 60000
AND start_time >= DATEADD(hours, -24, CURRENT_TIMESTAMP())
ORDER BY total_elapsed_time DESC
LIMIT 10;
-- Active sessions
SELECT session_id, user_name, created_on,
client_application_id, client_environment
FROM TABLE(INFORMATION_SCHEMA.SESSIONS())
ORDER BY created_on DESC;
-- Login history (auth failures)
SELECT event_timestamp, user_name, client_ip, reported_client_type,
error_code, error_message, is_success
FROM SNOWFLAKE.ACCOUNT_USAGE.LOGIN_HISTORY
WHERE event_timestamp >= DATEADD(hours, -24, CURRENT_TIMESTAMP())
AND is_success = 'NO'
ORDER BY event_timestamp DESC;
-- Warehouse load (queued queries = undersized)
SELECT warehouse_name, start_time,
avg_running, avg_queued_load, avg_queued_provisioning, avg_blocked
FROM TABLE(INFORMATION_SCHEMA.WAREHOUSE_LOAD_HISTORY(
DATE_RANGE_START => DATEADD(hours, -4, CURRENT_TIMESTAMP())
))
ORDER BY start_time DESC;
-- Credit consumption by warehouse
SELECT warehouse_name, SUM(credits_used) AS credits,
SUM(credits_used_compute) AS compute_credits,
SUM(credits_used_cloud_services) AS cloud_credits
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= DATEADD(days, -7, CURRENT_TIMESTAMP())
GROUP BY warehouse_name
ORDER BY credits DESC;
#!/bin/bash
# snowflake-debug-bundle.sh
set -euo pipefail
BUNDLE_DIR="snowflake-debug-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BUNDLE_DIR"
echo "=== Snowflake Debug Bundle ===" > "$BUNDLE_DIR/summary.txt"
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$BUNDLE_DIR/summary.txt"
# Environment info
echo "--- Environment ---" >> "$BUNDLE_DIR/summary.txt"
node --version >> "$BUNDLE_DIR/summary.txt" 2>&1 || true
python3 --version >> "$BUNDLE_DIR/summary.txt" 2>&1 || true
echo "SNOWFLAKE_ACCOUNT: ${SNOWFLAKE_ACCOUNT:-NOT SET}" >> "$BUNDLE_DIR/summary.txt"
echo "SNOWFLAKE_WAREHOUSE: ${SNOWFLAKE_WAREHOUSE:-NOT SET}" >> "$BUNDLE_DIR/summary.txt"
# Driver versions
echo "--- Driver Versions ---" >> "$BUNDLE_DIR/summary.txt"
npm list snowflake-sdk 2>/dev/null >> "$BUNDLE_DIR/summary.txt" || echo "Node driver: N/A" >> "$BUNDLE_DIR/summary.txt"
pip show snowflake-connector-python 2>/dev/null | grep -E "Name|Version" >> "$BUNDLE_DIR/summary.txt" || echo "Python connector: N/A" >> "$BUNDLE_DIR/summary.txt"
# Recent application logs (redacted)
if [ -f "logs/app.log" ]; then
grep -i "snowflake\|error\|timeout\|connection" logs/app.log 2>/dev/null \
| tail -100 \
| sed -E 's/(password|token|key)=[^ ]*/\1=***REDACTED***/gi' \
> "$BUNDLE_DIR/app-logs-redacted.txt"
fi
# Configuration (redacted)
if [ -f ".env" ]; then
sed 's/=.*/=***REDACTED***/' .env > "$BUNDLE_DIR/config-redacted.txt"
fi
# Network test
echo "--- Connectivity ---" >> "$BUNDLE_DIR/summary.txt"
curl -s -o /dev/null -w "Status: %{http_code}, Time: %{time_total}s\n" \
"https://${SNOWFLAKE_ACCOUNT:-unknown}.snowflakecomputing.com/" \
>> "$BUNDLE_DIR/summary.txt" 2>&1 || echo "Connectivity test failed" >> "$BUNDLE_DIR/summary.txt"
tar -czf "$BUNDLE_DIR.tar.gz" "$BUNDLE_DIR"
rm -rf "$BUNDLE_DIR"
echo "Bundle created: $BUNDLE_DIR.tar.gz"
QUERY_HISTORYALWAYS REDACT: passwords, private keys, OAuth tokens, PII SAFE TO INCLUDE: error codes, query IDs, query text (if no PII), timestamps, warehouse names
| Item | Purpose | Source |
|---|---|---|
| Query ID | Pinpoint exact failure | QUERY_HISTORY |
| Error code | Classify issue type | Error message |
| Warehouse load | Identify resource contention | WAREHOUSE_LOAD_HISTORY |
| Login history | Auth failure pattern | LOGIN_HISTORY |
| Driver version | Version-specific bugs | npm list / pip show |
For concurrency and warehouse sizing, see snowflake-rate-limits.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flight505/skill-forge --plugin snowflake-pack30 skills in this plugin
/snowflake-advanced-troubleshootingApply advanced Snowflake debugging with query profiling, spill analysis,
lock contention, and performance deep-dives using ACCOUNT_USAGE views.
Use when standard troubleshooting fails, investigating slow queries,
or diagnosing warehouse performance issues.
Trigger with phrases like "snowflake hard bug", "snowflake slow query debug",
"snowflake query profile", "snowflake spilling", "snowflake deep debug".
/snowflake-architecture-variantsChoose and implement Snowflake architecture blueprints: data lakehouse, data mesh,
data sharing, and Snowpark-native patterns for different scales.
Use when designing Snowflake data platforms, choosing between architectures,
or implementing data sharing and Snowpark patterns.
Trigger with phrases like "snowflake architecture", "snowflake lakehouse",
"snowflake data mesh", "snowflake data sharing", "snowflake Snowpark".
/snowflake-ci-integrationConfigure Snowflake CI/CD with GitHub Actions, SchemaChange, and Terraform.
Use when setting up automated schema migrations, CI pipelines for Snowflake,
or integrating SchemaChange/Terraform into your deployment workflow.
Trigger with phrases like "snowflake CI", "snowflake GitHub Actions",
"snowflake SchemaChange", "snowflake terraform", "snowflake CI/CD".
/snowflake-common-errorsDiagnose and fix common Snowflake errors and SQL compilation failures.
Use when encountering Snowflake error codes, failed queries,
authentication issues, or warehouse/connection problems.
Trigger with phrases like "snowflake error", "fix snowflake",
"snowflake not working", "snowflake SQL error", "snowflake 002003".
/snowflake-core-workflow-aExecute Snowflake primary workflow: data loading via stages and COPY INTO.
Use when loading data from S3/GCS/Azure into Snowflake tables,
setting up Snowpipe for continuous ingestion, or bulk loading files.
Trigger with phrases like "snowflake load data", "snowflake COPY INTO",
"snowflake stage", "snowflake ingest", "snowflake S3 load", "snowpipe".
/snowflake-core-workflow-bExecute Snowflake data transformation with streams, tasks, and dynamic tables.
Use when building ELT pipelines, scheduling transformations,
or implementing change data capture with Snowflake streams.
Trigger with phrases like "snowflake transform", "snowflake ELT",
"snowflake stream", "snowflake task", "snowflake pipeline",
"snowflake dynamic table", "snowflake CDC".
Other plugins' skills for the same job