← 返回 Skills 市场
proxx

Duckdb Cli

作者 Proxx · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
316
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install duckdb-cli
功能描述
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conver...
使用说明 (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
安全使用建议
This skill is essentially documentation and examples for using the DuckDB CLI — it doesn't request secrets or install code — but check a few things before using it with sensitive data: 1) Ensure you have the duckdb binary installed and know its location (the skill assumes 'duckdb' is on PATH but does not declare it). 2) Confirm the skill's source/owner (registry metadata vs _meta.json/README show inconsistent IDs/slugs); only install from a trusted publisher. 3) Be aware the examples read/write arbitrary local files and the ~/.duckdbrc config; review that file for sensitive content before letting any automated agent run commands. 4) If you plan to run the suggested commands in an automated agent, restrict them to non-sensitive test data first. If you want higher confidence, ask the publisher to correct the declared dependencies and metadata before installing.
功能分析
Type: OpenClaw Skill Name: duckdb-cli Version: 1.0.0 The skill bundle is a legitimate documentation and instruction set for using the DuckDB CLI. The content in SKILL.md and README.md provides helpful SQL examples, command-line arguments, and configuration tips that align perfectly with the stated purpose of assisting with data analysis and file conversion. No malicious patterns, data exfiltration attempts, or harmful prompt injections were found.
能力评估
Purpose & Capability
The skill's name/description match the SKILL.md content (DuckDB CLI usage, SQL, conversions). However the package declares no required binaries while every runtime example invokes the duckdb CLI — the skill implicitly requires the duckdb binary to be available but does not declare that dependency. Also _meta.json contains owner/slug values that differ from the registry metadata, which is an inconsistency in provenance.
Instruction Scope
SKILL.md contains only usage examples, CLI flags, and examples that read and write local files, stdout/stdin, and the ~/.duckdbrc config. It does not direct data to external endpoints, request unrelated credentials, or instruct the agent to scan system state beyond files the user works with. Reading/writing arbitrary local files is expected for this purpose and is documented.
Install Mechanism
This is an instruction-only skill with no install spec or code to write to disk. README suggests a manual copy into a Claude skills directory. No remote downloads or extracted archives are used.
Credentials
No environment variables, credentials, or config paths are required. The skill does reference ~/.duckdbrc (DuckDB CLI config) and common filesystem paths like /dev/stdin — appropriate for a CLI helper and not requests for secrets.
Persistence & Privilege
Skill does not request always: true and does not attempt to modify other skills or system-wide settings. It is user-invocable and can be called autonomously by the agent (platform default), which is reasonable for a helper skill.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install duckdb-cli
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /duckdb-cli 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: DuckDB CLI specialist for SQL, data analysis, and file conversion. - Provides SQL query, data inspection, and file conversion examples for CSV, Parquet, and JSON. - Documents output formats, command-line flags, and execution arguments. - Lists dot-commands, keyboard shortcuts, and autocomplete options for efficient CLI operations. - Includes database management, statistics, joins across files, and export capabilities. - Offers configuration tips, Safe Mode explanation, and practical usage notes.
元数据
Slug duckdb-cli
版本 1.0.0
许可证 MIT-0
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Duckdb Cli 是什么?

DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conver... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 316 次。

如何安装 Duckdb Cli?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install duckdb-cli」即可一键安装,无需额外配置。

Duckdb Cli 是免费的吗?

是的,Duckdb Cli 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Duckdb Cli 支持哪些平台?

Duckdb Cli 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Duckdb Cli?

由 Proxx(@proxx)开发并维护,当前版本 v1.0.0。

💬 留言讨论