MCPInstall

duckdb-docs

Search DuckDB and DuckLake documentation and blog posts. Returns relevant doc chunks for a question or keyword using full-text search against a locally cached index.

Installs
1.3K
Last 24h
+10
Trending rank
#8857
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/duckdb/duckdb-skills --skill duckdb-docs
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads duckdb-docs automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

You are helping the user find relevant DuckDB or DuckLake documentation.

Query: $@

Follow these steps in order.

Step 1 — Check DuckDB is installed

command -v duckdb

If not found, delegate to /duckdb-skills:install-duckdb and then continue.

Step 2 — Ensure required extensions are installed

duckdb :memory: -c "INSTALL httpfs; INSTALL fts;"

If this fails, report the error and stop.

Step 3 — Choose the data source and extract search terms

The query is: $@

Data source selection

There are two search indexes available:

IndexRemote URLLocal cache filenameVersionsUse when
DuckDB docs + bloghttps://duckdb.org/data/docs-search.duckdbduckdb-docs.duckdblts, current, blogDefault — any DuckDB question
DuckLake docshttps://ducklake.select/data/docs-search.duckdbducklake-docs.duckdbstable, previewQuery mentions DuckLake, catalogs, or DuckLake-specific features

Both indexes share the same schema:

ColumnTypeDescription
chunk_idVARCHAR (PK)e.g. stable/sql/functions/numeric#absx
page_titleVARCHARPage title from front matter
sectionVARCHARSection heading (null for page intros)
breadcrumbVARCHARe.g. SQL > Functions > Numeric
urlVARCHARURL path with anchor
versionVARCHARSee table above
textTEXTFull markdown of the chunk

By default, search DuckDB docs and filter to version = 'lts'. Use different versions when:

  • The user explicitly asks about current/nightly features → version = 'current'
  • The user asks about a blog post or wants background/motivation → version = 'blog'
  • The user asks about DuckLake → search the DuckLake index with version = 'stable'
  • When unsure, omit the version filter to search across all versions.

Search terms

If the input is a natural language question (e.g. "how do I find the most frequent value"), extract the key technical terms (nouns, function names, SQL keywords) to form a compact BM25 query string. Drop stop words like "how", "do", "I", "the".

If the input is already a function name or technical term (e.g. arg_max, GROUP BY ALL), use it as-is.

Use the extracted terms as SEARCH_QUERY in the next step.

Step 4 — Ensure local cache is fresh

The cache lives at $HOME/.duckdb/docs/CACHE_FILENAME (where CACHE_FILENAME is duckdb-docs.duckdb or ducklake-docs.duckdb per Step 3).

First, ensure the directory exists:

mkdir -p "$HOME/.duckdb/docs"

Then check whether the cache file exists and is fresh (≤2 days old):

CACHE_FILE="$HOME/.duckdb/docs/CACHE_FILENAME"
if [ -f "$CACHE_FILE" ]; then
    MTIME=$(stat -f %m "$CACHE_FILE" 2>/dev/null || stat -c %Y "$CACHE_FILE")
    CACHE_AGE_DAYS=$(( ( $(date +%s) - MTIME ) / 86400 ))
else
    CACHE_AGE_DAYS=999
fi
echo "Cache age: $CACHE_AGE_DAYS days"

If CACHE_AGE_DAYS ≤ 2 → skip to Step 5.

Otherwise (stale or missing) → fetch the index:

duckdb -c "
LOAD httpfs;
LOAD fts;
ATTACH 'REMOTE_URL' AS remote (READ_ONLY);
ATTACH '$HOME/.duckdb/docs/CACHE_FILENAME.tmp' AS tmp;
COPY FROM DATABASE remote TO tmp;
" && mv "$HOME/.duckdb/docs/CACHE_FILENAME.tmp" "$HOME/.duckdb/docs/CACHE_FILENAME"

Replace REMOTE_URL and CACHE_FILENAME per Step 3. If the fetch fails (network error), report the error and stop.

Step 5 — Search the docs

duckdb "$HOME/.duckdb/docs/CACHE_FILENAME" -readonly -json -c "
LOAD fts;
SELECT
    chunk_id, page_title, section, breadcrumb, url, version, text,
    fts_main_docs_chunks.match_bm25(chunk_id, 'SEARCH_QUERY') AS score
FROM docs_chunks
WHERE score IS NOT NULL
  AND version = 'VERSION'
ORDER BY score DESC
LIMIT 8;
"

Replace CACHE_FILENAME, SEARCH_QUERY, and VERSION per Step 3. Remove the AND version = 'VERSION' line if searching across all versions.

If the user's question could benefit from both DuckDB docs and blog results, run two queries (one with version = 'stable', one with version = 'blog') or omit the version filter entirely.

Step 6 — Handle errors

  • Extension not installed (httpfs or fts not found): run duckdb :memory: -c "INSTALL httpfs; INSTALL fts;" and retry.
  • ATTACH fails / network unreachable: inform the user that the docs index is unavailable and suggest checking their internet connection. The DuckDB index is hosted at https://duckdb.org/data/docs-search.duckdb and the DuckLake index at https://ducklake.select/data/docs-search.duckdb.
  • No results (all scores NULL or empty result set): try broadening the query — drop the least specific term, or try a single-word version of the query — then retry Step 5. If still no results, tell the user no matching documentation was found and suggest visiting https://duckdb.org/docs or https://ducklake.select/docs directly.

Step 7 — Present results

For each result chunk returned (ordered by score descending), format as:

### {section} — {page_title}
{url}

{text}

---

After presenting all chunks, synthesize a concise answer to the user's original question ($@) based on the retrieved documentation. If the chunks directly answer the question, lead with the answer before showing the sources.

FAQ

What does the duckdb-docs skill do?

Search DuckDB and DuckLake documentation and blog posts. Returns relevant doc chunks for a question or keyword using full-text search against a locally cached index.

How do I install duckdb-docs?

Run npx skills add https://github.com/duckdb/duckdb-skills --skill duckdb-docs in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/duckdb-docs/ (personal) or .claude/skills/duckdb-docs/ (project).

Which AI agents can use duckdb-docs?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is duckdb-docs safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains duckdb-docs?

It is published by duckdb in duckdb/duckdb-skills. It has 1,322 recorded installs.

More from duckdb/duckdb-skills

View all →

query

duckdb/duckdb-skills

Run SQL queries against the attached DuckDB database or ad-hoc against files. Accepts raw SQL or natural language questions. Uses DuckDB Friendly SQL idioms.

Data & Databases1.5K installs

read-file

duckdb/duckdb-skills

Read any data file (CSV, JSON, Parquet, Avro, Excel, spatial, SQLite) or remote URL (S3, HTTPS). Use when user references a data file, asks "what's in this file", or wants to preview/profile a dataset. Not for source code.

Data & Databases1.2K installs

attach-db

duckdb/duckdb-skills

Attach a DuckDB database file for use with /duckdb-skills:query. Explores the schema (tables, columns, row counts) and writes a SQL state file so subsequent queries can restore this session automatically via duckdb -init.

Data & Databases1K installs

install-duckdb

duckdb/duckdb-skills

Install or update DuckDB extensions. Each argument is either a plain extension name (installs from core) or name@repo (e.g. magic@community). Pass --update to update extensions instead of installing.

942 installs

read-memories

duckdb/duckdb-skills

Search past Claude Code session logs to recall prior decisions, patterns, or unresolved work. Use when user says "do you remember", "what did we do", references past conversations, or you need context from prior sessions.

815 installs

convert-file

duckdb/duckdb-skills

Convert any data file to another format: CSV, Parquet, JSON, Excel, GeoJSON, and more. Use when the user says "convert to parquet", "save as xlsx", "export as JSON", "make this a CSV", "turn into parquet", or any variation of format-to-format conversion for data files. Also triggers when the user wants to write Parquet, Excel, or other binary formats that Claude cannot produce natively.

Data & Databases787 installs

Popular docs & writing skills

View category →

grill-with-docs

mattpocock/skills

A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.

Docs & Writing1.2M installs

lark-markdown

open.feishu.cn

飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。

Docs & Writing778.7K installs

writing-beats

mattpocock/skills

Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.

Docs & Writing490.7K installs

writing-shape

mattpocock/skills

Writing, exploit: shape raw material into an article, paragraph by paragraph.

Docs & Writing490.2K installs

writing-fragments

mattpocock/skills

Writing, explore: mine raw fragments, no structure yet.

Docs & Writing489.6K installs

writing-for-agents

mattpocock/skills

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

Docs & Writing479.3K installs