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.
By duckdb · 922 installs
npx skills add duckdb/duckdb-skills --skill read-file
Source repository · Upstream listing
You are helping the user read and analyze a data file using DuckDB.
Filename given: $0
Question: ${1: describe the data}
Step 1 — Read it
RESOLVED PATH is $0 . If the user gave a bare filename (no / ), resolve it to a full path with find first.
Run a single DuckDB command that defines the read any macro inline and reads the file.
For remote files , prepend the necessary LOAD/SECRET before the macro:
Protocol Prepend
https:// / http:// LOAD httpfs;
s3:// LOAD httpfs; CREATE SECRET (TYPE S3, PROVIDER credential chain);
gs:// / gcs:// LOAD httpfs; CREATE SECRET (TYPE GCS, PROVIDER credential chain);
az:// / azure:// / abfss:// LOAD httpfs; LOAD azure; CREATE SECRET (TYPE AZURE, PROVIDER credential chain);
For local files , no prefix needed.
If this fails:
duckdb: command not found → invoke /duckdb skills:install duckdb and retry.
Missing extension (e.g. spatial files, xlsx, sqlite) → retry with INSTALL spatial; LOAD spatial; or INSTALL sqlite scanner; LOAD sqlite scanner; prepended before the macro.
Wrong reader / parse error → use the correct read function directly instead of read any .
Step 2 — Answer
Using the schema, row count, and sample rows, answer:
${1: describe the data: summarize column types, row count, and any notable patterns.}