agentleFS
rstackjsrstackjs/agent-skills/skills/rspress-v2-upgrade/SKILL.md

rspress-v2-upgrade

Skill97 starsChanged 3 months agoMITView on GitHub

Migrate Rspress projects from v1 to v2. Use when a user asks to upgrade Rspress, follow the v1-to-v2 guide, update configs/themes, or validate the upgrade.

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read package.json to identify Rspress and plugin packages in use.

    line 11
  2. Distinctive:

    Check for custom theme files and MDX usage.

    line 13
  3. Distinctive:

    Use the v1 → v2 guide as the source of truth:

    line 16
  4. Very specific:

    Remove packages now built into @rspress/core (e.g.

    line 25
  5. Very specific:

    Update import paths (rspress/runtime → @rspress/core/runtime, rspress/theme → @rspress/core/theme, @rspress/theme-default → …

    line 30
  6. Very specific:

    If the project has a custom theme (in theme directory), use @rspress/core/theme-original to import the original theme components.

    line 31
  7. Distinctive:

    Update the Rspress config to match v2 options and defaults.

    line 32
  8. Distinctive:

    Remove deprecated or unsupported settings.

    line 33
  9. Distinctive:

    Run the build and dev server.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Rspress v1 to v2 upgrade

Workflow

  1. Confirm current setup
    • Read package.json to identify Rspress and plugin packages in use.
    • Locate the Rspress config file (commonly rspress.config.(ts|js|mjs|cjs)).
    • Check for custom theme files and MDX usage.
  2. Open the official upgrade guide
  3. Plan the upgrade path
    • List breaking changes that apply to the project's current config, plugins, and theme.
    • Note any removed or renamed packages, options, and APIs.
  4. Update dependencies
    • Replace rspress with @rspress/core@^2.0.0.
    • Remove packages now built into @rspress/core (e.g. rspress, @rspress/plugin-shiki, @rspress/plugin-auto-nav-sidebar, @rspress/plugin-container-syntax, @rspress/plugin-last-updated, @rspress/plugin-medium-zoom, @rspress/theme-default, @rspress/runtime).
    • Bump remaining Rspress plugins to latest versions via npx taze major --include /rspress/ -w -r.
    • Ensure Node.js >= 20.9.0.
  5. Apply config and code changes
    • Update import paths (rspress/runtime → @rspress/core/runtime, rspress/theme → @rspress/core/theme, @rspress/theme-default → @rspress/core/theme-original).
    • If the project has a custom theme (in theme directory), use @rspress/core/theme-original to import the original theme components.
    • Update the Rspress config to match v2 options and defaults.
    • Remove deprecated or unsupported settings.
  6. Validate
    • Run the build and dev server.
    • Fix any warnings or errors that appear in the new version. If errors or warnings occur, please refer to the Official Upgrade Guide and first check if it's caused by any omitted or incomplete migration steps.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.