motherduck-explore

Discover databases, tables, columns, and data shares in MotherDuck.

Updated Oct 15, 2019
One-click install
npx skills add https://github.com/kkkaoru/dotfiles --skill motherduck-explore-kkkaoru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: motherduck-explore
Source: https://github.com/kkkaoru/dotfiles/tree/main/.agents/skills-stroage/motherduck-explore
Command: npx skills add https://github.com/kkkaoru/dotfiles --skill motherduck-explore-kkkaoru

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires duckdb, pg, and includes references (resource) components.

What problem does it solve? Analysts often waste time writing queries against unknown schemas or miss data entirely because they do not know which databases, tables, or shared datasets exist in their MotherDuck account. This Skill provides a structured top-down workflow for catalog discovery, schema inspection, and data previewing before any analytical SQL is written. ## Core Features & Use Cases - Catalog Discovery: List databases, tables, views, and columns using MD_ALL_DATABASES(), duckdb_tables(), and duckdb_columns(), including shared databases via MD_INFORMATION_SCHEMA. - Schema Profiling: Run SUMMARIZE for statistics on ranges, cardinality, and null rates, then preview sample rows to confirm table grain and join keys. - MCP Tool Guidance: Prefer structured MotherDuck MCP tools like list_databases, list_tables, and search_catalog over ad hoc SQL when available. - Use Case: Before building a revenue dashboard, use this Skill to locate the correct orders table across attached databases, inspect its column types and comments, and confirm the date and customer key columns needed for joins. ## Quick Start Connect to MotherDuck and show me all databases, tables, and column types available in my account, then summarize the largest table.

Frequently Asked Questions about motherduck-explore

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list all databases and tables in MotherDuck?

Query MD_ALL_DATABASES() to list attached databases, then use duckdb_tables() filtered by database_name to list tables and views. When using the MotherDuck MCP server, the list_databases and list_tables tools return the same information in structured form.

How to profile a table in MotherDuck before writing queries?

Run SUMMARIZE on the fully qualified table name to get per-column min, max, approximate distinct counts, percentiles, and null percentages. Follow with a LIMIT 10 preview query to inspect actual values and confirm table grain.

How do I find shared databases in MotherDuck?

Query MD_INFORMATION_SCHEMA.SHARED_WITH_ME to list shares available to you, then attach one with ATTACH '<share_url>' AS shared_db. Check shared databases before concluding that data is unavailable in your account.

Can I explore MotherDuck from Python or TypeScript?

Yes. In Python, connect with duckdb.connect("md:") and run catalog queries directly. In TypeScript, connect via the pg client to the MotherDuck PostgreSQL endpoint using your MotherDuck token and query the same metadata functions.

Why does my MotherDuck query fail with table not found?

This usually happens when multiple databases are attached and the table name is not fully qualified. Use the database.schema.table format and verify the table exists with duckdb_tables() before querying.