← Back to Skills Marketplace
camelsprout

DuckDB CLI skills

by CamelSprout · GitHub ↗ · v1.0.0
cross-platform ✓ Security Clean
4323
Downloads
3
Stars
22
Active Installs
1
Versions
Install in OpenClaw
/install duckdb-cli-ai-skills
Description
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".
README (SKILL.md)

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
-csv Comma-separated
-json JSON array
-table ASCII table
-markdown Markdown table
-html HTML table
-line One value per line

Execution arguments

Argument Description
-c COMMAND Run SQL and exit
-f FILENAME Run script from file
-init FILE Use alternative to ~/.duckdbrc
-readonly Open in read-only mode
-echo Show commands before execution
-bail Stop on first error
-header / -noheader Show/hide column headers
-nullvalue TEXT Text for NULL values
-separator SEP 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
.tables [pattern] Show tables (with LIKE pattern)
.schema [table] Show CREATE statements
.databases Show attached databases

Output control

Command Description
.mode FORMAT Change output format
.output file Send output to file
.once file Next output to file
.headers on/off Show/hide column headers
.separator COL ROW Set separators

Queries

Command Description
.timer on/off Show execution time
.echo on/off Show commands before execution
.bail on/off Stop on error
.read file.sql Run SQL from file

Editing

Command Description
.edit or \e Open query in external editor
.help [pattern] 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
Home / End Start/end of line
Ctrl+Left/Right Jump word
Ctrl+A / Ctrl+E Start/end of buffer

History

Shortcut Action
Ctrl+P / Ctrl+N Previous/next command
Ctrl+R Search history
Alt+\x3C / Alt+> First/last in history

Editing

Shortcut Action
Ctrl+W Delete word backward
Alt+D Delete word forward
Alt+U / Alt+L Uppercase/lowercase word
Ctrl+K Delete to end of line

Autocomplete

Shortcut Action
Tab Autocomplete / next suggestion
Shift+Tab Previous suggestion
Esc+Esc 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_EDITOREDITORVISUALvi

Safe Mode

Secure mode that restricts file access. When enabled:

  • No external file access
  • Disables .read, .output, .import, .sh etc.
  • Cannot be disabled in the same session

Tips

  • Use LIMIT on large files for quick preview
  • Parquet is faster than CSV for repeated queries
  • read_csv_auto and read_json_auto guess column types
  • Arguments are processed in order (like SQLite CLI)
  • WSL2 may show incorrect memory_limit values on some Ubuntu versions
Usage Guidance
This skill appears safe for its purpose as a DuckDB CLI reference. Before installing or using it, remember that DuckDB commands can read local datasets and write output files, so review any SQL, input paths, globs, and output paths before execution. Prefer read-only mode for existing databases and verify guidance against official DuckDB documentation if the unknown source is a concern.
Capability Analysis
Type: OpenClaw Skill Name: duckdb-cli-ai-skills Version: 1.0.0 The skill bundle provides comprehensive documentation and examples for using the `duckdb` CLI tool. While `duckdb` inherently involves file system interactions (reading/writing data files, executing SQL from files) and can invoke external editors, the `SKILL.md` content does not contain any instructions for the AI agent to perform malicious actions such as data exfiltration, unauthorized execution, or prompt injection. The installation instructions in `README.md` are also benign, involving only local file copying, and all external links point to official DuckDB documentation.
Capability Assessment
Purpose & Capability
The skill coherently matches its stated purpose: helping with DuckDB SQL analysis, file reads, and file conversions. Those capabilities can touch local data files, so users should review paths and queries before running them.
Instruction Scope
The instructions are presented as examples and reference material, not as hidden automatic actions. Some examples use globs and write output files, which are appropriate for DuckDB but should remain user-directed.
Install Mechanism
There is no install script or code package; README installation is a manual copy into the Claude skills directory. Metadata lists the source as unknown and no homepage, so provenance is limited even though the artifact itself is simple.
Credentials
No credentials, environment variables, network services, privileged paths, or background services are requested. The undeclared DuckDB binary requirement is a usability/metadata gap rather than suspicious behavior.
Persistence & Privilege
The artifacts do not show autonomous persistence or background execution. The only persistence described is normal user-directed skill installation and optional DuckDB configuration/database files.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install duckdb-cli-ai-skills
  3. After installation, invoke the skill by name or use /duckdb-cli-ai-skills
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release of DuckDB CLI specialist skill for data analysis and conversion. - Provides concise CLI usage, SQL examples, and command arguments for DuckDB. - Supports SQL queries, CSV/Parquet/JSON analysis, file conversion, and database management from the command line. - Includes quick-start guides, data conversion commands, output format options, and dot command references. - Documents keyboard shortcuts, autocomplete features, analysis patterns, and safe mode usage. - Features configuration and editor integration tips for streamlined workflows.
Metadata
Slug duckdb-cli-ai-skills
Version 1.0.0
License
All-time Installs 22
Active Installs 22
Total Versions 1
Frequently Asked Questions

What is DuckDB CLI skills?

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". It is an AI Agent Skill for Claude Code / OpenClaw, with 4323 downloads so far.

How do I install DuckDB CLI skills?

Run "/install duckdb-cli-ai-skills" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is DuckDB CLI skills free?

Yes, DuckDB CLI skills is completely free (open-source). You can download, install and use it at no cost.

Which platforms does DuckDB CLI skills support?

DuckDB CLI skills is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created DuckDB CLI skills?

It is built and maintained by CamelSprout (@camelsprout); the current version is v1.0.0.

💬 Comments