.claude/skills/compound-components-migration-review/SKILL.md
Plan, implement, and review admin page migrations to Compound Components and TabbedForm with strict regression prevention (loading/error gating, keyboard submit paths, dynamic tab visibility, context typing, and dead abstraction APIs). Use when writing or reviewing migration code in packages/admin.
npx skillsauth add mercurjs/mercur compound-components-migrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when:
Object.assign(Root, { ... })TabbedFormPrimary goal:
Read next (as needed):
references/review-checklist.md for implementation + review checklistreferences/common-regressions.md for known failure modes from this repoStart in implementation mode unless the user explicitly asks only for review.
TabbedForm)packages/admin/COMPOUND_COMPONENTS_MIGRATION.mdRoot + Children.countTabbedForm, _tabMeta, validationFields)isVisible) behaviorreferences/review-checklist.md before finalizing.git diff --cached and git diff separately (staged vs unstaged).TabbedForm)Enter, Ctrl/Cmd+Enter)isVisible) + active tab statevalidationFields)any, Record<string, any>)Layout)isPending/isError/ready behavior.disabled/isLoading alone to block submit; keyboard shortcuts can bypass UI._tabMeta, validationFields) unless runtime logic uses them.isVisible exists.any in context/provider types.TabbedForm migration without verifying keyboard submit behavior.Children.count(children) > 0 as the only override switch for detail pages that can receive nested route/extension children.:id -> Component: DetailPage when nested routes exist; use :id -> Component: Outlet and path: "" -> DetailPage.src/lib/compound-composition.ts) instead of copy-pasted local implementations.isVisible), normalize active tab state when visible tab set changes._tabMeta / validationFields, wire runtime behavior in the same patch.HttpTypes.* or explicit alias).Layout/Page) when subcomponents need provider/layout context.When asked for review:
P1, P2, P3)When no findings:
When delivering a migration or fix:
Prefer minimal patches that:
packages/admin/COMPOUND_COMPONENTS_MIGRATION.mdregions loading vs submit payload normalizationCtrl/Cmd+Enter bypassing loading stateTabbedForm_tabMeta.validationFields API (metadata declared but not used by runtime)documentation
Analyze a Mercur 1.x project and guide migration to 2.0. Self-contained — works without access to the mercur monorepo.
documentation
Plan and execute migration from Mercur 1.x to 2.0. Classifies project difficulty, reads relevant migration docs, and follows stop conditions.
development
Review code changes for contract compliance, type safety, and regression risk. Use after completing any non-trivial implementation, before merging PRs, or when asked to review code quality across any mercur package.
tools
Use Mercur CLI commands correctly inside a project created from the Mercur basic starter. Use when choosing between `create`, `init`, `add`, `search`, `view`, and `diff`.