duckdb-sql

Generate DuckDB SQL queries from plain English questions using asset schemas.

Updated Dec 6, 2025
One-click install
npx skills add https://github.com/robdmc/claude_skills --skill duckdb-sql
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: duckdb-sql
Source: https://github.com/robdmc/claude_skills/tree/main/duckdb_sql/code/duckdb-sql
Command: npx skills add https://github.com/robdmc/claude_skills --skill duckdb-sql

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This DuckDB Code skill helps you generate DuckDB SQL queries from natural language, understand data structures, and iteratively refine queries.

Core Features & Use Cases

  • Discovery-first SQL generation: Build queries from English questions using documented asset schemas.
  • Asset-driven context: Reads duckdb_sql_assets/* assets (tables_inventory.json, schema_*.sql, data_dictionary.md) to guide query construction without touching live files.
  • Two-way workflow: Propose query plans, then generate and refine SQL with user approval.
  • Use Case: You want to answer “show me orders by month” by generating a DuckDB SQL plan and a ready-to-run query.

Quick Start

Start by asking for a DuckDB data task or attach assets. The skill will first present a query plan based on existing assets (without executing any queries) and wait for your approval before generating SQL.

Frequently Asked Questions about duckdb-sql

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

FAQPage Schema
How do I generate SQL queries from natural language questions?

DuckDB SQL generation converts plain English questions into executable DuckDB queries. This skill reads your data assets (tables_inventory.json, schema files, data dictionary) to build syntactically correct queries without executing them, letting you approve a query plan before SQL generation.

Can I query CSV and Parquet files with DuckDB?

Yes. DuckDB queries work across databases, CSV files, and Parquet files. This skill generates SQL that accesses all three formats by discovering their structures from your asset documentation, enabling unified queries across mixed data sources.

What data assets do I need to generate DuckDB queries?

You need a duckdb_sql_assets/ folder containing tables_inventory.json (table metadata), schema_*.sql files (column definitions), and data_dictionary.md (field documentation). These assets guide query generation without requiring live file access or query execution.

How do I refine DuckDB queries after they're generated?

The skill supports iterative refinement through a two-way workflow: propose a query plan based on your question, wait for your approval, generate the SQL, then modify it based on your feedback—enabling collaborative query building without trial-and-error execution.

Do I need to understand DuckDB syntax to use this skill?

No. You describe your data task in English, and the skill generates syntactically correct DuckDB SQL. Knowledge of DuckDB syntax helps refine queries, but natural language input means you can start without prior SQL or DuckDB experience.

What happens if my asset files are incomplete or missing?

The skill relies on assets to produce syntactically correct queries. Missing or incomplete tables_inventory.json, schema files, or data dictionary may result in incomplete or inaccurate query generation, so ensure all documentation is current before requesting query plans.