write-query

Translate natural-language data needs into dialect-specific optimized SQL queries.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/cy-wali/knowledge --skill write-query-cy-wali
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-query
Source: https://github.com/cy-wali/knowledge/tree/main/data/skills/write-query
Command: npx skills add https://github.com/cy-wali/knowledge --skill write-query-cy-wali

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translate natural-language data needs into optimized SQL across multiple dialects, reducing manual drafting errors and trial-and-error.

Core Features & Use Cases

  • Dialect-aware SQL generation with best practices for readability and performance.
  • Support for complex queries including multi-CTE patterns, joins, aggregations, and conditional logic.
  • Use cases include data discovery, ad-hoc analytics, and reporting across Snowflake, BigQuery, Postgres, Redshift, and more.

Quick Start

Describe your data need and specify the SQL dialect to generate an optimized query.

Frequently Asked Questions about write-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write optimized SQL queries from natural language for Snowflake or BigQuery?

To generate optimized SQL from natural language, describe your data need and specify the target dialect. The tool translates requirements into syntactically correct, performant queries with multi-CTE patterns, joins, and aggregations tailored for warehouses like Snowflake, BigQuery, Postgres, and Redshift.

What is the best way to generate complex SQL with multiple CTEs and joins?

The best way to generate complex SQL with multiple CTEs and joins is to articulate the analytical logic in plain text and specify the required dialect. The tool structures readable, performant queries applying conditional logic and aggregations across supported warehouses.

Can I use natural language to create ad-hoc analytics queries in Postgres and Redshift?

Yes, you can create ad-hoc analytics queries in Postgres and Redshift using natural language. By providing a plain-language description of your data discovery needs, the tool outputs dialect-aware SQL with best practices for readability and performance.

Does this SQL generation approach support dialect-specific features across different warehouses?

Yes, this SQL generation approach supports dialect-specific features across different warehouses. It provides guidance on dialect-specific syntax and ensures performant query structure for Snowflake, BigQuery, Postgres, and Redshift, reducing manual drafting errors.

How do I ensure my generated SQL is performant for data discovery and reporting?

To ensure generated SQL is performant for data discovery and reporting, the tool applies optimization best practices during translation. It structures multi-CTE patterns and aggregations efficiently, minimizing trial-and-error and manual drafting errors across supported dialects.