Assess or configure MotherDuck access control, including roles (RBAC), share grants, table-, row-, and column-level security, masking, tenant isolation, residency, and Terraform governance.
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.51
Security and Governance
Source Of Truth
- Prefer current MotherDuck public trust, security, pricing, and product documentation.
- If the MotherDuck MCP
ask_docs_questionfeature is available, use it first. - Use current SSO and data-recovery docs when the requirement involves identity-provider login, restore windows, named snapshots, or
UNDROP DATABASE. - Verify claims against live public materials before making compliance or commercial assertions.
Default Posture
- Prefer service accounts for production systems, not personal tokens.
- Enterprise organizations on SCIM can make the IdP the source of truth for user roles (Settings → Authentication): each sync sets a user's roles to exactly what the IdP sends, user roles can't be edited in MotherDuck, users with no role lose access, and service account roles stay in MotherDuck. Linked Enterprise organizations share one login, SSO connection, and SCIM provisioning while keeping separate members, data, and billing.
- Keep credentials in backend-controlled secrets, not browsers or hardcoded notebooks.
- Writes belong to the database owner; there is no write grant. Reads come from shares: restricted shares granted to roles,
INCLUDE_PATTERNfor which tables, secure views for which rows, columns, and values. Pick the archetype inreferences/ACCESS_CONTROL_SETUPS.mdbefore writing grants. - For answer or review requests, report the current and proposed access without changing it. For configure requests, apply the in-scope roles and grants, then verify them with
SHOWstatements and a real reader; ask before revoking access or widening an audience beyond the request. - Prefer structural isolation over query-time tenant filtering for serious B2B or CFA workloads.
- Treat region and residency as first-class architectural constraints that require current public confirmation. MotherDuck runs on AWS and on Azure (
eastus,uksouth); an organization's cloud and region are fixed at creation, shares don't cross regions, anduksouthkeeps storage and processing in the UK for UK GDPR. CheckSELECT region FROM md_user_info(). - Be explicit about whether the boundary is a share, a Dive, a database, or a full application.
- Separate platform permissions (roles), data grants (who can attach a share), include patterns (which tables/views that share exposes), and secure views (which rows, columns, and values each consumer of that share sees).
- Secure views on shares provide row-level security, column-level security, and masking keyed on the consumer's identity, roles, or
session_context()(plan-gated; verify current availability). With session context, trust follows whoever sets it: a token context minted server-side can't be changed by its holder, while a connection context is whatever the token holder chooses, so hand end users only token-context tokens and set every key the policy reads. For multi-tenant customer-facing products, structural isolation remains the stronger default; secure views fit internal audiences and partner or per-service-account shares. - Dives have their own
READgrant: new Dives are private,GRANT READ ON DIVEshares one with users, roles, or the organization, andmd_list_dive_grantees('<dive_id>'::UUID)audits it. Opening a Dive grants nothing on its data or Flights; review the three together. - Flight
RUNgrants let others trigger a Flight that always executes with the owner's credentials. Review them like any privileged entry point: who holds the grant, which config the caller controls, and what the owner's token can write. - Map AI data flows explicitly:
prompt_jev()sends text and images to TypeSafe in the US from every region (off by default in EU regions);prompt()from Asia Pacific regions is served by a US endpoint; Agent Chat inference stays in the organization's geography. Admins control these on the AI Features settings page. - Flights can process PHI only under a signed HIPAA BAA; verify the current terms before relying on it.
- Separate documented product guarantees from architectural recommendations and assumptions in the final answer.
Workflow
- Identify where credentials live and who administers them.
- Define the actual isolation boundary: account, database, schema, share secure view, or query filter.
- Determine which preset/custom roles users hold, who can read, write, share, or administer the data, and which grants actually provide access.
- Check whether residency, compliance, or contractual guarantees are part of the requirement.
- Use only publicly documented security anchors unless the user has current commercial documentation in hand.
References
Read only the reference sections needed for the current task.
- Read
references/ACCESS_CONTROL_SETUPS.mdto design or review who can read and write what: the access model, a requirement-to-mechanism table, seven setup archetypes (simple warehouse, dev/prod, curated BI reader, team roles, row- and column-level access, customer-facing hypertenancy, partners), Terraform, and verification. - Read
references/SECURITY_GOVERNANCE_PLAYBOOK.mdfor public security anchors, service-account posture, residency and AI data flows, sharing boundaries, Flight run grants, governance as code, and what not to overstate
Related Skills
Load related skills only for missing capabilities; reuse established context.
motherduck-connectfor secure token handling and endpoint selectionmotherduck-explorewhen governance depends on what data is actually present and how it is partitionedmotherduck-share-datawhen the design includes governed data distribution
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 Model DataDesign or implement MotherDuck analytical schemas and transformation models, including grain, types, and…
- 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.
Security
Reviews (0)
More from MotherDuck Agent Skills
View source →Frequently asked questions about motherduck-security-governance
What does the motherduck-security-governance skill do?
Assess or configure MotherDuck access control, including roles (RBAC), share grants, table-, row-, and column-level security, masking, tenant isolation, residency, and Terraform governance. 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-security-governance skill?
Run `npx @skills-hub-ai/cli install motherduck-security-governance` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/motherduck-security-governance/ 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-security-governance work with?
motherduck-security-governance 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-security-governance 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-security-governance after installing it?
In Claude Code, type `/motherduck-security-governance` (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-security-governance 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-security-governance)<a href="https://skills-hub.ai/skills/motherduck-security-governance"><img src="https://skills-hub.ai/api/badges/skill/motherduck-security-governance" alt="Install on Skills Hub"></a>More options in the badge docs.