From migration
Profile a single table for migration. Assembles deterministic context from catalog and DDL, reasons over the six profiling questions using what-to-profile-and-why.md, presents profile candidates for user approval, then writes the approved profile into the table catalog file. Use when the user asks to "profile a table", "classify a table", "what kind of model is this table", or wants to determine PK, FK, watermark, or PII for a migration target.
npx claudepluginhub accelerate-data/migration-utilityThis skill uses the workspace's default tool permissions.
Profile a single table for migration by assembling context, reasoning over six profiling questions, and writing results to the table catalog file.
Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Profile a single table for migration by assembling context, reasoning over six profiling questions, and writing results to the table catalog file.
Parse $ARGUMENTS for --table and --writer. Use AskUserQuestion if either is missing.
Read manifest.json from the current working directory to confirm a valid project root. If missing, stop and tell the user to run setup-ddl first.
uv run --project "${CLAUDE_PLUGIN_ROOT}/../lib" profile context \
--table <table> --writer <writer>
This reads catalog signals, writer references, proc body, column list, and related procedure context. Output is a JSON matching lib/shared/schemas/profile_context.json.
If exit code is non-zero, stop and report the error.
Read the context JSON and the reference tables from docs/design/agent-contract/what-to-profile-and-why.md. Answer the six profiling questions below.
Key principle: Catalog signals are facts, not candidates. If the catalog declares a PK, that is the PK (source: "catalog"). If the catalog has declared FKs, those are confirmed FKs. The LLM fills in what the catalog does not answer (source: "llm"). When the LLM adds detail to a catalog fact (e.g. classifying fk_type on a declared FK), use source: "catalog+llm".
resolved_kind)Read the writer proc body. Match write patterns against the classification table in what-to-profile-and-why.md:
writer_references to confirm which tables are read vs writtenresolved_kind from the 8 allowed values: dim_non_scd, dim_scd1, dim_scd2, dim_junk, fact_transaction, fact_periodic_snapshot, fact_accumulating_snapshot, fact_aggregateCheck catalog primary_keys first. If declared, that is the answer.
If no declared PK:
auto_increment_columns as surrogate signalCheck catalog foreign_keys first. If declared, those are confirmed. Classify each fk_type (standard/role_playing/degenerate) using proc JOIN patterns.
If no declared FKs:
writer_references column-level is_selected flagsreferenced_by to find reader procs joining on the same column_sk/_id suffix)Check catalog auto_increment_columns. If present, the PK is surrogate.
If no identity column:
NEWID() / NEWSEQUENTIALID() / NEXT VALUE FOR in proc body_sk/_guid = surrogate; _code/_number = natural)WHERE col > @last_run, BETWEEN @start AND @end)modified_at, load_date, _dt, _ts)change_capture from catalog to inform strategyCheck catalog sensitivity_classifications first. If populated, those are confirmed.
For remaining columns:
mask (default), drop, tokenize, keepPresent the profile as a structured summary for user review. Include:
Stop on ambiguity. If a required question (Q1, Q2, Q4, Q5) cannot be answered with reasonable confidence, present the ambiguity to the user and ask for guidance. Do not auto-resolve unclear classifications.
Wait for explicit user approval before proceeding to Step 4.
After user approval (with any edits):
uv run --project "${CLAUDE_PLUGIN_ROOT}/../lib" profile write \
--table <table> \
--profile '<json>'
The profile JSON must match the profile_section schema in lib/shared/schemas/table_catalog.json. Required fields: status, writer. All enum values must be from the allowed sets.
If the write exits non-zero, report the validation errors and ask the user to correct.
The profile section written to catalog/tables/<table>.json follows table_catalog.json#/$defs/profile_section.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Domain/validation failure (missing catalog, invalid enum) |
| 2 | IO or parse error |