motherduckdb/agent-skills / plugins/motherduck-skills-claude/skills/motherduck-model-data
motherduck-model-data
VerifiedDesign or implement MotherDuck analytical schemas and transformation models, including grain, types, and materialization.
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
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |