snowflake-development
БесплатноЗапускает вложенные скриптыНе проверенReview Snowflake SQL for pruning and join problems, size warehouses and cut credit spend. Use when a Snowflake query is slow or expensive, or when sizing or…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Snowflake Development
Category: Engineering Domain: Data Warehouse
Overview
The Snowflake Development skill provides tools for analyzing and optimizing Snowflake SQL queries, recommending warehouse sizing, and enforcing Snowflake-specific best practices. Helps data engineers reduce costs and improve query performance.
When to Use
- A Snowflake query is slow or a warehouse bill jumped and you need the likely causes.
- Sizing a new warehouse for an ETL, BI, ad-hoc, data-science or ingest workload.
- Reviewing SQL or a data model before it goes into a scheduled pipeline.
For other databases use sql-database-assistant; for pipeline orchestration use senior-data-engineer.
Clarify First
Before analyzing or sizing, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Action: analyze / optimize / warehouse-sizing (
--action; selects the workflow). - SQL file or query: the specific query(ies) to optimize (
--file; the subject of the analysis). - Workload type & data volume: ETL / BI / ad-hoc and the GB scale (
--workload/--data-volume; drives the warehouse recommendation).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Quick Start
# Analyze a Snowflake SQL file for optimization opportunities (bundled sample: 4 issues)
python scripts/snowflake_query_helper.py --file assets/sample_queries.sql --action analyze
# Get warehouse sizing recommendations, costed at your hours and contract credit price
python scripts/snowflake_query_helper.py --action warehouse-sizing --workload "etl" --data-volume "500GB" --hours 4 --credit-price 3
# Optimize a specific query
python scripts/snowflake_query_helper.py --file slow_query.sql --action optimize
Tools Overview
| Tool | Purpose | Key Flags |
|---|---|---|
snowflake_query_helper.py |
Analyze, optimize Snowflake SQL and recommend warehouse sizes | --file/--sql, --action analyze/optimize/warehouse-sizing, --workload, --data-volume, --hours, --credit-price, --format human/json |
Exit codes: 0 ok (analysis found no critical issue); 1 a critical issue was found;
2 bad input (missing file, no SQL given).
Workflows
Query Performance Optimization
- Collect the expensive queries with real numbers (needs access to the
SNOWFLAKE.ACCOUNT_USAGEshare; it lags by up to about 45 minutes):SELECT query_id, warehouse_name, total_elapsed_time / 1000 AS seconds, bytes_scanned, partitions_scanned, partitions_total, query_text FROM snowflake.account_usage.query_history WHERE start_time >= DATEADD(day, -7, CURRENT_TIMESTAMP()) AND execution_status = 'SUCCESS' ORDER BY total_elapsed_time DESC LIMIT 20; - Run the analyzer on those query texts for pattern-level fixes (SELECT *, functions on filter columns, always-true joins).
- For each query, open the Query Profile: the real evidence is partitions scanned vs total, spilling to local/remote storage, and the most expensive operator. Prefer it over the script whenever they disagree.
- Apply the change and verify against the same metrics before/after; done when elapsed time or bytes scanned fell on the same input.
Warehouse Right-Sizing
- Identify workload type (ETL, BI, ad-hoc, etc.)
- Run warehouse-sizing with data volume
- Review recommendations
- Implement multi-cluster settings if applicable
Scope & Limitations
In Scope:
- Rule-based review of Snowflake SQL from a file or
--sqltext withsnowflake_query_helper.py --action analyzeoroptimize, with a complexity score and a suggested warehouse size per query. - Warehouse sizing for five workload types (etl, bi, ad-hoc, data-science, ingest) from a data volume, with credits per hour, an estimated daily cost and a
CREATE WAREHOUSEstatement. - Query, warehouse, cost and data modeling practices in
references/snowflake-best-practices.md.
Out of Scope:
- Connecting to Snowflake, reading query history or query profiles, or running any statement.
- SQL work for other databases (see
engineering/sql-database-assistant/). - Building and orchestrating data pipelines (see
engineering/senior-data-engineer/). - Access control, governance and data sharing setup.
Important Caveats:
- Analysis matches patterns in SQL text. It does not see execution plans, table sizes or clustering, so it misses issues that only show at run time.
- Sizing comes from a fixed table of data volume and concurrency limits. It is a starting point to adjust with observed query performance.
- Cost figures default to 8 hours a day at $2 per credit; pass
--hoursand--credit-pricefor your contract. Credit prices depend on edition, region and contract, and Snowflake features and
Установить snowflake-development в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл snowflake-development?
Review Snowflake SQL for pruning and join problems, size warehouses and cut credit spend. Use when a Snowflake query is slow or expensive, or when sizing or reviewing warehouses.
Как установить скилл snowflake-development?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл snowflake-development запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic