From motherduck-skills
Design an end-to-end MotherDuck data pipeline. Use for ETL/ELT workflows -- choosing raw, staging, and analytics boundaries, bulk ingestion paths, transformation sequencing, dlt/dbt integration, publication targets, or whether DuckLake is actually required.
How this skill is triggered — by the user, by Claude, or both
Slash command
/motherduck-skills:motherduck-build-data-pipelineThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill when the user needs an ingestion-to-serving workflow, not just a single load step.
artifacts/pipeline_stage_example.pyartifacts/pipeline_stage_example.tsreferences/PIPELINE_IMPLEMENTATION_GUIDE.mdreferences/dlt-dbt-motherduck-project/README.mdreferences/dlt-dbt-motherduck-project/data/customers.jsonlreferences/dlt-dbt-motherduck-project/data/orders.jsonlreferences/dlt-dbt-motherduck-project/dbt_project.ymlreferences/dlt-dbt-motherduck-project/macros/generate_schema_name.sqlreferences/dlt-dbt-motherduck-project/models/marts/fct_customer_revenue.sqlreferences/dlt-dbt-motherduck-project/models/marts/marts.ymlreferences/dlt-dbt-motherduck-project/models/staging/sources.ymlreferences/dlt-dbt-motherduck-project/models/staging/staging.ymlreferences/dlt-dbt-motherduck-project/models/staging/stg_customers.sqlreferences/dlt-dbt-motherduck-project/models/staging/stg_orders.sqlreferences/dlt-dbt-motherduck-project/pipeline/__init__.pyreferences/dlt-dbt-motherduck-project/pipeline/bootstrap.pyreferences/dlt-dbt-motherduck-project/pipeline/cleanup.pyreferences/dlt-dbt-motherduck-project/pipeline/load_raw.pyreferences/dlt-dbt-motherduck-project/pipeline/run_all.pyreferences/dlt-dbt-motherduck-project/pipeline/settings.pyUse this skill when the user needs an ingestion-to-serving workflow, not just a single load step.
This is a use-case skill. It orchestrates motherduck-connect, motherduck-load-data, motherduck-model-data, motherduck-query, motherduck-share-data, and motherduck-ducklake.
Use that discovery to decide whether the pipeline is:
If no server is active, use any supplied source and target context. For planning work, proceed with explicit assumptions when safe; ask for missing details only when they block a reliable result.
Match execution to the request: answer, review, or planning work returns the requested pipeline artifacts; build or change work creates the requested in-scope files and warehouse objects and validates them. Ask before destructive actions, unrelated external writes, or a material expansion of scope.
When this skill produces a native DuckDB (md:) connection, watermark it with custom_user_agent=agent-skills/2.4.0(harness-<harness>;llm-<llm>). If metadata is missing, fall back to harness-unknown and llm-unknown.
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/dlt-dbt-motherduck-project/ -- fully runnable MotherDuck reference project using dlt, dbt-duckdb, and validation queriesreferences/PIPELINE_IMPLEMENTATION_GUIDE.md -- preserved detailed pipeline guidance that used to live in this skill../motherduck-load-data/references/INGESTION_PATTERNS.md -- lower-level ingestion patternsartifacts/pipeline_stage_example.py -- MotherDuck-backed Python example that stages a Parquet extract, lands it into raw, deduplicates it, and publishes analytics output across raw/staging/analytics databasesartifacts/pipeline_stage_example.ts -- TypeScript companion artifact with the same stage layout and output contractreferences/dlt-dbt-motherduck-project/ -- end-to-end MotherDuck example that bootstraps the target database, lands raw data with dlt, builds staging and analytics models with dbt, and validates the final martRun it with:
uv run --with duckdb python skills/motherduck-build-data-pipeline/artifacts/pipeline_stage_example.py
Run the same stage pattern against temporary MotherDuck databases:
MOTHERDUCK_ARTIFACT_USE_MOTHERDUCK=1 \
uv run --with duckdb python skills/motherduck-build-data-pipeline/artifacts/pipeline_stage_example.py
Validate the TypeScript companion artifact:
uv run scripts/test_typescript_artifacts.py
For the full MotherDuck project:
cd skills/motherduck-build-data-pipeline/references/dlt-dbt-motherduck-project
export MOTHERDUCK_TOKEN=...
export MOTHERDUCK_PIPELINE_DB=md_skills_pipeline_demo
uv sync --python 3.12
uv run python pipeline/run_all.py
uv run python pipeline/cleanup.py
dlt. The motherduck destination does not create the database for you.dbt-duckdb path did not run reliably on Python 3.14.raw, staging, and analytics in dbt, override generate_schema_name.dbt subprocess builds models, run post-build validation in a fresh process or refresh database state before reading new relations.motherduck-connect -- choose the right connection pathmotherduck-load-data -- ingestion mechanicsmotherduck-model-data -- shape the analytics layermotherduck-query -- write transformations and validationsmotherduck-share-data -- publish curated outputsmotherduck-ducklake -- only when open-table-format storage is a real requirementnpx claudepluginhub motherduckdb/agent-skills --plugin motherduck-skillsLoad and ingest data into MotherDuck from local files, object storage (S3, GCS, Azure, R2), HTTPS, dataframes, or external databases. Use for any import or bulk-load task — CSV, Parquet, JSON, Delta, Iceberg, local DuckDB database upload — and for choosing between CTAS, INSERT...SELECT, COPY, cloud-storage secrets, and Postgres-endpoint versus native DuckDB-client paths.
Designs data pipelines using functional principles: idempotency, immutability, declarative transformations. Guides on ELT, partitioning, dbt layers, data quality tests, and DAG orchestration.
Builds scalable data pipelines, modern data warehouses, and streaming architectures with Apache Spark, dbt, Airflow, and cloud-native platforms. Use for analytics infrastructure design.