sql-queries
Generate SQL queries from natural language descriptions. Supports BigQuery, PostgreSQL, MySQL, and other dialects. Reads database schemas from uploaded diagrams or documentation. Use when writing SQL, building data reports, exploring databases, or translating business questions into queries.
Security Assessment
About sql-queries
sql-queries transforms natural language descriptions into optimized SQL queries across multiple database platforms. It helps product managers, analysts, and engineers translate business questions into accurate queries without manual syntax work, and it supports BigQuery, PostgreSQL, MySQL, Snowflake, and SQL Server dialects. It can read database schemas from uploaded SQL files, documentation, or diagram descriptions to ground the queries it generates.
The skill follows a four-step process. First it understands your database schema: if you provide a schema file or diagram description, it reads and analyzes it, extracting table names, column definitions, data types, relationships, primary keys, foreign keys, and indexing strategies. Second it processes your request, clarifying the exact data needed, confirming the SQL dialect, and asking about filters, aggregations, and sorting. Third it generates an optimized query with comments explaining complex logic, performance considerations for large datasets, and alternative approaches where applicable. Fourth it explains the query in plain English, suggests how to test or validate results, offers optimization tips, and can generate a test script or sample data. Its output format delivers a production-ready SQL query, an explanation, performance notes, and an optional test script.
Target users are product managers, analysts, and engineers who need SQL without hand-writing syntax. Key capabilities include multi-dialect support, reading schema files and SQL dumps, query optimization suggestions (indexes, partitioning), explanations for learning and documentation, and creating executable SQL scripts. For best results the skill advises providing schema context, being specific about the data and filters needed, mentioning the SQL dialect, including constraints such as data volume and time ranges, and requesting a particular result format when needed.
FAQ
Which database dialects are supported?
It supports BigQuery, PostgreSQL, MySQL, Snowflake, and SQL Server, and can confirm which dialect you are using before generating a query.
How does it use my database schema?
If you provide a schema file (SQL, documentation, or a diagram description), it reads and analyzes it to extract table names, column definitions, data types, relationships, primary keys, foreign keys, and indexing strategies, then uses that structure to write the query.
What do I receive as output?
You get a production-ready SQL query with comments, a plain-English explanation of what it does, performance notes with optimization tips, and, if requested, a test script with sample data and validation queries.
How can I get the best results?
Provide your schema or structure, be specific about the data and filters you need, mention the SQL dialect, include constraints like data volume and time ranges, and specify the result format if you need a particular output.
Install sql-queries
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
phuryn/pm-skills