duckdb
Skill2 starsChanged 29 days agoApache-2.0View on GitHub
Queries, inspects, transforms, and converts local structured data files (JSON, JSONL, NDJSON, CSV, TSV, Parquet, SQLite), unified code diffs, and Markdown documents on Linux and macOS with DuckDB SQL (duckdb -batch -dark-mode). Use when querying local JSON, CSV, or SQLite files, benchmark artifacts, large diffs, or Markdown corpora, inspecting schemas and row counts, joining JSONL logs with SQLite indexes (such as transcript.jsonl and conversation_summaries.db), joining across formats, converting to Parquet, or filtering stdin pipelines. Prefer it over ad hoc Python or jq. Flags: -batch, -dark-mode, -agent, -no-stdin, -box, -json, -csv, -markdown, -manual, -format, -init, -c. Don't use for remote cloud data warehouses (BigQuery, Snowflake, Spanner) or PLx dashboards.
- Installs packages
13 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Nov 8, 2026
- fmind/dotfilestheir own version, first seen Nov 8, 2026
- bmsuisse/skillstheir own version, first seen Nov 6, 2026
- kevmoo/kevmoo_skillsedited, first seen Nov 5, 2026
- mjun0812/skillstheir own version, first seen Nov 1, 2026
- erikdarlingdata/PerformanceMonitortheir own version, first seen Oct 25, 2026
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- kevmoo/kevmoo_skills★ 2261% same
Wrote their own version · 12
- erikdarlingdata/PerformanceMonitor★ 526same name
- tondevrel/scientific-agent-skills★ 22same name
- G1Joshi/Agent-Skills★ 15same name
- fmind/dot★ 13same name
- fmind/dotfiles★ 13same name
- benjaminwestern/google-engineer-skills★ 5same name
- bmsuisse/skills★ 2same name
- Jiplet/transformation-os★ 2same name
- silvainfm/claude-skills★ 2same name
- jcsaaddupuy/badrobots★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository37 other files it gives its agents.
- agy-debuggerSkill
- analyze-github-prSkill
- api-reviewSkill
- branch-cleanupSkill
- code-documentationSkill
- code-reviewSkill
- cognitive-complexitySkill
- commit-changesSkill
- context-indexerSkill
- cost-optimizationSkill
- dart-cli-app-best-practicesSkill
- dart-concurrencySkill
- dart-modern-featuresSkill
- designSkill
- flutter-architectureSkill
- flutter-concurrencySkill
- flutter-testingSkill
- gh-cliSkill
- git-stackSkill
- grill-meSkill
- matcher-to-checksSkill
- merge-codeSkill
- mermaid-diagramsSkill
- monitorSkill
- nochangeSkill
- packratSkill
- planSkill
- pr-feedback-handlerSkill
- proposal-writerSkill
- pr-reviewer-recommendationSkill
- pr-reviewSkill
- sem-semantic-infoSkill
- ship-itSkill
- skill-creatorSkill
- unix-cli-best-practicesSkill
- write-pr-descriptionSkill
- write-proseSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 1 is distinctive, and 13 are very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 62
Always pass -batch -dark-mode together in subshells:
- Very specific: line 76
Use Agent Mode on v2.0+ (-agent, -no-agent, AI_AGENT=1, DUCKDB_AGENT_MODE=1):
- Very specific: line 98
Use -json or -jsonlines to output structured JSON arrays or NDJSON rows (0 bytes on stderr).
- Very specific: line 100
Use -csv to output uncapped comma-separated rows with headers (use over -agent for full-table exports or large read_md_sections scans).
- Very specific: line 102
Use -markdown to print column-padded GFM pipe tables without :TYPE or hash footers.
- Very specific: line 104
Use -box or -no-agent for human-oriented padded Unicode boxed tables.
- Very specific: line 105
Use -manual <function> (v2.0+) to print offline function signatures, descriptions, and examples (duckdb -batch -dark-mode -manual …
- Very specific: line 107
Use -format or -format-file <path.sql> (v2.0+) to format SQL to stdout (emits ANSI color codes on a TTY.
- Very specific: line 110
Use -bail to stop execution on the first error.
- Very specific: line 137
When reading JSONL with varying keys across rows, DuckDB defaults to a shared schema and may drop extra keys.
- Very specific: line 144
When scanning thousands of JSONL files (such as transcript.jsonl), passing an explicit columns={...} map skips schema inference and speeds …
- Very specific: line 194
Always check file path/to/database.db first:
- Very specific: line 234
When a query produces a quantitative series, distribution, or bench_press target comparison with 4 or more data points (or 2+ series across …
- Distinctive: line 240
Keep 1 to 3 scalar numbers, mixed-unit rows, and string-heavy lookup tables in plain Markdown.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
DuckDB CLI Analytics
Fast analytical SQL engine for querying and converting local data files (JSON, JSONL, CSV, TSV, Parquet, SQLite), code diffs, and Markdown files from the shell. It runs without database servers or external imports.
Quick Start & Execution Setup
DuckDB runs as a standalone CLI binary. Always pass -dark-mode on every
invocation (including duckdb -dark-mode --version and --help), and pass
-batch -dark-mode on all queries and -manual lookups.
Installation & Subshell PATH Setup (Linux & macOS)
To prevent exit code 127: duckdb: command not found in non-interactive agent
subshells (where mise or asdf shims are not sourced):
- Pin
"github:duckdb/duckdb" = "2"in~/.config/mise/config.tomlto track stable2.xreleases with SLSA provenance verification, and put~/.local/share/mise/shimsonPATHin the startup files that non-interactive shells read (~/.zshenv,BASH_ENV, or~/.config/environment.d/*.conf) (Recommended). The shims are symlinks tomiseitself, so they resolve even whenmiseis offPATHand cover every managed tool. Keep~/.local/bin(and any user command directory such as~/cmd) before the shims directory so custom wrappers still win. Make the binary directly accessible at
~/.local/bin/duckdb(or/opt/homebrew/bin/duckdbon Apple Silicon macOS) when shims are unavailable. Note that a per-tool symlink collides with any dotfiles repository that tracks the same path:# Option A: If installed via mise ("github:duckdb/duckdb" = "2"), symlink into ~/.local/bin/ ln -sf ~/.local/share/mise/installs/github-duckdb-duckdb/2/duckdb ~/.local/bin/duckdb # Option B: macOS Homebrew brew install duckdb # Option C: Direct download from GitHub Releases (v2.0+ uses .tar.gz archives; # replace linux-amd64 with linux-arm64 or osx-arm64 as needed) curl -fsSL https://github.com/duckdb/duckdb/releases/latest/download/duckdb-cli-linux-amd64.tar.gz \ | tar -xzf - -C ~/.local/bin/ duckdb
Critical Flags & DuckDB v2.0+ Agent Mode
- Always pass
-batch -dark-modetogether in subshells:- Pass
-dark-mode(or-light-mode) on every invocation. DuckDB probes the terminal background color via OSC sequences wheneverstdoutis a TTY, even before handling--version,--help,-manual, or-format. In PTY-allocated agent subshells this probe times out after 5 seconds (Timeout trying to read terminal background color (> 5s elapsed)), and neither-batch,-agent, norDUCKDB_AGENT_MODE=1disables it. - Pass
-batchto disable interactive prompts, progress bars, andlesspaging. It is also required withv2.0+-manual <fn>, which otherwise retains interactive detection and triggers both the 5-second color probe and the pager. - Pass
-no-stdinto exit after processing CLI options instead of readingstdinwhen spawned from child-process runners whosestdinpipe stays open (omit when streaming data from/dev/stdin).
- Pass
- Use Agent Mode on
v2.0+(-agent,-no-agent,AI_AGENT=1,DUCKDB_AGENT_MODE=1):- Agent Mode renders compact unpadded Markdown tables with inline column types
(
| col:TYPE |), loud head and tail caps (1,000rows,10,000bytes,500-char cells via.maxrows/.maxbytes), a row-count and order-independent hash footer, JSON errors and>1M-row progress onstderr, and 1-line-per-operatorEXPLAINplans. Because row and byte caps remain active even under-batchand> fileredirection, use-csvor-jsonfor untruncated exports. - Omit
-boxon exploratory queries.duckdb -batch -dark-modedefaults toboxonv1.x, and onv2.0+built-in Agent Mode auto-detection (CLAUDECODE,GEMINI_CLI,CURSOR_AGENT,CODEX_*,COPILOT_*,AI_AGENT,AGENT) activates whenstdoutis not a TTY and no output flag is set. Passing-boxdisables auto-detection and overrides-agent(3x-5xwhitespace padding and silent>40-row truncation); pass-agentexplicitly in PTY subshells wherestdoutis a TTY. - In
PATHwrappers, pairexport AI_AGENT=1; unset DUCKDB_AGENT_MODEbecauseDUCKDB_AGENT_MODE=1keepsagent_mode_active = trueonstderreven with-json,-csv, or-markdown, and inspect"$@"before prepending-dark-modeor-batchso-light-modeand-interactivestill win.
- Agent Mode renders compact unpadded Markdown tables with inline column types
(
- Output formatting and utility flags:
- Use
-jsonor-jsonlinesto output structured JSON arrays or NDJSON rows (0bytes onstderr). - Use
-csvto output uncapped comma-separated rows with headers (use over-agentfor full-table exports or largeread_md_sectionsscans). - Use
-markdownto print column-padded GFM pipe tables without:TYPEor hash footers. - Use
-boxor-no-agentfor human-oriented padded Unicode boxed tables. - Use
-manual <function>(v2.0+) to print offline function signatures, descriptions, and examples (duckdb -batch -dark-mode -manual regexp_extract). - Use
-formator-format-file <path.sql>(v2.0+) to format SQL tostdout(emits ANSI color codes on a TTY; pass-dark-modeand pipe| cator redirect> out.sqlfor plain SQL text). - Use
-bailto stop execution on the first error.
- Use
# Exploratory agent query (v2.0+ compact typed Markdown + hash; omit -box)
duckdb -batch -dark-mode -agent -c "SELECT 42 AS answer;"
# Version-neutral exploratory query (box on v1.x; Agent Mode when piped or wrapped on v2.0+)
duckdb -batch -dark-mode -c "SELECT 42 AS answer;"
# Programmatic JSON output (add -no-stdin when spawned from a child-process runner)
duckdb -batch -no-stdin -dark-mode -json -c "SELECT 42 AS answer;"
# Offline SQL function manual lookup & plain-text SQL formatting (v2.0+)
duckdb -batch -dark-mode -manual regexp_extract
printf "select a, b from tbl where a = 1;\n" | duckdb -dark-mode -format | catCore Gotchas & Invariants
- Passing
-batch,-agent,DUCKDB_AGENT_MODE=1,--version,--help,-manual, or-formatwithout-dark-modedoes not disable DuckDB's 5-second OSC probe for the terminal color on a TTY, and-manualwithout-batchretains interactive paging. Always pass-batch -dark-mode. - DuckDB follows ANSI SQL 1-based array indexing:
arr[1]is the first element, andarr[0]produces an out-of-bounds error. - When reading JSONL with varying keys across rows, DuckDB defaults to a shared
schema and may drop extra keys. Pass
union_by_name = trueinsideread_jsonorread_json_auto. - In log files or interrupted processes, malformed JSON lines abort the query.
Pass
ignore_errors = trueto skip broken lines. - Files ending in
.gzor.zstare read automatically without manual decompression. - When scanning thousands of JSONL files (such as
transcript.jsonl), passing an explicitcolumns={...}map skips schema inference and speeds up scans by 3x. Typing a nested object or array column as'JSON'or'JSON[]'returns raw JSON-encoded strings with embedded quotes, which breaks equality checks.- Type nested objects as
STRUCT(...)[](for example,columns={'tool_calls': 'STRUCT(name VARCHAR, args JSON)[]'}), or extract strings with->>(tc->>'name' = 'run_command').
- Type nested objects as
- Both native DuckDB databases and SQLite databases often use
.dbextensions. RunningATTACH 'path/to/file.db' AS db (TYPE SQLITE)on a DuckDB file fails withfile is not a database. Runfile path/to/file.dbfirst when the format is unknown. - DuckDB
v2.0+writes storage version69(v2.0.0+) on new.duckdbfiles, whichv1.5.xand earlier cannot open (whilev2.0+reads existingv1.xfiles transparently). Pass-storage-version v1.5.0forv1.5.xreaders (orv1.2.0forv1.2+; check viaSELECT tags['storage_version'] FROM duckdb_databases()).
Quick Format & Streaming Patterns
1. JSON / JSONL & Nested Unnesting
# Preview JSONL with irregular schema / interrupted lines tolerance
duckdb -batch -dark-mode -c "SELECT * FROM read_json('logs/*.jsonl', union_by_name=true, ignore_errors=true) LIMIT 10;"
# Dot access, 1-based array indexing, and unnest()
duckdb -batch -dark-mode -c "SELECT id, user.email, tags[1] AS primary_tag, unnest(tags) AS tag FROM 'users.jsonl';"2. CSV, TSV & Parquet
# Auto-detect CSV/TSV or read compressed .csv.gz directly
duckdb -batch -dark-mode -c "SELECT * FROM 'export.csv.gz' LIMIT 10;"
# Read Parquet globs and inspect schema without scanning rows
duckdb -batch -dark-mode -c "SELECT * FROM 'metrics/*.parquet' WHERE value > 100 LIMIT 10; SELECT * FROM parquet_schema('metrics/part-00.parquet');"3. Standard Input Streaming (/dev/stdin)
curl -s "https://api.example.com/items" | \
duckdb -batch -dark-mode -c "SELECT * FROM read_json('/dev/stdin') LIMIT 10;"4. Local Databases (.db, .duckdb, .sqlite)
Always check file path/to/database.db first:
# Native DuckDB database file
duckdb -batch -dark-mode path/to/database.db -c "SHOW TABLES;"
# SQLite 3.x database file
duckdb -batch -dark-mode -c "
ATTACH 'path/to/database.db' AS db (TYPE SQLITE, READ_ONLY);
SELECT * FROM db.my_table LIMIT 10;
"SQL Cookbook & Advanced Recipes
Read references/recipes.md,
scripts/diff_macros.sql, and
scripts/markdown_macros.sql for detailed SQL
patterns:
- Agent conversation transcript mining across
~/.gemini/*/brain/*/.system_generated/logs/transcript.jsonland~/.claude/projects/**/*.jsonl, searching and joining JSONL log globs with SQLite index databases (ATTACH ... (TYPE SQLITE, READ_ONLY), such as joiningtranscript.jsonlwithconversation_summaries.db), tool usage and error audits, and strippingEPHEMERAL_MESSAGE<memory>echoes. - Format conversions to ZSTD Parquet (
COPY ... TO), Hive-partitioned reads and writes, and cross-format SQL joins (JSON + CSV + Parquet + SQLite). - Benchmark JSON and log extraction (
<<<BENCH_PRESS_JSON_START>>>), pivoting multi-target (aot/jit/wasm) benchmark results, and tuning memory and thread limits for>10GBdatasets. - Relational code diff querying with
scripts/diff_macros.sqlacross unified code diffs (read_diff_lines,read_diff_hunks). - Relational Markdown indexing with
scripts/markdown_macros.sql(read_md_sections,read_md_code_blocks) for large documents (>= 350lines) and multi-file Markdown corpora (10+files). - When a query produces a quantitative series, distribution, or
bench_presstarget comparison with 4 or more data points (or 2+ series across 3+ categories) sharing a single unit axis and thea2ui-paneplugin is available (render_a2uiis reachable as a native or lazy MCP tool), read thegenuiskill and pair the Markdown table with an inlineChart(mode: "inline"when compact under 500px) ormetrics_dashboardin the pane (mode: "pane"). Keep 1 to 3 scalar numbers, mixed-unit rows, and string-heavy lookup tables in plain Markdown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

