Design or implement MotherDuck analytical schemas and transformation models, including grain, types, and materialization.
Capabilities
Core Behavior
For multi-model work, keep transformations in reviewable SQL files…
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.48
Model Data in MotherDuck
Core Behavior
For multi-model work, keep transformations in reviewable SQL files using the project's existing dbt, SQLMesh, or local conventions. If none exist, use stage directories and a model_manifest.yml recording dependencies, materialization, and target database. A single-table request needs only the requested SQL or change.
Prerequisites
Use the known source schema and connection. Discover missing types, grain, and join keys before implementing; planning can use supplied schema without a live connection.
Default Posture
- Design for analytical reads, not transactional writes.
- Prefer wide denormalized tables and pre-aggregated serving tables over highly normalized OLTP-style schemas.
- Use fully qualified names and add comments to tables and columns. Preserve stable object names so Guides can reference the intended catalog objects reliably.
- Use
NOT NULLaggressively; do not assume primary keys or foreign keys are enforced. - Reuse an existing dbt, SQLMesh, or repo-local modeling convention when one is already present; create the lightweight scaffold only when there is no established project shape.
- Separate
raw,staging, andanalyticslifecycle stages when the project is non-trivial.
Workflow
- Inspect the current source tables and actual column types before designing new models.
- Choose the target lifecycle stage and grain for each modeled table. Map dependencies between models.
- Place SQL in the existing project, or use the scaffold reference for a new multi-model project.
- Author each model as a standalone SQL file. Use explicit types, nullability, comments, and fully qualified names. Decide between a table, CTAS rebuild, or view based on freshness and cost.
- Record dependencies and materializations in the project's framework or lightweight manifest, not both.
- For implementation, run the in-scope models and verify grain and row counts; MCP DDL and CTAS require
query_rw. For an answer, review, or plan, return the requested explanation or SQL without creating a project or mutating the warehouse unless requested.
References
Read only the reference sections needed for the current task.
- Read
references/MODELING_PLAYBOOK.mdfor schema patterns, data-type guidance, CTAS/view decisions, complex types, constraints, project scaffold conventions, and common modeling mistakes.
Related Skills
Load related skills only for missing capabilities; reuse established context.
motherduck-duckdb-sqlfor type syntax and function detailsmotherduck-queryfor executing DDL, rebuilds, and validation queriesmotherduck-explorefor understanding the source schema before remodelingmotherduck-load-datafor ingestion paths that feed the modeled tablesmotherduck-manage-guidesfor durable business definitions and join rules that do not belong in transformation code
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 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.
- Motherduck Load DataLoad files, object storage, dataframes, or external databases into MotherDuck with bulk ingestion. Use for any import…
Security
Reviews (0)
More from MotherDuck Agent Skills
View source →Frequently asked questions about motherduck-model-data
What does the motherduck-model-data skill do?
Design or implement MotherDuck analytical schemas and transformation models, including grain, types, and materialization. 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-model-data skill?
Run `npx @skills-hub-ai/cli install motherduck-model-data` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/motherduck-model-data/ 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-model-data work with?
motherduck-model-data 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-model-data 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-model-data after installing it?
In Claude Code, type `/motherduck-model-data` (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-model-data 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-model-data)<a href="https://skills-hub.ai/skills/motherduck-model-data"><img src="https://skills-hub.ai/api/badges/skill/motherduck-model-data" alt="Install on Skills Hub"></a>More options in the badge docs.