About motherduck-explore
An Agent skill for exploring MotherDuck catalogs and table structures before modeling or analysis. It checks relevant Guides and shared data, then produces a concise schema map covering grain, join keys, date columns, and likely measures.
Key features
- 01Locate databases, tables, and views
- 02Read Guide and catalog context
- 03Inspect columns, types, nullability, and comments
- 04Profile data selectively when needed
- 05Map grain, join keys, and measures
Use cases
- 01Map data structures before analysis
- 02Check field visibility in shared data
- 03Prepare joins for querying or modeling
MCP support
It requires an established MotherDuck connection or an active MotherDuck MCP server. Available catalog tools can list databases, tables, views, columns, and macros, and search the catalog.
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ motherduckdb/ agent-skills --skill motherduck-exploreAfter installing, type/motherduck-explorein Claude Code to confirm it loaded.
Bundled filesreferences/EXPLORATION_PLAYBOOK.md
Details
From the project READMEExplore MotherDuck Data
Prerequisites
- An established MotherDuck connection (or an active MotherDuck MCP server)
Default Posture
- Start at the known catalog object; broaden to databases or shares only when the target is unknown.
- Prefer fully qualified
"database"."schema"."table"names; they are required once more than one database or share is attached. - Check shared databases before concluding that data is unavailable. A share with secure views can hide columns and rows: a missing column in an attached share may be policy, not schema drift.
- Use the MotherDuck MCP tools (
list_databases,list_tables,list_views,list_columns,list_macros,search_catalog) when available because they return structured results faster than ad hoc SQL. Checklist_macrosbefore reimplementing logic; table and scalar macros often encode governed definitions. - Before business-semantic exploration through MCP, call
get_query_guide, then read only relevant root Guides and topic branches. FollowrelatedGuidesreturned by catalog tools when they govern the objects in scope. - Record whether a share is filtered and whether an existing Dive is Draft, Ready, Endorsed, or Archived; these attributes change what downstream agents should trust or expect to see.
- Return a concise schema map with table grain, join keys, date columns, and likely measures before moving into modeling or dashboard work.
Workflow
- List databases in scope.
- Load relevant Guide context, then list tables and views in the target database.
- Inspect columns, types, nullability, and comments before writing queries.
- Use targeted profiling or
SUMMARIZEwhen ranges, cardinality, or null rates affect the answer; avoid broad scans for a catalog lookup. - Preview rows with
SELECT * ... LIMIT norUSING SAMPLE; on wide tables these read only the row groups they need. Capture grain and join assumptions, and only then move into analytical SQL or modeling work.
References
Read only the reference sections needed for the current task.
- Read
references/EXPLORATION_PLAYBOOK.mdfor the full SQL workflow, share discovery patterns, MCP tool guidance, and common exploration mistakes
Related Skills
Load related skills only for missing capabilities; reuse established context.
motherduck-connectfor session setup and authenticationmotherduck-queryfor analytical SQL after the schema is understoodmotherduck-duckdb-sqlfor DuckDB syntax patterns during explorationmotherduck-share-datafor creating and consuming shares once shared datasets become part of the workflowmotherduck-manage-guidesfor reading or maintaining the context attached to discovered objects
Comments
Markdown supported