Motherduck share data

From motherduckdb/agent-skills · View interactive version

Motherduck share data is an AI agent skill from the GitHub repository motherduckdb/agent-skills. Create, consume, or manage MotherDuck data shares, including audience grants, table filters, and refresh policy.

How to use this skill

Skill file

Share Data with MotherDuck

Source Of Truth

Prerequisites

A working connection, the source database, and the intended audience. Reuse these from context; related skills are available for missing setup or SQL details.

Default Posture

Workflow

  1. Identify the exact database to publish and who should consume it.
  2. Decide the audience, visible table/view subset, discoverability, and freshness requirements before writing SQL.
  3. Preview and validate any include pattern against the live source catalog, then create the share with explicit access, visibility, update mode, and optional INCLUDE_PATTERN.
  4. If access is restricted, grant users or roles explicitly. If the share is hidden or link-based, distribute the share URL directly.
  5. Read the share back with LIST SHARES or MD_INFORMATION_SCHEMA.OWNED_SHARES; for filtered shares, verify the stored pattern and consumer-visible catalog. For secure views, run SHOW SECURE VIEWS ON SHARE <name> and attach the share as a consumer to check the result; identity functions evaluate as whoever runs the test.
  6. Have recipients ATTACH the shared database and query it read-only.
  7. Use ALTER SHARE ... SET|RESET INCLUDE_PATTERN for table/view scope changes and ALTER SHARE ... ADD|DROP SECURE VIEW for policy changes (not both in one statement). Avoid CREATE OR REPLACE SHARE on a share with secure views; it drops any view it does not restate. If the share uses UPDATE MANUAL, the owner runs UPDATE SHARE and consumers run REFRESH DATABASE when a new snapshot is ready.

For answer, review, or planning requests, return the sharing design and SQL without provisioning. For create, update, grant, or revoke requests, perform the requested in-scope operation and validate the resulting access; ask before public exposure, destructive revocation, or unrelated grants.

References

Read only the reference sections needed for the current task.

Related Skills

Load related skills only for missing capabilities; reuse established context.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.