motherduckdb/agent-skills / plugins/motherduck-skills-copilot/skills/motherduck-partner-delivery
motherduck-partner-delivery
VerifiedStandardize MotherDuck delivery for consultancies and agencies across client engagements with reusable provisioning, isolation, and handoff patterns.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.4 KB |
| artifacts/client_delivery_example.py | script | 2.2 KB |
| artifacts/client_delivery_example.ts | script | 1.2 KB |
| references/EXECUTION_REFERENCE.md | markdown | 1.6 KB |
| references/PARTNER_DELIVERY_GUIDE.md | markdown | 9.3 KB |
references/PARTNER_DELIVERY_GUIDE.md
View on GitHub<!-- Preserved detailed implementation guidance moved from SKILL.md so the main skill can stay concise. -->
# Partner Delivery
Use this skill when a consultancy, implementation partner, or multi-client product team is delivering MotherDuck solutions repeatedly across customer accounts. Partners often work across different industries — retail, healthcare, fintech, logistics — so client data models and schemas will differ by industry. What stays consistent is the architecture: isolation, provisioning, connection patterns, and deployment structure. This skill focuses on the repeatable infrastructure layer, not the client-specific data model.
## Contents
- Source of truth and verified delivery defaults
- Validation Signals (maintainer/reviewer checks)
- Language focus and starter snippets (TypeScript client config, Python provisioning/validation)
- Public product anchors (Hypertenancy, read scaling, Dives, shares)
- Default multi-client pattern
- What to standardize vs keep client-specific
- Shares vs Dives vs full apps
- Region and compliance handling
## Source Of Truth
- Prefer current MotherDuck public docs and product pages.
- If the MotherDuck MCP `ask_docs_question` feature is available, use it first.
- Verify anything commercial, regional, or security-sensitive against live public materials before giving a definitive answer.
## Verified Delivery Defaults
Defaults that hold across partner deliveries:
- standardize the isolation and provisioning pattern, not the client schema
- keep one database namespace and one credential boundary per client unless the customer has a stronger requirement
- make region choice explicit in the delivery contract
- treat client-specific ingestion or app code as add-ons around the core multi-client isolation model
## Validation Signals
Use these signals for testing, review, and regression checks. They are not an instruction to include a separate "Validation Signals" section in normal user-facing replies.
- run `artifacts/client_delivery_example.py` against temporary MotherDuck databases
- verify each client gets its own database entry in the output payload
- verify the delivery pattern still states one database and one credential boundary per client
- treat any partner template that assumes a shared client schema as a regression
## Language Focus: TypeScript/Javascript and Python
- Prefer **TypeScript/Javascript** for reusable partner delivery assets in:
- product backends
- starter APIs
- admin or client provisioning tools
- Prefer **Python** for:
- implementation scripts
- migration helpers
- validation tooling
- operational handoff assets
- When producing a partner-ready solution, it is often best to provide:
- a TypeScript/Javascript app skeleton
- Python validation or migration helpers
## TypeScript/Javascript Starter
```ts
type ClientConfig = {
slug: string;
database: string;
region: "us-east-1" | "eu-central-1";
serviceAccountEnvVar: string;
};
const clients: ClientConfig[] = [
{ slug: "acme", database: "customer_acme", region: "us-east-1", serviceAccountEnvVar: "ACME_MD_TOKEN" },
];
```
## Python Provisioning and Validation Starter
```python
import duckdb
PARTNER_USER_AGENT = "agent-skills/3.2.0(harness-<harness>;llm-<llm>)"
def provision_client(conn: duckdb.DuckDBPyConnection, slug: str, region: str) -> dict:
"""Provision a new client database with the standard schema."""
db_name = f"customer_{slug}"
conn.execute(f"CREATE DATABASE IF NOT EXISTS {db_name}")
conn.execute(f"""
CREATE TABLE IF NOT EXISTS "{db_name}"."main"."usage_daily" (
usage_date DATE NOT NULL,
metric_name VARCHAR NOT NULL,
metric_value DOUBLE NOT NULL,
updated_at TIMESTAMP DEFAULT current_timestamp
)
""")
conn.execute(f"""
COMMENT ON TABLE "{db_name}"."main"."usage_daily"
IS 'Daily usage metrics for client {slug}'
""")
return {"slug": slug, "database": db_name, "region": region}
def validate_client_database(conn: duckdb.DuckDBPyConnection, database_name: str) -> dict:
"""Validate that a client database has the expected tables and row counts."""
tables = conn.sql(f"""
SELECT table_name, estimated_size
FROM duckdb_tables()
WHERE database_name = '{database_name}'
""").fetchall()
return {
"database": database_name,
"table_count": len(tables),
"tables": [{"name": t[0], "estimated_size": t[1]} for t in tables],
"pass": len(tables) > 0,
}
def validate_all_clients(clients: list[dict]) -> list[dict]:
"""Run validation across all client databases and report results."""
conn = duckdb.connect(f"md:?custom_user_agent={PARTNER_USER_AGENT}")
results = []
for client in clients:
result = validate_client_database(conn, client["database"])
result["slug"] = client["slug"]
results.append(result)
conn.close()
return results
```
## Delivery Principles
- Prefer structural isolation over query-time tenant filtering for serious client work.
- Standardize the architecture, not the client data itself.
- Keep credentials and sharing boundaries explicit per client.
- Use a small set of approved deployment patterns rather than inventing a new one per engagement.
## Public Product Anchors To Use
- Hypertenancy is the public MotherDuck pattern for dedicated compute per user or customer.
- MotherDuck documents service-account-driven provisioning and per-customer or per-workload isolation patterns for Hypertenancy-style applications.
- Read scaling is the public pattern for read-heavy BI and app workloads.
- Dives are shareable live workspace artifacts, and Embedded Dives can serve app surfaces when the client needs a read-only live dashboard inside an existing product. Keep implementation mechanics in `motherduck-create-dive` and REST endpoint details in `motherduck-rest-api`.
- Verify DuckLake sharing semantics against the live DuckLake guidance before committing to a delivery boundary.
- Shares are zero-copy and database-backed. Partner delivery can expose a whole curated database or a table/view subset through `INCLUDE_PATTERN`; secure views on the share can filter rows, hide columns, or mask values per consumer identity. Different clients still get separate databases and shares; use secure views for audiences within one client.
- Prefer restricted shares granted to roles, and audit the grants and stored include pattern during every client handoff.
- Use referenced Guides for reusable definitions and client-specific exceptions that agents cannot infer from schema.
## Recommended Workflow
1. Classify the client pattern:
- internal analytics enablement
- customer-facing analytics
- pipeline and reporting
- regional or residency-constrained deployment
2. Pick the default architecture.
3. Standardize provisioning and deployment checklists.
4. Design the industry-specific data model, schema, and output assets for their use case.
## Default Multi-Client Pattern
Use this as the default unless the client requirements force a deviation:
- one service account per client
- or one service account per workload boundary when the client has multiple blast-radius tiers
- one database namespace per client or stronger isolation boundary
- shared deployment checklist and provisioning steps
- per-client tokens and access revocation path
For customer-facing analytics with stronger isolation and performance requirements:
- pair this skill with `motherduck-build-cfa-app`
- use Hypertenancy-style patterns
- add read scaling only when concurrency demands it
## What To Standardize
These are the architecture-level patterns that should be consistent across clients regardless of industry:
- connection pattern
- database provisioning and isolation model
- service account policy
- sharing model
Schemas, table structures, dashboard layouts, and Dive templates will vary by industry. Use `motherduck-model-data` to design the right schema for each client rather than forcing a single starter schema across all engagements.
## When To Use Shares vs Dives vs Full Apps
- Use shares when the client team wants direct access to query data in MotherDuck or downstream tools.
- Use Dives when the client wants a live, shareable visualization inside the MotherDuck workspace.
- Use a full customer-facing app pattern when the client needs embedded analytics, product UX control, or stricter tenant-facing experience guarantees.
## What To Keep Client-Specific
- schema design and table structure (driven by client industry and use case)
- source systems and ingestion sources
- business metrics
- data contracts
- residency constraints
- dashboard and Dive templates (tailored to the client's industry domain)
- end-user UX and rollout cadence
## Region And Compliance Handling
- Verify current region availability before committing to a design.
- Keep client object storage, external buckets, and regional service-account assumptions aligned with the target MotherDuck region whenever the delivery pattern controls those choices.
- Escalate trust/compliance questions to `motherduck-security-governance` patterns when they become first-order blockers.
- Treat residency, AWS PrivateLink, and formal compliance documents as plan-sensitive and current-state-sensitive topics that require live verification.
The output of this skill should be a repeatable delivery pattern plus the client-specific exceptions that still need attention.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |