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

rsdoctor-v2-upgrade

Skill97 starsChanged 3 months agoMITView on GitHub

Upgrade Rspack projects from Rsdoctor 1.x to 2.0. Use when replacing legacy Rsdoctor packages, converting Rsdoctor setup to ESM, updating removed or deprecated options, moving MCP workflows to Agent CLI, or validating Node.js and Rspack compatibility for an Rsdoctor 2.0 upgrade.

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 12 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

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

    Read package.json, the lockfile, Node.js version files, and the build scripts.

    line 16
  2. Very specific:

    Search source, scripts, and editor configuration for @rsdoctor/, RsdoctorRspackPlugin, legacy options, MCP setup, and report-output …

    line 19
  3. Very specific:

    Update only Rsdoctor dependencies and preserve the existing Rspack and framework versions.

    line 25
  4. Distinctive:

    Do not mechanically rename imports from removed low-level packages.

    line 35
  5. Distinctive:

    Use the project's existing package manager and avoid unrelated dependency or lockfile updates.

    line 36
  6. Distinctive:

    Do not remove framework-owned transitive 1.x dependencies merely because they remain in the lockfile.

    line 37
  7. Very specific:

    Delete experiments.enableNativePlugin and supports.banner.

    line 42
  8. Very specific:

    If Rspack reports that experiments.RsdoctorPlugin is unavailable, report the compatibility issue instead of changing Rspack or framework …

    line 43
  9. Very specific:

    Remove @rsdoctor/mcp-server, its editor MCP entries, and scripts that start it.

    line 46
  10. Very specific:

    Add @rsdoctor/agent-cli, generate a fresh rsdoctor-data.json, and invoke rsdoctor-agent against that file.

    line 47
  11. Distinctive:

    If JSON output or Agent CLI is used, validate a newly generated data file with one representative command.

    line 53
  12. Distinctive:

    Run the relevant tests and type checks, then search again for removed packages and legacy options.

    line 54
  13. Distinctive:

    Write user-facing explanations, plans, progress updates, and migration summaries in the user's requested language.

    line 59
  14. Distinctive:

    Keep package names, API names, configuration fields, commands, file paths, and error messages in their original form.

    line 60
  15. Distinctive:

    Do not install Rsdoctor 2.x into a webpack-only project.

    line 64
  16. Distinctive:

    Do not activate 1.x and 2.x plugins together to work around migration errors.

    line 65
  17. Distinctive:

    Do not silently change report formats, filenames, server ports, or source-code visibility.

    line 66
  18. Distinctive:

    Do not replace MCP configuration with an invented Agent CLI service configuration.

    line 67
  19. Distinctive:

    Do not remove compatibility code until the replacement build and report have been verified.

    line 68

≈ “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

Upgrade Rsdoctor to v2

Upgrade with the smallest behavior-preserving diff. Treat the official migration guides and the installed package exports as the source of truth:

Workflow

  1. Audit the current integration
    • Read package.json, the lockfile, Node.js version files, and the build scripts.
    • Determine the installed Rsdoctor package versions from the lockfile or package metadata, and check which package provides the active RsdoctorRspackPlugin. Migrate a 1.x @rsdoctor/rspack-plugin integration, including any partially migrated setup that still imports it. If @rsdoctor/core 2.x already provides the active plugin, validate the integration instead of migrating it again. @rsdoctor/core alone does not prove a 2.x integration because 1.x projects may use it for custom rules. Distinguish direct integration from framework-owned transitive 1.x dependencies.
    • Locate Rspack, Rsbuild, and Rsdoctor configuration files. Preserve any environment condition that enables Rsdoctor only for selected builds.
    • Search source, scripts, and editor configuration for @rsdoctor/, RsdoctorRspackPlugin, legacy options, MCP setup, and report-output assumptions.
    • Record the current build command and expected report formats before editing.
  2. Pass the compatibility gate
    • Require Node.js ^20.19.0 || >=22.12.0 and verify that the installed Rspack version satisfies the selected @rsdoctor/core peer dependency. Check the selected package's engines and peer dependencies if they differ.
    • For webpack projects, stop the Rsdoctor upgrade. Keep Rsdoctor 1.x or migrate the project to Rspack as a separate task first.
    • Update only Rsdoctor dependencies and preserve the existing Rspack and framework versions. If a framework supplies Rspack, do not add @rspack/core directly. Report a compatibility issue separately only when the installed version does not satisfy Rsdoctor's peer dependency.
  3. Plan only applicable changes
    • Read references/migration-map.md.
    • List the package, import, module-format, configuration, and AI-workflow changes that apply to this project.
    • Choose one Rsdoctor 2.x target version. Keep @rsdoctor/core and @rsdoctor/cli on the same version; version @rsdoctor/agent-cli independently.
  4. Migrate packages and imports
    • Replace @rsdoctor/rspack-plugin with @rsdoctor/core and import RsdoctorRspackPlugin from @rsdoctor/core.
    • Convert Rsdoctor require() calls to ESM imports. When the project remains CommonJS, move only the affected build config to a supported ESM extension such as .mjs instead of changing the entire package module type without need.
    • Do not mechanically rename imports from removed low-level packages. Resolve every imported symbol against the public 2.x exports, then type-check it.
    • Use the project's existing package manager and avoid unrelated dependency or lockfile updates.
    • Do not remove framework-owned transitive 1.x dependencies merely because they remain in the lockfile; verify whether the framework still activates its old plugin.
  5. Migrate configuration without changing report intent
    • Replace each removed or deprecated field using the mapping reference.
    • Preserve whether the project needs HTML, JSON, or both, and preserve intentional code-source omission from lite reports.
    • Delete experiments.enableNativePlugin and supports.banner; both options were removed in 2.0, and the Rspack native plugin is always enabled.
    • If Rspack reports that experiments.RsdoctorPlugin is unavailable, report the compatibility issue instead of changing Rspack or framework dependencies as part of the Rsdoctor upgrade.
  6. Migrate AI workflows when present
    • Remove @rsdoctor/mcp-server, its editor MCP entries, and scripts that start it.
    • Add @rsdoctor/agent-cli, generate a fresh rsdoctor-data.json, and invoke rsdoctor-agent against that file.
    • Rewrite automation to consume structured CLI output. Agent CLI is not an MCP-compatible or drop-in API replacement. Do not carry over MCP ports or assume its compiler-selection syntax applies; for multi-compiler data, select a compiler using Agent CLI's --compiler <name>.
  7. Validate the migration
    • Reinstall dependencies and run the production build under the project's supported Node.js version.
    • Confirm the expected Rsdoctor report is generated and open the overview, compilation, and bundle-analysis pages used by the project.
    • If JSON output or Agent CLI is used, validate a newly generated data file with one representative command.
    • Run the relevant tests and type checks, then search again for removed packages and legacy options.
    • Report what changed, commands run, and any validation that could not be completed. Do not claim success from dependency installation alone.

Output language

  • Write user-facing explanations, plans, progress updates, and migration summaries in the user's requested language. If none is specified, follow the language of the user's request.
  • Keep package names, API names, configuration fields, commands, file paths, and error messages in their original form; explain their meaning in the response language when needed.

Guardrails

  • Do not install Rsdoctor 2.x into a webpack-only project.
  • Do not activate 1.x and 2.x plugins together to work around migration errors. Investigate framework-owned transitive 1.x packages separately.
  • Do not silently change report formats, filenames, server ports, or source-code visibility.
  • Do not replace MCP configuration with an invented Agent CLI service configuration.
  • Do not remove compatibility code until the replacement build and report have been verified.

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.