duckdblisted
Install: claude install-skill fmind/dot
# DuckDB and SQLite
DuckDB is the default engine for local analysis: it reads CSV, Parquet, and JSON directly, attaches SQLite files, and writes any of them back. SQLite stays the embedded store for applications; DuckDB is the tool you point at data.
## Commands
```bash
duckdb -c "SELECT name, score FROM 'people.csv' WHERE score > 80 ORDER BY score DESC" # files are tables
duckdb -json -c "SELECT * FROM 'events/*.json'" # JSON output for agents and jq
duckdb lab.duckdb -c "CREATE OR REPLACE TABLE people AS FROM 'people.csv'" # persist into a database file
duckdb -c "COPY (FROM 'people.csv') TO 'people.parquet'" # convert; Parquet is the durable format
duckdb -c "ATTACH 'app.sqlite' AS s (TYPE sqlite, READ_ONLY); SELECT count(*) FROM s.users" # read an application database
duckdb -c "SUMMARIZE FROM 'people.parquet'" # column stats in one call
sqlite3 -readonly app.sqlite ".schema" && sqlite3 -readonly app.sqlite "PRAGMA integrity_check" # inspect the app store itself
```
The interactive shells load `~/.duckdbrc` and `~/.sqliterc` (box mode, headers, timer, `∅` for NULL); scripts pass `-json`, `-csv`, or `-markdown` explicitly so output does not depend on the rc file.
## Workflow
1. **Look before querying**: `DESCRIBE FROM '<file>'` and `SUMMARIZE` reveal types, nulls, and ranges; fix a wrong inference with `read_csv('<