adobe/spectrum-web-components/gen2-migration
Claude Code and agent skill by adobe/spectrum-web-components
- community
Checking that the SKILL.md file is still in the repository.
Upgrade Spectrum 1 (sp-* elements, @spectrum-web-components/*) to Spectrum 2 (swc-* elements, @adobe/spectrum-wc). Use when developers need to migrate from Spectrum 1 to Spectrum 2 web components, or when they mention @spectrum-web-components, sp-* elements, or Spectrum 1.
Install
npx vskill@latest install adobe/spectrum-web-components/gen2-migrationSKILL.md
The same SKILL.md was published earlier as adobe/spectrum-web-components/gen2-migration.
Spectrum 1 → Spectrum 2 migration
Upgrade sp-* Spectrum 1 components (@spectrum-web-components/*) to swc-* Spectrum 2 components (@adobe/spectrum-wc).
You do not have to migrate everything at once. Gen 1 and Gen 2 coexist in the same app — <sp-badge> and <swc-badge> are independent custom elements. Migrate one component (or one screen) at a time.
TL;DR
- Install
@adobe/spectrum-wcalongside your existing@spectrum-web-components/*packages. - Switch Gen 1 to the
spectrum-twotheme so it aligns visually with Gen 2. - Add the Gen 2 stylesheet and
swc-themeclasses to your application root. - Load Adobe Clean Spectrum VF (the Spectrum 2 font).
- Replace
<sp-*>elements with<swc-*>one component at a time, following
each component's migration guide.
- Once no
<sp-*>elements remain, remove Gen 1 packages, theme imports, and
<sp-theme>.
For the full coexistence walkthrough — including font setup, --mod-* → --swc-* CSS mapping, and decommissioning Gen 1 — read Migrate from Gen1 first.
Scope
This skill covers the Spectrum 1 → Spectrum 2 migration only. Do not perform major framework upgrades (e.g. React version bumps) as part of this migration; note them as recommended follow-ups in the final report instead.
Step 1 — Read the overarching migration guide
Before starting, read Migrate from Gen1. It covers the coexistence model, theme bridging, font loading, CSS namespace changes, and decommissioning. Understanding this context prevents common mistakes.
Step 2 — Identify what is being migrated
- Search package manifests for
@spectrum-web-components/*dependencies. - Note the package manager (npm / yarn / pnpm) from the lockfile.
- Find app entrypoints, root providers, and any
<sp-theme>usages. - Check each
sp-*component against the list of available migration guides below.
Components without a guide are still Gen 1 only — keep them installed.
Step 3 — Install Gen 2
Keep existing @spectrum-web-components/* packages. Gen 2 ships as a single monorepo package; import individual components from subpaths.
Step 4 — Align Gen 1 visually with Spectrum 2
Switch the existing <sp-theme> to system="spectrum-two" to keep Gen 1 components visually consistent with their <swc-*> neighbors:
Step 5 — Add the Gen 2 stylesheet and theme classes
Theme classes: swc-theme--light, swc-theme--dark, swc-theme--adaptive. See Theme and scales.
Step 6 — Load Adobe Clean Spectrum VF
Gen 2 uses Adobe Clean Spectrum VF (the Spectrum 2 font family). See Fonts for Adobe Fonts, CDN, and self-hosted setup instructions.
Step 7 — Replace components one at a time
For each component to migrate:
- Open the component's migration guide from
references/components/(e.g.
references/components/badge.md). It lists renamed attributes, removed features, new additions, and a CSS custom property mapping table.
- Update the import:
```ts // Before import '@spectrum-web-components/badge/sp-badge.js';
// After import '@adobe/spectrum-wc/components/badge/swc-badge.js'; ```
- Rename the tag (
<sp-badge>→<swc-badge>) and apply attribute renames. - Replace
--mod-badge-*CSS overrides with--swc-badge-*equivalents.
See Component styles.
The tag prefix always changes from sp- to swc- across all components.
Step 8 — Validate
- Type-check:
tsc --noEmit - Run tests covering the migrated components.
- Run the build and verify output.
Fix all failures before declaring the migration complete.
Step 9 — Decommission Gen 1 (when ready)
Once no <sp-*> elements remain:
- Remove
@spectrum-web-components/*frompackage.json. - Remove
<sp-theme>and its imports. - Remove remaining
--mod-*CSS overrides.
Step 10 — Generate final report
Summarise:
Changes made
- Packages added and removed
- Components migrated (before/after tag names)
- Attributes renamed or removed
- CSS custom property renames applied
Remaining items
- Components with no Gen 2 equivalent yet (still on Gen 1)
- Any open questions or gaps
Recommended follow-ups
- Any major dependency upgrades that were out of scope
Documentation structure
Overarching guides
{{MIGRATION_GUIDE_LIST}}
Per-component migration guides
One file per migrated component in references/components/. Read the guide for a component to see its exact breaking changes and CSS mapping.
Components with a migration guide: {{MIGRATION_COMPONENT_NAMES}}.
Components without a migration guide are still Gen 1 only. Keep @spectrum-web-components/[name] installed until a Gen 2 equivalent ships.
{{MIGRATION_COMPONENT_LIST}}
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggen2/packages/ai/skills/gen2-migration/SKILL.md
Popularity
- Repository stars
- 1,541
- Repository forks
- 264
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/adobe/spectrum-web-components/gen2-migration)