- Home
- Skills
- Rstackjs
- Agent Skills
- Rsdoctor Analysis
rsdoctor-analysis_skill
- JavaScript
36
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
3 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill rstackjs/agent-skills --skill rsdoctor-analysis- SKILL.md12.4 KB
Overview
This skill analyzes Rsdoctor-generated rsdoctor-data.json from local Rspack/Webpack builds and returns evidence-based conclusions and actionable optimization recommendations. It is a zero-dependency JavaScript CLI that inspects chunks, modules, packages, loaders, assets and build metadata without modifying project code. Responses prioritize Conclusion → Metrics → Actions → Sources → Gaps.
How this skill works
The CLI reads the provided rsdoctor-data.json and runs targeted analyzers (chunks, modules, packages, assets, loaders, build, errors, rules) to extract sizes, costs, duplication and side-effect metadata. It produces a structured analysis and stepwise recommendations (high/medium/low priority) while enforcing read-only behavior for most commands. For installation/configuration tasks only, the skill documents safe package/config edits and leaves execution to the user.
When to use it
- When you have a generated rsdoctor-data.json and need an evidence-driven bundle audit
- Before release to identify large chunks, duplicate packages, or non-tree-shakeable modules
- When CI/build time grows and you need build-stage cost breakdowns
- To triage runtime bundle size regressions between builds
- When optimizing media assets or loader performance
Best practices
- Always pass --data-file <path> pointing to the latest rsdoctor-data.json generated with RSDOCTOR=true
- Start with bundle optimize (step 1) to get high-level recommendations, then use focused commands (chunks large, packages duplicates) for details
- Prefer id-based queries when paths are ambiguous: use modules by-path first then modules by-id if multiple matches
- Use --compact for machine parsing in CI or large outputs
- Treat recommendations as guidance only; do not run automated code modifications unless you explicitly perform install/config commands
Example use cases
- Run bundles optimize --data-file ./dist/rsdoctor-data.json to get prioritized actions for duplicate packages, large chunks, and media issues
- Use packages duplicates to list duplicate package versions and then plan deduplication or aliasing
- Inspect modules side-effects to locate modules preventing tree-shaking and consider replacements or explicit sideEffects config
- Run loaders hot-files to find slow loader/file pairs and reconfigure loader scope or caching
- Compare two builds with assets diff --baseline ./old/rsdoctor-data.json --current ./new/rsdoctor-data.json to spot regressions
FAQ
You must supply --data-file <path> that points to a valid rsdoctor-data.json generated during a build with RSDOCTOR=true.
Will this tool change my codebase?
No. Most commands are read-only and only output recommendations. Only install or config commands document allowable dependency/config edits and do not execute them automatically.