Agent-skills motherduck-connect
Connect to MotherDuck from any application. Use when setting up database connectivity via the Postgres endpoint (recommended), pg_duckdb, native DuckDB API, or JDBC. Covers connection strings, authentication, SSL, and environment variable configuration.
install
source · Clone the upstream repo
git clone https://github.com/motherduckdb/agent-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/motherduckdb/agent-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/plugins/motherduck-skills-claude/skills/motherduck-connect" ~/.claude/skills/motherduckdb-agent-skills-motherduck-connect && rm -rf "$T"
manifest:
plugins/motherduck-skills-claude/skills/motherduck-connect/SKILL.mdsource content
Connect to MotherDuck
Use this skill when establishing database connectivity from any application, script, or service to MotherDuck. Start here before running queries or loading data.
Source Of Truth
- Prefer current MotherDuck connection, attach-mode, read-scaling, and multithreading docs.
- If the MotherDuck MCP
feature is available, use it first for current connection behavior.ask_docs_question - When it is unavailable, verify guidance against the public docs before making firm claims about connection strings, token types, or read-scaling behavior.
Default Posture
- Start with the PG endpoint for backend applications, BI tools, and serverless runtimes that want PostgreSQL wire compatibility.
- For BI tools, treat the PG endpoint as the compatibility path for Power BI and Tableau Cloud when current docs list them as supported.
- Use the native DuckDB API only when you need local files, hybrid local/cloud execution, or direct DuckDB control.
- Use
workspace connections for multi-database exploration, bootstrap flows, and temporary validation environments.md: - Start with one connection. Add pooling or read scaling only when real concurrent-read pressure exists.
- Use native DuckDB
where supported; for PG endpoint clients, prefer the client'scustom_user_agent
setting when available.application_name
Workflow
- Choose one connection method and do not mix methods in the same application.
- Put the MotherDuck token in environment-managed secrets, not in source code.
- Establish the connection with explicit SSL settings where required.
- Verify the connection with
and then list reachable tables.SELECT 1 AS connected - If the workload is read-heavy and concurrent, evaluate read scaling and
.session_hint
Open Next
for connection-method selection, PG endpoint and native DuckDB examples, token handling, read scaling, attach modes, and common failure modesreferences/CONNECTION_GUIDE.md
Related Skills
for discovering databases, tables, columns, and shares after the connection is establishedmotherduck-explore
for executing DuckDB SQL against the connected databasesmotherduck-query
for DuckDB syntax and function lookup supportmotherduck-duckdb-sql