duckdb

duckdb is a skill for Claude Code from alivirgo/Major-AI-Skills. It costs 32 tokens per session (801 once invoked), scanned A, original, MIT.

An operational guide for DuckDB, a database that runs inside an application or notebook and analyzes local files such as Parquet and CSV. It uses SQL for filtering, joining, aggregating, and exporting data without requiring a separate database server.

In plain words
What is it for?
Use it for local analytical SQL, notebook or CI checks, file-based data processing, views, and exporting results to files or Python data tools.
Why use it?
It helps agents analyze files directly and avoid writing unnecessary data-loading or aggregation code in Python.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Codex.

Part of the major-ai-skills plugin — 147 skills, 8 plugins shipped together

Good fit Use it for local analytical SQL, notebook or CI checks, file-based data processing, views, and exporting results to files or Python data tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alivirgo/major-ai-skills/duckdb
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alivirgo/Major-AI-Skills --skill duckdb
Clone the repo
git clone --depth 1 https://github.com/alivirgo/Major-AI-Skills

Made for: Claude Code.

Or install major-ai-skills, the plugin that ships this one along with the rest of its 147 skills, 8 plugins.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for duckdb

README.md
[![agentmods](https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/duckdb/github.svg)](https://agentmods.dev/skills/alivirgo/major-ai-skills/duckdb)
Your own site
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/duckdb"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/duckdb/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for duckdb

Your own site · 80×15
<a href="https://agentmods.dev/skills/alivirgo/major-ai-skills/duckdb"><img src="https://agentmods.dev/badge/skills/alivirgo/major-ai-skills/duckdb.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 801 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.00801
Opus 5 $0.00016 $0.00400
Sonnet 5 $0.00006 $0.00160
Haiku 4.5 $0.00003 $0.00080

Measured yesterday against content hash df07903f9705, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

duckdb scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/duckdb/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DuckDB Analytical SQL AI Skill Guide

Overview & Engine Architecture

DuckDB is an embedded OLAP database: columnar storage/execution, vectorized operators, and direct scans of Parquet/CSV/JSON without a server. Agents write SQL against files or attached databases, push filters into scans, and export results via COPY or DataFrame APIs instead of reinventing aggregations in Python.

Parquet/CSV/HTTP
      -> DuckDB engine (in-process)
          -> SQL (joins, window, aggregate)
          -> result / COPY / DataFrame

When to use this skill

  • Ad-hoc SQL on local or lake files
  • Replacing heavy pandas groupbys with SQL
  • Lightweight warehouses for notebooks and CI checks

Operational directives

  1. Query files with read_parquet / read_csv_auto (or glob paths) before inventing loaders.
  2. Create views for repeated logic; persist only when you need indexes/reuse.
  3. Prefer COPY ... TO 'out.parquet' for large exports.
  4. Set memory/thread limits for shared CI runners.
  5. Never embed production secrets in attached remote extensions without review.

Query Parquet example

INSTALL httpfs; LOAD httpfs;  -- only if remote paths needed

SELECT
  customer_id,
  date_trunc('month', created_at) AS month,
  sum(amount) AS revenue,
  count(*) AS orders
FROM read_parquet('data/orders/*.parquet')
WHERE created_at >= DATE '2025-01-01'
GROUP BY 1, 2
ORDER BY revenue DESC;

Python usage

import duckdb

con = duckdb.connect("analytics.duckdb")
con.execute("CREATE OR REPLACE VIEW orders AS SELECT * FROM read_parquet('data/orders/*.parquet')")
df = con.execute("""
  SELECT customer_id, sum(amount) AS revenue
  FROM orders
  GROUP BY 1
  ORDER BY 2 DESC
  LIMIT 20
""").fetchdf()

Common failures

Symptom Cause Fix
Type mismatch on UNION schema drift across files union_by_name / cast
Slow scan reading all columns select subset; predicate early
OOM huge hash join filter; spill settings; sample
Lock error second writer on same file DB one writer; use read_only

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed df07903f9705
  2. 7d ago First seen · 99 lines · 32 tokens per session scan A 450633e72911

Subscribe to this mod's changes

duckdb is a skill published in the GitHub repository alivirgo/Major-AI-Skills (1 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 801 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

duckdb

Use when analytical SQL must run in-process with no server: Parquet/CSV/JSON/Arrow queried in place, OLAP embedded in an app or notebook, a slow pandas groupby on multi-GB data, or S3/lakehouse data read without downloading. NOT a multi-user analytics server (that is clickhouse-analytics), NOT an app's transactional…

ericrisco/rsc-harness · 85 tokens

clickhouse-analytics

Use when running a ClickHouse server for high-volume OLAP: choosing a MergeTree engine and ORDER BY/PARTITION BY keys, ingesting billions of event/log/metric rows, pre-aggregating with materialized views, or fixing a query that scans instead of pruning. NOT in-process file analytics (that is duckdb), NOT OLTP CRUD…

ericrisco/rsc-harness · 86 tokens

analytical-databases-expert

Design and query columnar analytical stores: DuckDB, ClickHouse and cloud warehouses, including file formats, partitioning, sort keys and cost control. Use when the user mentions DuckDB, ClickHouse, Parquet, columnar storage, OLAP, a data warehouse or lakehouse, analytical queries over large tables, or when the task…

personamanagmentlayer/pcl · 100 tokens

mysql-expert

Design, optimize, and maintain MySQL databases. Covers schema design, indexing strategies, query optimization, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 30 tokens

postgresql-expert

Design, optimize, and administer PostgreSQL databases. Covers advanced indexing, partitioning, full-text search, JSON operations, replication, and performance tuning.

AtulPurohit/Antigravity-Awesome-Skills · 35 tokens

chdb-datastore

Use when the user has tabular data (pandas DataFrame, parquet, csv, Arrow, json) and wants to filter, group, aggregate, join, or speed up slow pandas. Provides chDB DataStore — same pandas API, ClickHouse engine underneath. Also handles reading from S3, MySQL, PostgreSQL, MongoDB, ClickHouse Cloud, Iceberg, Delta Lake…

chdb-io/chdb · 168 tokens