Skip to content

Add Snowflake skills: 25 best-practice rules, 4 domain skills, build harness#1

Open
jamescha-earley wants to merge 1 commit intoSnowflake-Labs:mainfrom
jamescha-earley:main
Open

Add Snowflake skills: 25 best-practice rules, 4 domain skills, build harness#1
jamescha-earley wants to merge 1 commit intoSnowflake-Labs:mainfrom
jamescha-earley:main

Conversation

@jamescha-earley
Copy link

Summary

  • snowflake-best-practices: 25 individual rule files covering warehouse sizing, clustering keys, query optimization, data loading, semi-structured data, type selection, and cost management — each with incorrect/correct SQL examples, impact ratings, and doc references
  • 4 new domain skills: dynamic-tables, cortex-ai-functions, snowpark-python, snowflake-postgres — complete SKILL.md files following the agentskills.io standard
  • Build harness (packages/snowflake-best-practices-build): parser, validator, AGENTS.md compiler, SQL syntax checker, and documentation reference freshness tracker
  • CI/CD: PR validation workflow for rule structure, AGENTS.md drift detection, and doc reference verification
  • All 25 rules verified against current Snowflake documentation (March 2025)

Rule categories (25 total)

Category Rules
Warehouse right-sizing, auto-suspend, scale-up-vs-out, query-acceleration
Clustering when-to-cluster, cardinality, filter-alignment
Query avoid-select-star, result-cache, use-qualify, filter-on-cluster-keys, pruning-aware-joins
Data Loading file-sizing, format-options, copy-vs-snowpipe, staging-patterns
Semi-structured dot-notation, lateral-flatten, variant-vs-flatten
Types varchar-sizing, use-appropriate-types, timestamp-variants
Cost credit-aware-design, resource-monitors, warehouse-timeouts

Test plan

  • npx skills add Snowflake-Labs/agent-skills discovers all 6 skills (5 new + existing)
  • Each SKILL.md has valid YAML frontmatter with required fields
  • All 25 rule files pass validate.py structural checks
  • build.py regenerates AGENTS.md without drift
  • verify_docs.py confirms all doc references resolve
  • CI workflow passes on PR

.... Generated with Cortex Code

…harness

New skills:
- snowflake-best-practices: 25 rules covering warehouse sizing, clustering,
  query optimization, data loading, semi-structured data, types, and cost
  management — each with incorrect/correct SQL examples
- dynamic-tables: pipeline patterns, incremental refresh, troubleshooting
- cortex-ai-functions: AI_COMPLETE, AI_EXTRACT, AI_CLASSIFY, embeddings
- snowpark-python: DataFrames, UDFs, stored procedures, deployment
- snowflake-postgres: Snowflake Postgres instance management and pg_lake

Build tooling (packages/snowflake-best-practices-build):
- parser.py, validate.py, build.py: parse, validate, compile rules to AGENTS.md
- validate_sql.py: SQL syntax checking for rule examples
- verify_docs.py: documentation reference freshness tracking
- verified_facts.json: timestamp manifest for doc verification

CI/CD:
- validate-pr.yml: rule validation, AGENTS.md drift check, doc verification
- validate-rules.sh: rule file structure validation script

All 25 rules verified against current Snowflake documentation (March 2025).

.... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-Authored-By: Cortex Code <noreply@snowflake.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant