From ad-migration
Use when a migrated table, view, or materialized view needs a new or merge-safe `test-specs/<schema.object>.json`, especially after SQL changes or reviewer feedback.
npx claudepluginhub accelerate-data/migration-utilityThis skill uses the workspace's default tool permissions.
Generate or extend a `TestSpec` for one migrated object.
Guides 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.
Generate or extend a TestSpec for one migrated object.
Use this skill when:
migrate-util ready test-gen --object <fqn> should pass and the next artifact is test-specs/<fqn>.jsonreviewing-tests returned feedback_for_generatorDo not use this skill to review coverage, run sandbox execution, or generate dbt SQL.
| Step | Required action |
|---|---|
| Guard | Ready check must pass before any write |
| Type | Detect table, view, or mv from catalog |
| Invariants | Apply ../test-invariants/SKILL.md |
| Merge mode | Preserve approved scenarios and expect blocks |
| Feedback | On repair passes, follow reviewer feedback before broad regeneration |
| Guard rails | Use references/guard-rails-ref.md when merge, feedback, or coverage judgment is ambiguous |
| Output | Write a valid TestSpec, then persist the catalog summary |
Run the stage guard first:
uv run --project "${CLAUDE_PLUGIN_ROOT}/packages/ad-migration-internal" migrate-util ready test-gen \
--object <target_fqn> \
--project-root <project_root>
If readiness fails, report the surfaced code and reason values verbatim and stop. Do not inspect SQL, generate fixtures, or write test specs after a failed readiness check.
Detect object type from catalog before generating: absent view catalog means table; is_materialized_view: true means mv; otherwise view.
If test-specs/<fqn>.json exists, enter merge mode and load existing scenario names, branch_manifest, and expect blocks. Also load deterministic object and source-table context from catalog metadata.
Re-extract branches from current SQL. For tables, current SQL is selected_writer_ddl_slice when present, otherwise proc_body; if both are empty, stop with a context error. Build a fresh branch_manifest; if a prior branch disappeared, add a STALE_BRANCH warning.
Generate only missing or explicitly requested coverage. On reviewer-driven reruns, follow the repair-pass rules below. Keep scenarios self-contained and constraint-valid; do not invent columns, nullability, or FK behavior.
Emit a valid TestSpec, preserving approved scenarios unless targeted feedback requires revision. Recalculate uncovered_branches, coverage, and status, then persist the catalog summary.
When reviewing-tests returns feedback_for_generator, apply ../test-invariants/SKILL.md and start from the existing spec.
Repair-pass algorithm:
unit_tests[] entry unless a quality_fixes instruction names that scenario.scenarios[] list unchanged.uncovered_branches and named quality_fixes.uncovered_branches, coverage, and status from the merged result.Use the exact command flow from references/command-workflow-ref.md, the runtime field checklist from references/test-spec-contract-ref.md, the fixture guidance from references/fixture-synthesis-ref.md, and the expanded guard rails from references/guard-rails-ref.md.
catalog/views/*.json entries as view instead of detecting mv.test-specs/<fqn>.json plus the catalog summary written through test-harness write