Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

duckdb-sql

Skill by SignalPilot-Labs

Explains DuckDB SQL behaviors that differ from PostgreSQL and MySQL. It is for assistants and users who hit DuckDB syntax errors or write DuckDB-specific queries.

  • Score 70
  • 489 stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install duckdb-sql

Built from the published package, never by AI.

git clone --depth 1 https://github.com/SignalPilot-Labs/SignalPilot /tmp/SignalPilot && mkdir -p ~/.claude/skills && cp -r /tmp/SignalPilot/benchmark/skills/duckdb-sql ~/.claude/skills/duckdb-sql

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install duckdb-sql in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

duckdb-sql is an agent skill that lists DuckDB SQL gotchas that differ from PostgreSQL and MySQL. The assistant loads it when it hits DuckDB syntax errors or writes DuckDB-specific SQL. The skill covers integer division truncating, DATE_TRUNC returning a TIMESTAMP, INTERVAL quoting, and SUM of NULL returning NULL. It also shows how to parse non-ISO date strings with STRPTIME and TRY_STRPTIME, filter window results with QUALIFY, and build date spines with GENERATE_SERIES.

The file gives a fix for each case, such as casting to DOUBLE before dividing, casting ROUND output to a DECIMAL type, and anchoring queries to the source's maximum date instead of CURRENT_DATE. It also covers TRY_CAST, which returns NULL on failure. The skill is aimed at people writing or debugging DuckDB SQL who want to avoid behavior that differs from PostgreSQL or MySQL.

Written from the project's SKILL.md and checked against it.

What it can do

  • Integer divisionNotes that integer division truncates and shows casting the numerator to DOUBLE.
  • Date and interval syntaxCovers DATE_TRUNC's TIMESTAMP result, quoted INTERVAL syntax, and replacements for DATEADD and DATEDIFF.
  • NULL handling in sumsExplains that SUM of NULL is NULL and shows COALESCE to return 0 instead.
  • Non-ISO date parsingShows STRPTIME and TRY_STRPTIME for date strings that are not ISO format.
  • QUALIFY clauseFilters window function results without a subquery.
  • Date spinesBuilds a daily date series with GENERATE_SERIES anchored to the primary fact table's max date.
  • Type castingLists CAST and TRY_CAST patterns for INTEGER, DOUBLE, VARCHAR and DATE.

Try asking

  • Fix my DuckDB query that divides two integers and returns 2 instead of 2.5
  • Parse dd/mm/yyyy date strings in DuckDB without failing on bad rows
  • Write a DuckDB query that keeps the top 10 rows per group using QUALIFY

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: benchmark/skills/duckdb-sql/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md2 KB

Alternatives to duckdb-sql

All alternatives →
hugging-face-datasetssickn33
94

Creates, configures and manages datasets on the Hugging Face Hub, including SQL-based querying and transformation. Built for people who edit dataset content and metadata directly, alongside the HF MCP server.

AAA Skill 50k
db-repairgarrytan
94

Diagnoses and repairs gbrain's Postgres access when a command or MCP result shows a GBRAIN_DB_ACCESS marker, or when the operator reports the brain database is down. It runs the hardcoded gbrain db-repair ladder and verifies the result with a re-probe.

AAA Skill 34k
alloydb-basicsgoogle
94

Manages clusters, instances, and backups for AlloyDB for PostgreSQL. Built for creating, configuring, and administering AlloyDB databases, not general PostgreSQL or Cloud SQL instances.

AAA Skill 26k
clickhouse-logs-queriessupabase
94

Writes, reviews and migrates Supabase logs queries against the ClickHouse logs table served by the logs.all.otel endpoint. Built for developers who write Logs Explorer SQL or convert older BigQuery logs queries.

AAA Skill 116k
fix-slow-queriespaperclipai
94

Diagnoses and fixes slow Paperclip PostgreSQL queries using Cloud and Neon evidence, local benchmarks, regression tests, and a pull request with passing checks. Built for engineers working on Paperclip.

AAA Skill 119k
prisma-8prisma
94

Guides AI assistants through Prisma 8 projects built on @prisma/orm-postgres, @prisma/orm-sqlite, or @prisma/orm-mongo. It covers data contracts, migrations, typed queries and runtime setup for developers on Prisma 8.

AAA Skill 48k

Compare with hugging-face-datasets, db-repair or alloydb-basics

duckdb-sql: common questions

What SQL differences does this skill cover?

It covers DuckDB gotchas such as integer division, DATE_TRUNC types, INTERVAL syntax, SUM of NULL, and ROUND precision. It also covers non-ISO date parsing, QUALIFY, date spines, and type casting.

When should an assistant load this skill?

The description says to load it when hitting DuckDB syntax errors or writing DuckDB-specific SQL. It is written for code that differs from PostgreSQL or MySQL.

Why does the skill warn against CURRENT_DATE?

The source says to avoid CURRENT_DATE in models with historical data. It recommends using the maximum date in the source table to anchor to the data's actual date range.

How do I install duckdb-sql?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is duckdb-sql free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is duckdb-sql safe to use?

It scores 70 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to duckdb-sql?

Similar skills: hugging-face-datasets, db-repair, alloydb-basics, clickhouse-logs-queries.

duckdb-sql Install

Add to stack

Loading.