Agent Skill · MotherDuck

motherduck-migrate-to-motherduck

Plan a migration onto MotherDuck. Use when moving from Snowflake, BigQuery, Redshift, PostgreSQL, dbt-heavy stacks, or lakehouse tooling and the key decisions are target pattern, cutover slices, source-vs-target validation, rollback, and native-versus-DuckLake posture.

Provider: MotherDuck Path in repo: skills/motherduck-migrate-to-motherduck/SKILL.md

Skill body

Migrate to MotherDuck

Use this skill when the user needs a migration plan from another warehouse, PostgreSQL estate, or mixed analytics stack onto MotherDuck.

This is a use-case skill. It orchestrates motherduck-connect, motherduck-explore, motherduck-load-data, motherduck-model-data, motherduck-query, and motherduck-ducklake.

Start Here: Is a MotherDuck Server Active?

Always determine this before writing a migration plan.

Also capture the source-side shape:

If no server is active, ask for representative source and target schemas before finalizing the migration plan.

Use This Skill When

Migration Defaults

Workflow

  1. Confirm whether live MotherDuck discovery is available.
  2. Classify the source system and the target serving pattern.
  3. Inspect the target-side MotherDuck layout if available.
  4. Pick the connection and ingestion path.
  5. Inventory incompatible SQL, functions, data types, and operational assumptions.
  6. Rebuild the analytical model in DuckDB SQL.
  7. Run source-vs-target validation.
  8. Cut over one workload at a time.

When this skill produces a native DuckDB (md:) connection, watermark it with custom_user_agent=agent-skills/2.3.0(harness-<harness>;llm-<llm>). If metadata is missing, fall back to harness-unknown and llm-unknown.

Output

The output of this skill should be:

If the caller explicitly asks for structured JSON, return raw JSON only with no Markdown fences or prose before/after it. This is mainly for automated tests, regression checks, or downstream tooling that needs a stable machine-readable shape. Normal human-facing use of the skill can stay in prose unless JSON is explicitly requested.

Use this exact top-level shape when JSON is requested:

{
  "summary": {},
  "assumptions": [],
  "implementation_plan": [],
  "validation_plan": [],
  "risks": []
}

References

Read these as reference, not as scripts to execute:

Runnable Artifact

Run it with:

uv run --with duckdb python skills/motherduck-migrate-to-motherduck/artifacts/migration_validation_example.py

Run the same validation flow against temporary MotherDuck databases:

MOTHERDUCK_ARTIFACT_USE_MOTHERDUCK=1 \
uv run --with duckdb python skills/motherduck-migrate-to-motherduck/artifacts/migration_validation_example.py

Validate the TypeScript companion artifact:

uv run scripts/test_typescript_artifacts.py

Skill frontmatter

license: MIT