Token导航 LogoToken导航TokenDH.com
研究检索需要联网unknown未标认证来源可访问许可证需确认审计未展示

migrate-react-spectrum-v3-to-s2migrate React spectrum V3 TO S2 搜索

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

1,270

周安装

54

下载量

445
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:migrate-react-spectrum-v3-to-s2(migrate React spectrum V3 TO S2 搜索)
来源仓库:https://react-spectrum.adobe.com
仓库路径:migrate-react-spectrum-v3-to-s2
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

用于辅助前端页面、组件、样式和交互逻辑的开发与维护,适用于 Local Agent。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码。
  • 需结合项目现有设计系统、路由和构建方式使用,避免生成孤立片段。
  • 涉及页面改动时应配合本地预览和构建检查确认视觉效果。
  • migrate-react-spectrum-v3-to-s2 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

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 defaultTheme usage.

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:

  1. Install dependencies if package manifests changed.
  2. Run the typecheck or compile step (e.g. tsc --noEmit, tsc -b).
  3. Run tests covering the migrated code. Prefer the narrowest test scope that covers the changed files.
  4. 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:

- React 17: https://legacy.reactjs.org/blog/2020/08/10/react-v17-rc.html - React 18: https://react.dev/blog/2022/03/08/react-18-upgrade-guide - React 19: https://react.dev/blog/2024/04/25/react-19-upgrade-guide

  • 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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

95.17%
按下载量换算424

安全审计

暂无安全审计结果可展示。

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills