DuckDB 技能

用 DuckDB 探索文件与数据库,并保留查询会话背景。

Claude Code 插件整合数据库连接、结构探索、SQL 查询、文件检查、文档、扩展与会话记忆;保存的 SQL 状态让后续任务恢复相同工作背景。

适用场景

  • 探索本地分析数据库
  • 查询 CSV 或 Parquet 文件
  • 继续先前的数据调查

使用方法

安装 DuckDB 插件,连接数据库或读取文件后再查询;保留生成的会话状态,并在格式或集成需要时安装 DuckDB 扩展。

Skills

  • attach-db

    Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.

    duckdb/duckdb-skills
  • convert-file

    Convert any data file to another format: CSV, Parquet, JSON, Excel, GeoJSON, and more. Use when the user says "convert to parquet", "save as xlsx", "export as JSON", "make this a CSV", "turn into parquet", or any variation of format-to-format conversion for data files. Also triggers when the user wants to write Parquet, Excel, or other binary formats that Claude cannot produce natively.

    duckdb/duckdb-skills
  • duckdb-docs

    Search DuckDB and DuckLake documentation and blog posts. Returns relevant doc chunks for a question or keyword using full-text search against a locally cached index.

    duckdb/duckdb-skills
  • install-duckdb

    Install or update DuckDB extensions. Each argument is either a plain extension name (installs from core) or name@repo (e.g. magic@community). Pass --update to update extensions instead of installing.

    duckdb/duckdb-skills
  • query

    Run SQL queries against the attached DuckDB database or ad-hoc against files. Accepts raw SQL or natural language questions. Uses DuckDB Friendly SQL idioms.

    duckdb/duckdb-skills
  • read-file

    Read any data file (CSV, JSON, Parquet, Avro, Excel, spatial, SQLite) or remote URL (S3, HTTPS). Use when user references a data file, asks "what's in this file", or wants to preview/profile a dataset. Not for source code.

    duckdb/duckdb-skills
  • read-memories

    Search past Claude Code session logs to recall prior decisions, patterns, or unresolved work. Use when user says "do you remember", "what did we do", references past conversations, or you need context from prior sessions.

    duckdb/duckdb-skills
  • s3-explore

    Explore and query data on S3, Cloudflare R2, GCS, MinIO, or any S3-compatible storage. Use when the user mentions an s3://, r2://, gs://, or gcs:// URL, asks "what's in this bucket", wants to list remote files, preview remote Parquet/CSV/JSON, or query data on object storage without downloading it. Also triggers when the user wants to know the size, schema, or row count of remote datasets.

    duckdb/duckdb-skills
  • spatial

    Answer questions about spatial data using DuckDB. Use when the user mentions locations, coordinates, lat/lng, distances, maps, addresses, "near", "within", "closest", geographic names, or spatial file formats (GeoJSON, Shapefile, GeoPackage, GPX, GeoParquet). Also triggers when the user wants to find places, buildings, or roads — Overture Maps provides free global data on S3 with zero API keys. Handles spatial joins, distance calculations, containment checks, density analysis, and format conversions for geographic data.

    duckdb/duckdb-skills