Motherduck create dive

From motherduckdb/agent-skills · View interactive version

Motherduck create dive is an AI agent skill from the GitHub repository motherduckdb/agent-skills. Create, edit, design, publish, share, or embed MotherDuck Dives, including responsive layout, light/dark themes, and buttons that write back through Flights.

How to use this skill

Skill file

Create and Manage MotherDuck Dives

Source Of Truth

Default Posture

Feature-Complete Defaults

get_dive_guide owns the runtime contract and the MotherDuck visual rules (palette, chart sizing, no card chrome, static Tailwind only); do not restate them. A new Dive or full redesign should also ship with these on the first save. Start from artifacts/feature_complete_dive.tsx, which implements all of them, and delete what the Dive does not need. For a scoped edit, preserve the existing design and check only the affected states.

Workflow

  1. Choose the requested delivery path: workspace Dive, existing edit, Dives-as-code, write-back actions, sharing, or embedding. Follow only that path; a chart request does not itself authorize sharing, embedding, or write-back.
  2. Explore the live schema and validate the core SQL first.
  3. Call get_dive_guide if MCP is available, then design the story, sections, interactions, and theme.
  4. Build or edit the Dive component, using local preview/hot reload when possible.
  5. Call save_dive, update_dive, or deploy only after queries, loading states, required resources, and visual behavior are correct.
  6. Read the resulting URL, version, and status back. If the requested delivery includes publication, promote a validated Draft to Ready through the write-capable path.
  7. If teammates or application users need access, check three things: they can view the Dive, every REQUIRED_DATABASES entry is a share they can read, and they hold a run grant on each Flight the Dive runs. Prefer an existing share of an owned database (MD_INFORMATION_SCHEMA.OWNED_SHARES). When the user asks to share the Dive's data with the whole organization, share_dive_data creates org-scoped shares and updates the Dive in one call; use motherduck-share-data for restricted audiences, and the embed-session flow for application users.

For answer, review, or planning requests, stop at the requested design or code artifact. For create, update, or deploy requests, carry the requested in-scope operation through preview and validation; ask before destructive replacement or a broader external rollout that the request did not authorize. Before save_dive or update_dive, follow the review step that get_dive_guide sets for your client: when it asks you to show the final source or preview and get the user's go-ahead, do that once, unless the user already said to save without review.

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.