
DuckDB Skills
SkillDuckDB 官方技能合集:用 SQL 或自然语言查询本地与 S3 上的 CSV、Parquet、Excel、JSON 文件,挂载数据库、转换格式、分析空间数据、检索文档。需要 DuckDB 命令行,仅在 macOS 与 Linux 上测试过。
duckdb-skills
A Claude Code plugin that adds DuckDB-powered skills for data exploration and session memory.
Installation
From the Discover tab (coming soon)
We are working on submitting this plugin to the official Anthropic marketplace. Once listed, it will appear in the Discover tab when you run /plugin inside Claude Code.
From GitHub (available now)
Add the repository as a plugin source and install:
/plugin marketplace add duckdb/duckdb-skills
/plugin install duckdb-skills@duckdb-skills
This registers the GitHub repo as a marketplace and installs the plugin. Skills will be available as /duckdb-skills:<skill-name> in all future sessions.
Updating
To pull the latest version, update the marketplace first and then the plugin:
/plugin marketplace update duckdb-skills
/plugin update duckdb-skills@duckdb-skills
Skills
attach-db
Attach a DuckDB database file for interactive querying. Explores the schema (tables, columns, row counts) and writes a SQL state file so all other skills can restore the session automatically. You can choose to store state in the project directory (.duckdb-skills/state.sql) or in your home directory (~/.duckdb-skills/<project>/state.sql).
/duckdb-skills:attach-db my_analytics.duckdb
Supports multiple databases — running attach-db again can append to the existing state file.
query
Run SQL queries against attached databases or ad-hoc against files. Accepts raw SQL or natural language questions. Uses DuckDB's Friendly SQL dialect. Automatically picks up session state from attach-db.
/duckdb-skills:query FROM sales LIMIT 10
/duckdb-skills:query "what are the top 5 customers by revenue?"
/duckdb-skills:query FROM 'exports.csv' WHERE amount > 100
read-file
Read and explore any data file — CSV, JSON, Parquet, Avro, Excel, spatial, SQLite, Jupyter notebooks, and more — locally or from remote storage (S3, GCS, Azure, HTTPS). Auto-detects the format by file extension using a built-in read_any table macro. Suggests query for further exploration.
/duckdb-skills:read-file variants.parquet what columns does it have?
/duckdb-skills:read-file s3://my-bucket/data.parquet describe the schema
/duckdb-skills:read-file https://example.com/data.csv how many rows?
duckdb-docs
Search DuckDB and DuckLake documentation and blog posts using full-text search against the hosted search indexes. No local setup required — queries run over HTTPS by default, with an option to cache the index locally for faster offline searches.
/duckdb-skills:duckdb-docs window functions
/duckdb-skills:duckdb-docs "how do I read a CSV with custom delimiters?"
read-memories
Search past Claude Code session logs to recover context from previous conversations — decisions made, patterns established, open TODOs. Offloads large result sets to a temporary DuckDB file for interactive drill-down.
/duckdb-skills:read-memories duckdb --here
install-duckdb
Install or update DuckDB extensions. Supports name@repo syntax for community extensions and a --update flag that also checks whether your DuckDB CLI is on the latest stable version.
/duckdb-skills:install-duckdb spatial httpfs
/duckdb-skills:install-duckdb gcs@community
/duckdb-skills:install-duckdb --update
Session state
All skills share a single state.sql file per project — a plain SQL file containing ATTACH/USE/LOAD statements, secrets, and macros. When state is first needed, you'll be asked where to store it:
- In the project directory (
.duckdb-skills/state.sql) — colocated with the project, optionally gitignored - In your home directory (
~/.duckdb-skills/<project>/state.sql) — keeps the repo clean
The file is append-only and idempotent. Any skill restores the session via duckdb -init state.sql.
Local development
To test skills locally from a clone of this repo:
# 1. Clone the repo
git clone https://github.com/duckdb/duckdb-skills.git
cd duckdb-skills
# 2. Launch Claude Code with the local plugin directory
claude --plugin-dir .
This loads the plugin from disk instead of the marketplace, so any edits to skills/*/SKILL.md take effect immediately — just start a new conversation (or re-run the slash command) to pick up changes.
You can test individual skills directly:
/duckdb-skills:read-file some_local_file.parquet
/duckdb-skills:duckdb-docs pivot unpivot
/duckdb-skills:query SELECT 42
Prerequisites: DuckDB CLI must be installed. If it isn't, the skills will offer to install it via /duckdb-skills:install-duckdb.
How the skills work together
Skills reference each other where it makes sense:
read-filesuggestsqueryfor follow-up exploration andattach-dbfor persisting large filesquery,read-file, andread-memoriesall useduckdb-docsto troubleshoot DuckDB errors automatically- All skills share the same
state.sql— secrets and macros set up byread-fileare reused byquery, and databases attached byattach-dbare available everywhere
Platform support
These skills have been tested on macOS and Linux. Windows is not yet fully supported — some shell commands and path handling may not work as expected. We plan to improve Windows compatibility in a future release.
Reporting issues & suggestions
Found a bug or have an idea for improvement? Open an issue at:
https://github.com/duckdb/duckdb-skills/issues
For DuckDB-specific bugs (extension loading, SQL errors), please include the DuckDB version (duckdb --version) and the full error message.
相關資源

DuckDB
CLI进程内分析型 SQL 数据库,命令行可直接用 SQL 查询 CSV、Parquet、JSON 文件,无需导入或启动服务,适合 agent 抽样与聚合大文件。官方维护。
duckdb/duckdb42.2k
Datasette
CLI把 SQLite 数据库发布成可以浏览、可以查询的网页和 JSON API,支持 SQL 查询、元数据和插件扩展,也能用 datasette publish 部署到 Cloud Run 等平台。适合数据探索和数据新闻,需要 Python 3.10 及以上版本。
simonw/datasette11.5k
SQL Queries
SkillAnthropic 官方数据技能,指导 agent 在 Snowflake、BigQuery、Databricks、PostgreSQL 等主流数仓方言下编写、翻译和优化 SQL,涵盖 CTE、窗口函数与聚合分析查询。
anthropics/knowledge-work-plugins29.9k
BigQuery Basics
Skill用 bq 与 gcloud 命令行管理 BigQuery 的数据集、表与作业,运行 SQL 查询并导入数据,附客户端库、MCP 与 Terraform 参考。Google 官方技能,需要 Google Cloud 项目。
google/skills21.4k
SQLMesh
CLI用 SQL 或 Python 编写数据转换模型的框架。提供类似 Terraform 的 plan / apply 流程、虚拟数据环境、单元测试和表差异比对,能在 10 多种 SQL 方言之间转译。Linux 基金会项目,可以替代 dbt。
SQLMesh/sqlmesh3.3k
sqlite-utils
CLISimon Willison 出品的命令行工具与 Python 库:把 JSON、CSV 直接导入 SQLite 并自动建表,对文件跑内存 SQL 查询,还支持全文检索与表结构变换。
simonw/sqlite-utils2.2k