.agents/skills/migrate-container-queries/SPEC.md
Provide a reliable, low-risk path for converting viewport-based responsive logic (@media, useMedia) to container queries, so components respond to their own available width instead of the raw viewport. The dominant failure mode this skill guards against is mapping a breakpoint token to the container token of the same name: the two scales share names but not pixel values.
In scope: migrating @media/useMedia width logic to primitive props, @container CSS, useContainerBreakpoint(), or screen: keys, and deciding when to add container-type.
Out of scope: non-width media features (prefers-*, hover, pointer, resolution, height-based, print) stay on useMedia; building the primitives or tokens themselves.
container token with the pixel value nearest the old breakpoint's — never the same-named token.screen: keys; keep useMedia only for non-width media features.Container story, "Container Queries" section — authoritative for container vs. screen: keys, both token scales, useContainerBreakpoint, and container-type guidance.components/core/breadcrumbList/breadcrumbList.tsx — conditional container-type pattern.@container silently no-ops without a query-container ancestor; the skill flags this but cannot detect it statically.SKILL.md when token scales change, primitives gain/lose props, or a rung is added.SPEC.md when intent, scope, the non-negotiable constraints, or the sources change.