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
- Very specific: line 16
Read package.json, the lockfile, Node.js version files, and the build scripts.
- Very specific: line 19
Search source, scripts, and editor configuration for @rsdoctor/, RsdoctorRspackPlugin, legacy options, MCP setup, and report-output …
- Very specific: line 25
Update only Rsdoctor dependencies and preserve the existing Rspack and framework versions.
- Distinctive: line 35
Do not mechanically rename imports from removed low-level packages.
- Distinctive: line 36
Use the project's existing package manager and avoid unrelated dependency or lockfile updates.
- Distinctive: line 37
Do not remove framework-owned transitive 1.x dependencies merely because they remain in the lockfile.
- Very specific: line 42
Delete experiments.enableNativePlugin and supports.banner.
- Very specific: line 43
If Rspack reports that experiments.RsdoctorPlugin is unavailable, report the compatibility issue instead of changing Rspack or framework …
- Very specific: line 46
Remove @rsdoctor/mcp-server, its editor MCP entries, and scripts that start it.
- Very specific: line 47
Add @rsdoctor/agent-cli, generate a fresh rsdoctor-data.json, and invoke rsdoctor-agent against that file.
- Distinctive: line 53
If JSON output or Agent CLI is used, validate a newly generated data file with one representative command.
- Distinctive: line 54
Run the relevant tests and type checks, then search again for removed packages and legacy options.
- Distinctive: line 59
Write user-facing explanations, plans, progress updates, and migration summaries in the user's requested language.
- Distinctive: line 60
Keep package names, API names, configuration fields, commands, file paths, and error messages in their original form.
- Distinctive: line 64
Do not install Rsdoctor 2.x into a webpack-only project.
- Distinctive: line 65
Do not activate 1.x and 2.x plugins together to work around migration errors.
- Distinctive: line 66
Do not silently change report formats, filenames, server ports, or source-code visibility.
- Distinctive: line 67
Do not replace MCP configuration with an invented Agent CLI service configuration.
- Distinctive: line 68
Do not remove compatibility code until the replacement build and report have been verified.
≈ “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.
Files
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
- 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-pluginintegration, including any partially migrated setup that still imports it. If@rsdoctor/core2.x already provides the active plugin, validate the integration instead of migrating it again.@rsdoctor/corealone 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.
- Read
- Pass the compatibility gate
- Require Node.js
^20.19.0 || >=22.12.0and verify that the installed Rspack version satisfies the selected@rsdoctor/corepeer dependency. Check the selected package'senginesand 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/coredirectly. Report a compatibility issue separately only when the installed version does not satisfy Rsdoctor's peer dependency.
- Require Node.js
- 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/coreand@rsdoctor/clion the same version; version@rsdoctor/agent-cliindependently.
- Migrate packages and imports
- Replace
@rsdoctor/rspack-pluginwith@rsdoctor/coreand importRsdoctorRspackPluginfrom@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.mjsinstead 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.
- Replace
- 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.enableNativePluginandsupports.banner; both options were removed in 2.0, and the Rspack native plugin is always enabled. - If Rspack reports that
experiments.RsdoctorPluginis unavailable, report the compatibility issue instead of changing Rspack or framework dependencies as part of the Rsdoctor upgrade.
- Migrate AI workflows when present
- Remove
@rsdoctor/mcp-server, its editor MCP entries, and scripts that start it. - Add
@rsdoctor/agent-cli, generate a freshrsdoctor-data.json, and invokersdoctor-agentagainst 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>.
- Remove
- 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.
In this repository31 other files it gives its agents.
- AGENTS.mdAGENTS.md
- create-draft-release-notesSkill
- mdx-to-markdownSkill
- pr-creatorSkill
- release-blog-writerSkill
- rstack-docs-writerSkill
- rstack-eco-ci-debugSkill
- rstack-repo-maintainSkill
- rstack-skill-evaluatorSkill
- migrate-to-rsbuildSkill
- migrate-to-rslibSkill
- migrate-to-rslintSkill
- migrate-to-rstestSkill
- rsbuild-best-practicesSkill
- rsbuild-v2-upgradeSkill
- rsdoctor-analysisSkill
- rslib-best-practicesSkill
- rslib-modern-packageSkill
- rspack-best-practicesSkill
- rspack-debuggingSkill
- rspack-split-chunksSkill
- rspack-tracingSkill
- rspack-v2-upgradeSkill
- rspress-best-practicesSkill
- rspress-custom-themeSkill
- rspress-description-generatorSkill
- rspress-docs-generatorSkill
- rspress-v2-upgradeSkill
- rstest-best-practicesSkill
- rstest-debuggingSkill
- storybook-rsbuildSkill
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.

