Awesome-openclaw-skills duckdb-en
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data".
install
source · Clone the upstream repo
git clone https://github.com/sundial-org/awesome-openclaw-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sundial-org/awesome-openclaw-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/duckdb-en" ~/.claude/skills/sundial-org-awesome-openclaw-skills-duckdb-en && rm -rf "$T"
OpenClaw · Install into ~/.openclaw/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/sundial-org/awesome-openclaw-skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/duckdb-en" ~/.openclaw/skills/sundial-org-awesome-openclaw-skills-duckdb-en && rm -rf "$T"
manifest:
skills/duckdb-en/SKILL.mdsource content
DuckDB CLI Specialist
Helps with data analysis, SQL queries and file conversion via DuckDB CLI.
Quick Start
Read data files directly with SQL
# CSV duckdb -c "SELECT * FROM 'data.csv' LIMIT 10" # Parquet duckdb -c "SELECT * FROM 'data.parquet'" # Multiple files with glob duckdb -c "SELECT * FROM read_parquet('logs/*.parquet')" # JSON duckdb -c "SELECT * FROM read_json_auto('data.json')"
Open persistent databases
# Create/open database duckdb my_database.duckdb # Read-only mode duckdb -readonly existing.duckdb
Command Line Arguments
Output formats (as flags)
| Flag | Format |
|---|---|
| Comma-separated |
| JSON array |
| ASCII table |
| Markdown table |
| HTML table |
| One value per line |
Execution arguments
| Argument | Description |
|---|---|
| Run SQL and exit |
| Run script from file |
| Use alternative to ~/.duckdbrc |
| Open in read-only mode |
| Show commands before execution |
| Stop on first error |
/ | Show/hide column headers |
| Text for NULL values |
| Column separator |
Data Conversion
CSV to Parquet
duckdb -c "COPY (SELECT * FROM 'input.csv') TO 'output.parquet' (FORMAT PARQUET)"
Parquet to CSV
duckdb -c "COPY (SELECT * FROM 'input.parquet') TO 'output.csv' (HEADER, DELIMITER ',')"
JSON to Parquet
duckdb -c "COPY (SELECT * FROM read_json_auto('input.json')) TO 'output.parquet' (FORMAT PARQUET)"
Convert with filtering
duckdb -c "COPY (SELECT * FROM 'data.csv' WHERE amount > 1000) TO 'filtered.parquet' (FORMAT PARQUET)"
Dot Commands
Schema inspection
| Command | Description |
|---|---|
| Show tables (with LIKE pattern) |
| Show CREATE statements |
| Show attached databases |
Output control
| Command | Description |
|---|---|
| Change output format |
| Send output to file |
| Next output to file |
| Show/hide column headers |
| Set separators |
Queries
| Command | Description |
|---|---|
| Show execution time |
| Show commands before execution |
| Stop on error |
| Run SQL from file |
Editing
| Command | Description |
|---|---|
or | Open query in external editor |
| Show help |
Output Formats (18 available)
Data export
- csv - Comma-separated for spreadsheets
- tabs - Tab-separated
- json - JSON array
- jsonlines - Newline-delimited JSON (streaming)
Readable formats
- duckbox (default) - Pretty ASCII with unicode box-drawing
- table - Simple ASCII table
- markdown - For documentation
- html - HTML table
- latex - For academic papers
Specialized
- insert TABLE - SQL INSERT statements
- column - Columns with adjustable width
- line - One value per line
- list - Pipe-separated
- trash - Discard output
Keyboard Shortcuts (macOS/Linux)
Navigation
| Shortcut | Action |
|---|---|
/ | Start/end of line |
| Jump word |
/ | Start/end of buffer |
History
| Shortcut | Action |
|---|---|
/ | Previous/next command |
| Search history |
/ | First/last in history |
Editing
| Shortcut | Action |
|---|---|
| Delete word backward |
| Delete word forward |
/ | Uppercase/lowercase word |
| Delete to end of line |
Autocomplete
| Shortcut | Action |
|---|---|
| Autocomplete / next suggestion |
| Previous suggestion |
| Undo autocomplete |
Autocomplete
Context-aware autocomplete activated with
Tab:
- Keywords - SQL commands
- Table names - Database objects
- Column names - Fields and functions
- File names - Path completion
Database Operations
Create table from file
CREATE TABLE sales AS SELECT * FROM 'sales_2024.csv';
Insert data
INSERT INTO sales SELECT * FROM 'sales_2025.csv';
Export table
COPY sales TO 'backup.parquet' (FORMAT PARQUET);
Analysis Examples
Quick statistics
SELECT COUNT(*) as count, AVG(amount) as average, SUM(amount) as total FROM 'transactions.csv';
Grouping
SELECT category, COUNT(*) as count, SUM(amount) as total FROM 'data.csv' GROUP BY category ORDER BY total DESC;
Join on files
SELECT a.*, b.name FROM 'orders.csv' a JOIN 'customers.parquet' b ON a.customer_id = b.id;
Describe data
DESCRIBE SELECT * FROM 'data.csv';
Pipe and stdin
# Read from stdin cat data.csv | duckdb -c "SELECT * FROM read_csv('/dev/stdin')" # Pipe to another command duckdb -csv -c "SELECT * FROM 'data.parquet'" | head -20 # Write to stdout duckdb -c "COPY (SELECT * FROM 'data.csv') TO '/dev/stdout' (FORMAT CSV)"
Configuration
Save common settings in
~/.duckdbrc:
.timer on .mode duckbox .maxrows 50 .highlight on
Syntax highlighting colors
.keyword green .constant yellow .comment brightblack .error red
External Editor
Open complex queries in your editor:
.edit
Editor is chosen from:
DUCKDB_EDITOR → EDITOR → VISUAL → vi
Safe Mode
Secure mode that restricts file access. When enabled:
- No external file access
- Disables
,.read
,.output
,.import
etc..sh - Cannot be disabled in the same session
Tips
- Use
on large files for quick previewLIMIT - Parquet is faster than CSV for repeated queries
andread_csv_auto
guess column typesread_json_auto- Arguments are processed in order (like SQLite CLI)
- WSL2 may show incorrect
values on some Ubuntu versionsmemory_limit