duckdb-en

25
0
Source

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

mkdir -p .claude/skills/duckdb-en && curl -L -o skill.zip "https://mcp.directory/api/skills/download/1303" && unzip -o skill.zip -d .claude/skills/duckdb-en && rm skill.zip

Installs to .claude/skills/duckdb-en

About this skill

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)

FlagFormat
-csvComma-separated
-jsonJSON array
-tableASCII table
-markdownMarkdown table
-htmlHTML table
-lineOne value per line

Execution arguments

ArgumentDescription
-c COMMANDRun SQL and exit
-f FILENAMERun script from file
-init FILEUse alternative to ~/.duckdbrc
-readonlyOpen in read-only mode
-echoShow commands before execution
-bailStop on first error
-header / -noheaderShow/hide column headers
-nullvalue TEXTText for NULL values
-separator SEPColumn 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

CommandDescription
.tables [pattern]Show tables (with LIKE pattern)
.schema [table]Show CREATE statements
.databasesShow attached databases

Output control

CommandDescription
.mode FORMATChange output format
.output fileSend output to file
.once fileNext output to file
.headers on/offShow/hide column headers
.separator COL ROWSet separators

Queries

CommandDescription
.timer on/offShow execution time
.echo on/offShow commands before execution
.bail on/offStop on error
.read file.sqlRun SQL from file

Editing

CommandDescription
.edit or \eOpen 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

ShortcutAction
Home / EndStart/end of line
Ctrl+Left/RightJump word
Ctrl+A / Ctrl+EStart/end of buffer

History

ShortcutAction
Ctrl+P / Ctrl+NPrevious/next command
Ctrl+RSearch history
Alt+< / Alt+>First/last in history

Editing

ShortcutAction
Ctrl+WDelete word backward
Alt+DDelete word forward
Alt+U / Alt+LUppercase/lowercase word
Ctrl+KDelete to end of line

Autocomplete

ShortcutAction
TabAutocomplete / next suggestion
Shift+TabPrevious suggestion
Esc+EscUndo 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

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

286790

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

212415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

206291

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

217234

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

171200

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

165173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.