skillfed

read-file

read-file uses DuckDB to load and analyze data files across multiple formats—CSV, JSON, Parquet, Avro, Excel, spatial, and SQLite—from local paths or remote sources like S3 and HTTPS. It automatically detects file type, retrieves schema and row counts, and displays sample rows to help you understand your dataset at a glance.

read-file loads and previews local or remote data files in formats like CSV, JSON, Parquet, Excel, and SQLite using DuckDB.

AI-generated summary based on this skill's SKILL.md

523 26 MIT updated by duckdb

Install

duckdb/duckdb-skills/read-file · repository language: Shell

CLI (skillfed)coming soon
git clone https://github.com/duckdb/duckdb-skills
cp -r duckdb-skills/skills/read-file ~/.claude/skills/read-file

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I read a CSV file with read-file?

read-file loads CSV files directly using DuckDB's native CSV parser. Simply provide the local file path or remote URL, and read-file automatically detects the format, retrieves the schema, row count, and displays sample rows so you can preview your data instantly.

What file formats does read-file support?

read-file supports CSV, JSON, Parquet, Avro, Excel, SQLite, NDJSON, TSV, and spatial formats like shapefiles. It uses DuckDB to handle format detection and querying, letting you load and analyze data across all these formats from local paths or remote sources.

Can read-file load data from cloud storage like S3?

Yes. read-file reads files from S3, GCS, and Azure blob storage, as well as remote HTTPS URLs. You can preview datasets directly from cloud sources without downloading them locally first, making it easy to inspect large remote datasets.

How do I inspect a data file's schema and row count?

read-file automatically inspects your dataset when you load it. It retrieves the schema (column names and types), total row count, and displays sample rows in one operation, giving you a complete overview of your data structure without manual inspection steps.

Can read-file convert between data formats?

read-file can query and read data across multiple formats—CSV, JSON, Parquet, Excel, and SQLite—using DuckDB. While primarily a loader and inspector, its format flexibility lets you work with data in different formats and understand their contents.

Does read-file handle spatial or geospatial data?

read-file supports spatial file formats like shapefiles, allowing you to load and preview geospatial datasets. Combined with its schema inspection and sample-row display, you can quickly understand the structure and content of spatial data files.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
skills/read-file/SKILL.md

Related skills

Tags

multi-format-reader cloud-storage-access data-profiling schema-inspection remote-file-loading tabular-data-import geospatial-formats notebook-parsing