Create/update skills to support migration and document a plan - #14332
Draft
andrewscfc wants to merge 2 commits into
Draft
Create/update skills to support migration and document a plan#14332andrewscfc wants to merge 2 commits into
andrewscfc wants to merge 2 commits into
Conversation
andrewscfc
commented
Aug 20, 2026
| --- | ||
| name: migrate-component-to-scss-modules | ||
| description: Migrates an existing Emotion-styled React component in src/app/components to SCSS Modules. Use when asked to migrate, convert or batch-migrate components off Emotion (index.styles.ts / css prop) to index.module.scss, or when removing Emotion from a component. | ||
| --- |
Contributor
Author
There was a problem hiding this comment.
not really reviewed this file properly yet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm part way through this but thought I'd drop an AI summary below to aid review.
I've been prompting and refining a migration plan geared around AI automation. I've heavily refined
.github/skills/convert-webcore-component/SKILL.mdanddocs/SCSS-Modules-Migration.mdxbut.github/skills/migrate-component-to-scss-modules/SKILL.mdis still a work in progressI haven't carefully reviewed this summary, will do it again before full review
Summary
Adds the AI tooling to carry out the SCSS Modules migration, plus a plan for how the work is sequenced.
Stacked on #14073 — its changes appear in this branch but belong to that PR.
Changes
.github/skills/migrate-component-to-scss-modules/SKILL.md(new)The step-by-step process for taking a component off Emotion: an Emotion-to-SCSS value lookup, triage checks for components that can't be migrated by a styling change alone, and per-batch verification steps.
.github/skills/convert-webcore-component/SKILL.md(updated)This skill told agents to produce
index.styles.tsfiles and Emotioncssprops. Left unchanged it would work against the standards merged in #14280, so the styling half is rewritten for SCSS Modules. TypeScript guidance is untouched.docs/SCSS-Modules-Migration.mdx(new)Sequencing plan for engineers — scope, batching principles, blocked components, and a dated starting batch order. Published to Storybook, and deliberately outside the paths agents read so it can hold planning detail without consuming their context.
Worth discussing: should we add
clsx?Emotion's
css={[base, cond && modifier]}silently drops falsy entries.classNamedoesn't, so the direct translation rendersclass="link false"— a silent bug. This shape appears in 11 components.The skills currently require a ternary with an empty-string fallback and say not to add a dependency, following our "avoid new dependencies" rule. I lean towards adding
clsxinstead — ~200 bytes, and it removes the footgun across ~30 migrations rather than relying on everyone getting the ternary right. If we agree, both skills need updating.Notes
The blocked-component list and batch ordering were derived from the codebase rather than assumed. That turned up two components which look like easy early wins but aren't:
MostRead/Labelpasses acssprop into a psammead component and uses a palette value as a runtime prop, andRelatedContentSectionimports a legacy Emotion styles file directly.