agentsclimarketplace

Read file

Skill carlopi/duckdb-claude-skills/skills/read-file

Read and explore any data file (CSV, JSON, Parquet, Avro, Excel, spatial, …) by filename only — resolves the path automatically. Uses DuckDB + the magic extension for format auto-detection. Installs magic if needed.From its SKILL.md

Install
npx -y skills add carlopi/duckdb-claude-skills --skill read-file

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.5 KB, 858 tokens by cl100k_base, as published. Nobody here has run it

You are helping the user read and analyze a data file using DuckDB.

Filename given: $0 Question: ${1:-describe the data}

Follow these steps in order, stopping and reporting clearly if any step fails.

Step 1 — Locate DuckDB (requires ≥ v1.5.0)

DUCKDB=$(command -v duckdb)
  • Not found → invoke /duckdb-claude-skills:install-duckdb (no arguments) to install DuckDB, then re-check.
  • Found but version < 1.5.0 → tell the user the installed version is too old, then invoke /duckdb-claude-skills:install-duckdb --update to upgrade.
  • Found and version ≥ 1.5.0 → continue.
CURRENT=$(duckdb --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')

Step 2 — Resolve the filename to a full path

find "$PWD" -name "$0" -not -path '*/.git/*' 2>/dev/null
  • Zero results → tell the user the file was not found and stop.
  • More than one result → list all matches, ask the user to re-run with a fuller path, and stop.
  • Exactly one result → use that full path for all subsequent steps (RESOLVED_PATH).

Step 3 — Attempt to read the file (optimistic)

Try a sandboxed read without loading any extra extensions — this succeeds immediately for built-in formats (CSV, plain text):

"$DUCKDB" :memory: -csv -c "LOAD magic; SET allowed_paths=['RESOLVED_PATH']; SET enable_external_access=false; SET allow_persistent_secrets=false; SET lock_configuration=true; SELECT column_name FROM (DESCRIBE FROM read_any('RESOLVED_PATH')); SELECT count(*) AS row_count FROM read_any('RESOLVED_PATH'); FROM read_any('RESOLVED_PATH') LIMIT 10;"

If this succeeds → skip to Step 5 (Answer).

If this fails (missing extension, or magic not found) → continue to Step 4.

Notes:

  • All LOAD statements must precede SET enable_external_access=false.
  • Spatial files: st_read globs for sidecar files using the filename stem. For spatial formats add a stem-wildcard to allowed_paths: SET allowed_paths=['RESOLVED_PATH', 'RESOLVED_PATH_WITHOUT_EXTENSION.*']

Step 4 — Install required extensions and retry

Detect which extensions are needed, install them, then re-run the read:

# 4a — detect (also installs magic if missing)
"$DUCKDB" :memory: -csv -c "INSTALL magic FROM community; LOAD magic; SELECT magic_required_extensions('RESOLVED_PATH') AS required_exts;"

# 4b — install all required extensions in one call (skip if list is empty)
"$DUCKDB" :memory: -c "INSTALL <ext1>; INSTALL <ext2>;"

# 4c — retry the sandboxed read with all extensions loaded
"$DUCKDB" :memory: -csv -c "LOAD magic; LOAD <ext1>; LOAD <ext2>; SET allowed_paths=['RESOLVED_PATH']; SET enable_external_access=false; SET allow_persistent_secrets=false; SET lock_configuration=true; SELECT column_name FROM (DESCRIBE FROM read_any('RESOLVED_PATH')); SELECT count(*) AS row_count FROM read_any('RESOLVED_PATH'); FROM read_any('RESOLVED_PATH') LIMIT 10;"

The three SELECT statements in 4c produce three result sets printed sequentially in CSV format.

Step 5 — Answer the question

Using the schema, row count, and sample rows gathered above, answer:

${1:-describe the data: summarize column types, row count, and any notable patterns.}

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,834. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.