Create, edit, design, publish, share, or embed MotherDuck Dives, including responsive layout, light/dark themes, and buttons that write back through Flights.
Capabilities
Feature-Complete Defaults
Related Skills
Load related skills only for missing capabilities; reuse established…
Getting started
Full instructionsInstall the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.
Instructions: SKILL.mdv1.0.52
Create and Manage MotherDuck Dives
Source Of Truth
- Prefer current MotherDuck Dive docs first.
- Non-negotiable ordering: when MotherDuck MCP is available, call
get_dive_guidebefore writing Dive code and before everysave_dive,update_dive, oredit_dive_content. The guide defines the current component API and runtime libraries. get_dive_guidealso surfaces relevant conventions from the reserveddivesGuide topic. Apply those conventions when they do not conflict with the user's explicit requirements.- Use the blessed Dives example repo as the reference implementation for local preview, Dives-as-code layout, metadata, CI previews, and deploy scripts.
- Use Dives SQL functions when the user wants a scriptable SQL-native create/read/update/delete workflow instead of MCP tools.
- Treat ordinary Dives and embedded Dives separately. Verify current plan entitlements before promising an embed rollout; do not preserve plan names or availability claims from memory.
Default Posture
- First classify the job: new Dive, existing Dive edit, Dives-as-code workflow, team sharing, or embedding.
- Validate the underlying SQL and schema first with
motherduck-exploreandmotherduck-query; a good Dive starts with a correct query. - Keep Dive queries fully qualified and SQL-heavy; let React handle presentation, not data reshaping.
- Treat the component contract as React +
useSQLQuery, a default export, supported runtime libraries, explicit loading/empty/error states, and no browser-side secrets. useSQLQueryfollows TanStack Query v5: drive first-load skeletons fromisPendingand a subtle "updating" cue fromisFetching;isLoadingis legacy (true on every refetch). Previous rows stay on screen while new SQL loads. A query disabled withenabled: falsestaysisPending, so check the enabling condition first and show a prompt instead of a skeleton.- New Dives start as Draft. Promote a validated Dive to Ready only when the requested delivery includes publication. Only an admin can mark a Dive Endorsed; never self-endorse an agent-created Dive.
- When reusing existing work, prefer Endorsed and then Ready Dives. Archived Dives are retired and excluded from default agent listings unless explicitly requested.
- When local preview uses
REQUIRED_DATABASES, keep the export on one line and mirror the real share dependencies in metadata or save/update inputs. Avoid aliases that collide with existing database names. - Preserve an existing Dive’s visual system for scoped edits. For a new Dive, choose a concrete theme direction that fits its audience.
- Prefer one query per visual section or interaction surface rather than one giant cross-purpose query.
- Preview locally before saving when the environment supports it.
- For existing Dives, read the current content and version metadata before overwriting anything. MCP
list_divesreturnscurrent_version, andread_divecan fetch historical versions. Useedit_dive_content(exact text replacements) for focused edits andupdate_divefor a full rewrite. Useview_diveto show the user a saved Dive, anddelete_diveonly after explicit confirmation; deletion is permanent. - Add export controls only when the use case calls for them:
exportAson a query result or theuseExporthook (CSV, JSON, Parquet, XLSX), started from a click. Do not build Blob URLs, hidden anchors, orCOPY TOexports. - Dive SQL is read-only. For actions such as approving a record, submitting a form, or refreshing a pipeline, have a button start a Flight the Dive owner controls with
useRunFlightand track it withuseFlightRun(from@motherduck/react-sql-query). Hardcode the Flight ID, pass only string config values, disable the control while a run is pending, render the hook'serror, and rerun the affected queries when the run succeeds. Viewers need arungrant: recommend the grantees and grant only after the user confirms. Embedded Dives cannot run Flights. - Viewers can open AI Chat in the Dive header. It sees the Dive's queries, data, and current filters, and can edit the Dive with each change kept in version history. Clear section titles, query names, and the Dive description make its answers better.
- Embed sessions take a
contextstring map that secure views read withsession_context(), so one target service account can serve many tenants with per-tenant rows. Set it from your own authentication, never from the browser. - Treat embedded Dives as the first-choice path when a product needs a live read-only Dive surface with a backend-created embed session. Move to
motherduck-build-cfa-appwhen the app needs custom API contracts, writes, non-Dive routing, tenant policy enforcement, or richer authorization. - For shared repos or CI/CD, use a service-account token so Dive ownership is not tied to one human user.
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.
- Reflows from about 320 px to wide panes: breakpoint grids (2x2 KPIs on narrow, one row on wide),
ResponsiveContainer width="100%", no fixed widths or page-level horizontal scroll. - Light and dark themes from one token object per theme, applied with inline
style, starting from the viewer's system preference. - Filters, sort, and selected view in
useDiveStateso they survive refresh and travel with a shared link. - Every section has its own loading skeleton, empty message, and
role="alert"error. - A "data as of" freshness line and plain-language titles with units, so viewers and AI Chat can read the Dive.
- Export with
exportAswhen people will take the data elsewhere. - When the Dive should change data, a write-back control backed by a Flight instrumented for the Flight Explainer.
- Styled controls (the runtime strips button styles) with 44 px targets, visible focus, and non-color status cues.
- Do not call a Dive mobile-friendly from responsive CSS alone; report the viewports and states you checked.
Workflow
- 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.
- Explore the live schema and validate the core SQL first.
- Call
get_dive_guideif MCP is available, then design the story, sections, interactions, and theme. - Build or edit the Dive component, using local preview/hot reload when possible.
- Call
save_dive,update_dive, or deploy only after queries, loading states, required resources, and visual behavior are correct. - 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.
- If teammates or application users need access, check three grants:
readon the Dive (new Dives are private; check withmd_list_dive_grantees('<dive_id>'::UUID)and grant withGRANT READ ON DIVEor MCPgrant_accessonresource_type: "dive"), read access to everyREQUIRED_DATABASESshare, andrunon each Flight the Dive runs. Share data and Flights as widely as the Dive and no wider, act on thefollow_upsthat the MCP Dive tools return, and grant only what the user named or confirmed.share_dive_datashares the owner's databases with the Dive's grantees and repoints the Dive in one call. For application users, share the Dive with the embed's target service account and use the embed-session flow.
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.
- Copy and adapt
artifacts/feature_complete_dive.tsxas the starting component for a new Dive. - Read
references/RESPONSIVE_DIVE_DESIGN_SYSTEM.mdfor the layout grid, component anatomy, theme tokens, filter model, and design anti-patterns of a new Dive or redesign. - Read
references/VISUAL_QA_PLAYBOOK.mdfor the screenshot and review loop when a full design handoff or evidence is requested. - Read
references/DIVE_DESIGN_GUIDE.mdfor authoring workflows,useSQLQuerymechanics, Dives-as-code, editing/version history, sharing, embedding, write-back with Flights, Agent Chat, SQL functions, theming prompts, chart-selection rules, loading/error states, layout patterns, and implementation gotchas
Related Skills
Load related skills only for missing capabilities; reuse established context.
motherduck-explorefor discovering the real tables, views, and dimensions before visualizing themmotherduck-queryfor validating the SQL each Dive section will runmotherduck-build-dashboardwhen the work is really a multi-section dashboard composition problemmotherduck-build-cfa-appwhen the requirement is a fuller product surface with per-customer isolation or backend policy controlmotherduck-cliwhen the agent has a shell and should keep Dive source in local filesmotherduck-create-flightfor the Flight a write-back button runsmotherduck-manage-guidesfor reusable personal or organization Dive conventions
Explore more skills
Browse all- Motherduck Design DiveDesign or improve a MotherDuck Dive’s layout, responsive behavior, themes, filters, and visual accessibility.
- Motherduck Build Malleable DiveBuild a generative MotherDuck Dive where a Flight writes a daily briefing and question-to-page specs from a semantic…
- Motherduck Manage GuidesRead or maintain MotherDuck Guides for business definitions, join rules, and reusable warehouse conventions.
- Motherduck Model DataDesign or implement MotherDuck analytical schemas and transformation models, including grain, types, and…
- Motherduck ExploreFind and understand MotherDuck databases, tables, columns, shares, and sample data, including which tables hold a given…
- Motherduck Share DataCreate, consume, or manage MotherDuck data shares, including audience grants, table filters, and refresh policy.
Security
Reviews (0)
More from MotherDuck Agent Skills
View source →Frequently asked questions about motherduck-create-dive
What does the motherduck-create-dive skill do?
Create, edit, design, publish, share, or embed MotherDuck Dives, including responsive layout, light/dark themes, and buttons that write back through Flights. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the motherduck-create-dive skill?
Run `npx @skills-hub-ai/cli install motherduck-create-dive` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/motherduck-create-dive/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does motherduck-create-dive work with?
motherduck-create-dive runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the motherduck-create-dive skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use motherduck-create-dive after installing it?
In Claude Code, type `/motherduck-create-dive` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the motherduck-create-dive skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/motherduck-create-dive)<a href="https://skills-hub.ai/skills/motherduck-create-dive"><img src="https://skills-hub.ai/api/badges/skill/motherduck-create-dive" alt="Install on Skills Hub"></a>More options in the badge docs.