migrate-react-spectrum-v3-to-s2
Upgrade React Spectrum v3 (Spectrum 1) codebases to React Spectrum S2. Use when developers mention migrating or upgrading from React Spectrum v3, Spectrum 1, S1, @adobe/react-spectrum, @react-spectrum/ packages, or codemod-assisted upgrades to @react-spectrum/s2.
- Installs
- 461
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://react-spectrum.adobe.com --skill migrate-react-spectrum-v3-to-s2- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads migrate-react-spectrum-v3-to-s2 automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
React Spectrum v3 to S2 migration
Upgrade React Spectrum v3 codebases to S2 by following these eight steps in order.
Scope
This skill covers only the React Spectrum v3 (S1) to S2 migration. Do not perform major dependency upgrades such as React version bumps (e.g. React 16→17, 17→18, 18→19) as part of this migration. If the project needs a major dependency upgrade, note it as a recommended follow-up in the final report (Step 8) rather than attempting it during migration.
Step 1: Inspect the codebase
- Search package manifests for
@adobe/react-spectrum,@react-spectrum/*, and@spectrum-icons/*. - Note the package manager (npm, yarn, pnpm) from the lockfile.
- Identify the bundler used by the migration target (Parcel, Vite, webpack, Next.js, Rollup, ESBuild).
- In monorepos, inspect the specific package or app being migrated rather than the workspace root.
- Find app entrypoints, root providers, shared test wrappers, toast setup, and any
defaultThemeusage.
See Prerequisites for the full inspection checklist and minimum tool versions.
Step 2: Install @react-spectrum/s2
Install the S2 package with the project's package manager:
npm install @react-spectrum/s2
yarn add @react-spectrum/s2
pnpm add @react-spectrum/s2
If the bundler is not Parcel v2.12.0+, also install and configure unplugin-parcel-macros as a dev dependency. See Getting started for bundler-specific setup instructions.
Step 3: Dry-run the codemod
Preview what the codemod will change before applying:
npx @react-spectrum/codemods s1-to-s2 --agent --dry
yarn dlx @react-spectrum/codemods s1-to-s2 --agent --dry
pnpm dlx @react-spectrum/codemods s1-to-s2 --agent --dry
Use npx for npm/Yarn 1, yarn dlx for Yarn Berry/PnP, pnpm dlx for pnpm.
Add --path <dir> for monorepos or partial rollouts.
Add --components A,B only when explicitly requested for incremental migration.
Review the dry-run output to understand the scope of changes.
Step 4: Run the codemod
Execute the codemod to transform the source files:
npx @react-spectrum/codemods s1-to-s2 --agent
yarn dlx @react-spectrum/codemods s1-to-s2 --agent
pnpm dlx @react-spectrum/codemods s1-to-s2 --agent
Use the same --path and --components flags as the dry run if applicable.
Step 5: Format with the project's formatter
If the project has a formatter (Prettier, ESLint, Biome, Oxfmt, etc.), run it on the changed files to remove extraneous formatting changes introduced by the codemod.
Step 6: Fix remaining TODO(S2-upgrade) comments
Search the codebase for TODO(S2-upgrade) comments left by the codemod. Each one marks a change that requires manual review.
See Focused manual fixes for information on how to fix these.
Also reference the react-spectrum-s2 skill (if available) for full S2 component documentation when needed.
Step 7: Validate
Run the project's own toolchain to verify the migration is complete:
- Install dependencies if package manifests changed.
- Run the typecheck or compile step (e.g.
tsc --noEmit,tsc -b). - Run tests covering the migrated code. Prefer the narrowest test scope that covers the changed files.
- Run the build to confirm the output is intact.
In monorepos, validate the affected package first with its own scripts before running workspace-wide checks. Fix any failures before declaring the migration complete.
Step 8: Generate final report
After the migration is complete, produce a final report for the user with the following sections:
Summary of changes
- Packages added and removed.
- What the codemod changed (files affected, components migrated).
- Manual fixes applied (layout components, icons, dialogs, collections, toast, etc.).
Remaining issues
- Any unresolved
TODO(S2-upgrade)comments. - Type errors, test failures, or known gaps that still need attention.
Recommended follow-ups
- If the project is not on React 19, recommend upgrading. React 19 is recommended for S2. Include the relevant upgrade guide links:
- Any other major upgrades (e.g. React, bundler, etc.) that were out of scope for this migration.
- Any additional cleanup or improvements the user may want to address.
Deep reference
Use these when you need more component-by-component or API-level detail:
- Migration guide: comprehensive component-by-component migration reference.
- Getting started: framework setup and macro configuration.
- Provider: locale, router, color-scheme, and SSR usage.
- Styling: style macro overview including runtime conditions, CSS variables, CSS optimization, and CSS resets.
- Style macro: exact style macro syntax and constraints.
- Toast: full S2 toast API and examples.
FAQ
What does the migrate-react-spectrum-v3-to-s2 skill do?
Upgrade React Spectrum v3 (Spectrum 1) codebases to React Spectrum S2. Use when developers mention migrating or upgrading from React Spectrum v3, Spectrum 1, S1, @adobe/react-spectrum, @react-spectrum/ packages, or codemod-assisted upgrades to @react-spectrum/s2.
How do I install migrate-react-spectrum-v3-to-s2?
Run npx skills add https://react-spectrum.adobe.com --skill migrate-react-spectrum-v3-to-s2 in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/migrate-react-spectrum-v3-to-s2/ (personal) or .claude/skills/migrate-react-spectrum-v3-to-s2/ (project).
Which AI agents can use migrate-react-spectrum-v3-to-s2?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is migrate-react-spectrum-v3-to-s2 safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains migrate-react-spectrum-v3-to-s2?
It is published by react-spectrum.adobe.com in react-spectrum.adobe.com. It has 461 recorded installs.
More from react-spectrum.adobe.com
react-spectrum-s2
react-spectrum.adobe.com
Build UIs with React Spectrum S2 (Spectrum 2), Adobe's component library for React. Use when developers are using @react-spectrum/s2 or need Adobe design system components. Includes React Aria Components docs as a reference for building custom components on top of unstyled primitives.
spectrum-audit
react-spectrum.adobe.com
Audit a codebase for adherence to the Spectrum design system and React Spectrum S2 best practices. Use when a developer asks to audit, review, lint, or check a project for Spectrum/S2 correctness, configuration, styling, accessibility, or component-usage issues.
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.