Skip to content
duckdb avatar

Read File

Single-command DuckDB reader that previews any local or remote data file's schema, row count, and sample rows.

CCM score
71 of 100
skills.sh installs
1.4K
GitHub stars
623
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers CSV, JSON, Parquet, Avro, Excel, spatial, SQLite, and notebook formats through one read_any macro with extension-based routing
  • Supports remote sources over HTTPS, S3, GCS, and Azure, with the httpfs and credential setup added automatically per protocol
  • Resolves bare filenames with find and retries with the matching DuckDB extension (spatial, sqlite_scanner) when a reader is missing
  • Designed for previewing and profiling a dataset when a user asks what is in a file, not for reading source code

Install

$ npx -y skills add duckdb/duckdb-skills --skill read-file -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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:

ProtocolPrepend
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.

Details

Repository
github.com/duckdb/duckdb-skills
Categories
Data Science & Analytics, Databases
First seen
Jun 3, 2026

Questions

What file types can the read-file skill open?

The read-file skill reads CSV, JSON, Parquet, Avro, Excel, spatial files, SQLite databases and Jupyter notebooks, both local files and remote files on S3, GCS, Azure or HTTPS. It picks the reader from the file extension using a built-in read_any macro. Files that are not data sources, such as source code, are outside its scope.

How do I install the read-file skill?

Run npx -y skills add duckdb/duckdb-skills --skill read-file -y in your project to install it. Once installed, the agent can preview and profile a data file when you reference it or ask what is in it. It reports the schema, row count and first rows of the dataset.

What does read-file need to work with remote files?

Remote files need the DuckDB httpfs extension, and S3, GCS or Azure paths also need a credential_chain secret that the skill creates for you. Local files need only the DuckDB CLI. If the CLI is missing, the skill offers to install it through the install-duckdb skill.

Where does read-file stand in the Data Science & Analytics category?

The read-file skill sits in the Data Science & Analytics category alongside azure-kusto, analyze-project, run-train, explore-run and add-analytics-instrumentation. It is aimed at quick previews of a single dataset, and it hands off to the query skill for deeper exploration.

More from duckdb/duckdb-skills

All 6

Similar to Read File

More Data Science & Analytics