OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add anthropics/knowledge-work-plugins --skill sql-queries
Write correct, performant SQL across all major data warehouse dialects (Snowflake, BigQuery, Databricks, PostgreSQL, etc.). Use when writing queries, optimizing slow SQL, translating between dialects, or building complex analytical queries with CTEs, window functions, or aggregations.
npx skills add anthropics/knowledge-work-plugins --skill sql-queries
Write correct, performant, readable SQL across all major data warehouse dialects.
Date/time:
String functions:
Arrays and JSON:
Performance tips:
EXPLAIN ANALYZE to profile queriesEXISTS over IN for correlated subqueriesDate/time:
String functions:
Semi-structured data:
Performance tips:
RESULT_SCAN(LAST_QUERY_ID()) to avoid re-running expensive queriesDate/time:
String functions:
Arrays and structs:
Performance tips:
APPROX_COUNT_DISTINCT() for large-scale cardinality estimatesSELECT * -- billing is per-byte scannedDECLARE and SET for parameterized scriptsDate/time:
String functions:
Performance tips:
EXPLAIN to check query planANALYZE and VACUUM regularlyDate/time:
Delta Lake features:
Performance tips:
OPTIMIZE and ZORDER for query performanceCACHE TABLE for frequently accessed datasetsWhen a query fails:
ILIKE not available in BigQuery, SAFE_DIVIDE only in BigQuery)CAST(col AS DATE), col::DATE)NULLIF(denominator, 0) or dialect-specific safe division