.claude/skills/cc-alignment/SKILL.md
Align existing Compound Component pages to vendor standard naming and structure. Use when renaming CC exports, adding slot prefixes, refactoring list headers to nested compounds, updating barrel exports, fixing DTS build blockers, or updating testing registry consumer pages.
npx skillsauth add mercurjs/mercur cc-alignmentInstall 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:
XxxDetail → XxxDetailPage)Main/Sidebar prefix to existing section slotspages/index.ts barrel exports after CC renametsup pipelineNot for: initial CC migration from scratch (use compound-components-migration skill instead).
Read next (as needed):
references/alignment-checklist.md — step-by-step alignment workflowreferences/build-pipeline.md — tsup, DTS, dist verificationreferences/testing-registry.md — consumer page patternsIdentify what needs alignment — compare current exports against vendor standard:
Page suffix?Main/Sidebar prefix?Rename + restructure in this order:
SidebarSellerSection), remove context/provider if present, pass data as propsindex.ts — update as Component exportpages/index.ts barrel — new namesBuild + verify:
npx tsup — must pass both ESM and DTSpages/index.tsdist/pages/index.js contains new exportsTest in testing registry:
@mercurjs/admin/pages — must resolve without errorsimplicit any warnings on importProductDetail re-export alongside ProductDetailPage). Clean rename only.any casts — use proper types (HttpTypes.*, Omit<>, etc.).header?: ReactNode prop pattern for list headers — use nested compound components.data-testid attributes.hasOutlet on TwoColumnPage in Root's default composition.location.search on export/import links.Layout wrapper component in detail pages. Inline TwoColumnPage directly in Root's default composition (vendor standard). data, hasOutlet, showJSON, showMetadata go directly on the TwoColumnPage in Root.:id -> Component: DetailPage; use :id -> Component: Outlet and child path: "" -> DetailPage.Children.count(children) > 0) for detail pages with nested routes/extensions; use explicit compound composition guard.src/lib/compound-composition.ts) where override guard is needed.Root: XxxDetailPage (e.g., ProductDetailPage)
Slots: Main{Section} — MainGeneralSection, MainMediaSection
Sidebar{Section} — SidebarOrganizationSection, SidebarSellerSection
Fixed: Main, Sidebar
Root: XxxListPage (e.g., ProductListPage)
Slots: Table — Container (Header + DataTable + Outlet)
Header — title + actions (Children.count override)
HeaderTitle — Heading component
HeaderActions — button container (Children.count override)
Header{Action}Button — individual buttons (Create, Export, Import)
DataTable — raw data grid (self-contained fetch)
pages/index.ts)export { XxxDetailPage } from "./path/to/xxx-detail"
export { XxxListPage } from "./path/to/xxx-list"
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`.