From ad-migration
Use when a monolith warehouse or lakehouse has a whole-warehouse `warehouse-ddl/` snapshot and needs tables or views grouped into business data domains with data owners for data mesh decentralization, setup-source selection, migration planning, or scope and migrate-mart inputs.
npx claudepluginhub accelerate-data/migration-utilityThis skill uses the workspace's default tool permissions.
Break a whole-warehouse DDL snapshot into migration-ready business domains. This skill is a planning step before `setup-source`, `/scope`, and mart migration workflows.
references/01_fact_table.mdreferences/02_dimension_table.mdreferences/03_grain.mdreferences/04_transaction_fact_table.mdreferences/05_periodic_snapshot_fact_table.mdreferences/06_accumulating_snapshot_fact_table.mdreferences/07_factless_fact_table.mdreferences/08_slowly_changing_dimensions.mdreferences/09_surrogate_keys.mdreferences/10_conformed_dimensions.mdreferences/11_degenerate_dimension.mdreferences/12_junk_dimension.mdreferences/13_role_playing_dimension.mdreferences/14_minidimension.mdreferences/15_bridge_table.mdreferences/16_bus_architecture.mdreferences/17_bus_matrix.mdreferences/18_date_dimension.mdreferences/19_aggregate_tables.mdreferences/20_heterogeneous_products.mdGuides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Builds scalable data pipelines, modern data warehouses, and real-time streaming architectures using Spark, dbt, Airflow, Kafka, and cloud platforms like Snowflake, BigQuery.
Builds production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. For data pipelines, workflow orchestration, and batch job scheduling.
Break a whole-warehouse DDL snapshot into migration-ready business domains. This skill is a planning step before setup-source, /scope, and mart migration workflows.
Use this skill in a warehouse-analysis repository, not a one-domain migration repository.
This skill classifies only tables and views into business data domains. Do not classify procedures or functions as domain-catalog objects.
Required input:
warehouse-ddl/ with the whole-warehouse DDL snapshotOutputs:
warehouse-catalog/domains/<slug>.json, only when the user explicitly asks to persist the analysisThis skill does not:
warehouse-ddl/ snapshotwarehouse-catalog/domains/Run from the warehouse-analysis project root.
Read from warehouse-ddl/.
When persistence is explicitly requested, write domain files under warehouse-catalog/domains/.
Domain slugs are derived from domain names: lowercase, ASCII-safe, and hyphen-separated. For example, Customer Success becomes customer-success.
warehouse-ddl/ is required. Check that it exists as a directory before analysis.
If warehouse-ddl/ is missing:
warehouse-ddl/Proceed only when warehouse-ddl/ exists.
Ask for more input only when a required human decision is missing, such as:
When asking the user to choose ownership, give the viable options with the recommended option first, and explain the evidence for the recommendation.
If two or more primary owners are plausible, stop before persistence. A user instruction to "pick one", "choose the most likely", or "use your best guess" does not resolve ownership. Ask the user to choose from the options.
When the user's request conflicts with this ambiguity rule, follow this skill. Do not classify, persist, or continue by guessing a primary owner.
Proceed with low confidence only when evidence is weak and there is no competing plausible primary owner. Mark weak classifications with confidence: "low" and explain the missing evidence instead of inventing definitions.
For Unclassified or unknown-domain results, describe the missing evidence without naming domains that are absent from the DDL. Say no visible business signal or no domain keywords instead.
warehouse-ddl/ to find tables, views, and their dependencies.Use references/22_dw_table_patterns.md for dimensional role classification.
Use references/21_domain_taxonomy.md for business-domain assignment.
Procedures and functions may be inspected only to discover table or view dependencies. They must not appear in persisted domain JSON, including as excluded, supporting, ambiguity, or unclassified object buckets.
Dimensional role classification is separate from functional domain classification. Role answers what kind of warehouse object it is; functional domain answers which business area owns its meaning.
Assign each table one role. Apply strong naming and structural evidence before weaker inference.
| Role | Strong Signals |
|---|---|
| Staging | STG_, STAGE_, RAW_, LAND_, SRC_; raw source columns |
| Fact | FACT_, FCT_; multiple foreign keys plus additive measures |
| Aggregate | AGG_, SUMM_, RPT_, ROLLUP_; coarser-grain fact summary |
| Dimension | DIM_; descriptive attributes; surrogate key; SCD columns |
| Bridge | BRG_, BRIDGE_, XREF_; many-to-many relationship structure |
| Reference | LKP_, REF_, LOOKUP_, CODE_; compact code-description table |
| ODS | ODS_, CURR_, CURRENT_; source-like current-state structure |
| Unknown | insufficient evidence |
For each table or view, record role, confidence, and evidence.
Every table has exactly one primary functional domain. Secondary domain tags are allowed only as descriptive metadata; they do not change primary ownership.
A view may belong to a different functional domain than its source table when it represents a domain-specific business lens. For example, an opportunities table can belong to Sales while a sold-opportunities view can belong to Operations. Multi-domain table usage does not move table ownership.
Do not use dimensional roles or warehouse layers as the primary functional domain. Staging, Fact, Dimension, Aggregate, Reference, ODS, and Unknown are role classifications unless the DDL also shows they are the business area that owns the object's meaning. For example, staging.stg_sales_orders has role Staging and functional domain Sales; finance.ref_currency_codes has role Reference and functional domain Finance.
Use this evidence order:
references/21_domain_taxonomy.mdUnclassified with low confidenceAmbiguous table or view ownership must be returned to the human before persistence. Do not persist guessed primary ownership for ambiguous tables or views.
A user instruction to "pick one", "choose the most likely", or "use your best guess" is not an ownership decision. Present the viable owner options with the recommended option first, include evidence, and wait for the user's choice before persistence.
If a user moves a table or view between domains, rewrite the impacted canonical domain files directly when persistence is requested. Do not maintain separate manual include or exclude lists.
When moving a table, remove it from both objects.tables and setup_source_candidates.tables in the old domain. Add it to both lists in the new domain when it is still a setup-source candidate.
If object A references B, A depends on B. B is upstream of A and must be available before A for load planning.
Domain dependency rules:
Do not describe load tiers using incoming-edge wording unless the graph direction is explicitly reversed. Prefer "no upstream dependencies" for first-tier objects.
The report should include:
When the user explicitly asks to persist the analysis, write one file per domain:
warehouse-catalog/domains/<slug>.json
Each file is the canonical current state for that domain.
Required fields:
schema_versiondomainslugstatusdescriptionconfidenceobjectssetup_source_candidatesdependenciesambiguitiesrationaleWrite required fields in the order listed above.
objects may contain only these keys:
tablesviewsProcedures and functions must not appear anywhere in persisted domain JSON.
Example:
{
"schema_version": 1,
"domain": "Sales",
"slug": "sales",
"status": "candidate",
"description": "Revenue and order lifecycle tables.",
"confidence": "medium",
"objects": {
"tables": ["silver.fact_sales"],
"views": ["gold.vw_sales_summary"]
},
"setup_source_candidates": {
"schemas": ["silver", "gold"],
"tables": ["silver.fact_sales"]
},
"dependencies": {
"upstream_domains": ["Customer", "Product"],
"downstream_domains": ["Finance"]
},
"ambiguities": [
{
"object": "silver.transaction_log",
"reason": "Name suggests either staging or fact-like event data."
}
],
"rationale": [
"Objects use sales, order, invoice, and revenue terminology."
]
}
Persist only when the user explicitly asks.
Rules:
warehouse-catalog/domains/catalog/warehouse-ddl/objects with only tables and views keyssetup_source_candidates.tables as a subset of that domain's objects.tablesIf a domain becomes empty, keep the file with empty objects unless the user explicitly asks to remove it.
Load these only when needed:
| File | When to Load |
|---|---|
references/22_dw_table_patterns.md | Dimensional role classification |
references/21_domain_taxonomy.md | Business-domain assignment |
Load a cluster when the primary role is confirmed but a subtype or specific pattern requires deeper evidence.
Fact deep dives — load when a table is Fact or Aggregate but subtype or grain is ambiguous:
references/01_fact_table.mdreferences/03_grain.mdreferences/04_transaction_fact_table.mdreferences/05_periodic_snapshot_fact_table.mdreferences/06_accumulating_snapshot_fact_table.mdreferences/07_factless_fact_table.mdreferences/19_aggregate_tables.mdDimension deep dives — load when a table is Dimension but subtype is ambiguous (SCD, conformed, junk, role-playing, etc.):
references/02_dimension_table.mdreferences/08_slowly_changing_dimensions.mdreferences/09_surrogate_keys.mdreferences/10_conformed_dimensions.mdreferences/11_degenerate_dimension.mdreferences/12_junk_dimension.mdreferences/13_role_playing_dimension.mdreferences/14_minidimension.mdreferences/18_date_dimension.mdreferences/20_heterogeneous_products.mdStructural patterns — load when a table is Bridge, or bus/matrix architecture context is needed:
references/15_bridge_table.mdreferences/16_bus_architecture.mdreferences/17_bus_matrix.md