Source profileQuality 92/100

rstackjs/agent-skills/skills/rsdoctor-analysis/SKILL.md

rsdoctor-analysis

Use when analyzing Rspack/Webpack bundles from local `rsdoctor-data.json` and producing evidence-based optimization recommendations.

Source repository stars
89
Declared platforms
0
Static risk flags
1
Last source update
2026-08-21
Source checked
2026-08-25

Decision brief

What it does: where it fits

Use the globally installed rsdoctor-agent CLI from @rsdoctor/agent-cli only after a real rsdoctor-data.json path exists. Keep analysis read-only unless the user explicitly asks for install/config setup.

Best for

  • Use when analyzing Rspack/Webpack bundles from local `rsdoctor-data.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/rstackjs/agent-skills --skill "skills/rsdoctor-analysis"
Safe inspection promptEditorial

Inspect the Agent Skill "rsdoctor-analysis" from https://github.com/rstackjs/agent-skills/blob/921e132e4bc4f181c8df2573c826bd3b21f5de93/skills/rsdoctor-analysis/SKILL.md at commit 921e132e4bc4f181c8df2573c826bd3b21f5de93. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Core Workflow

    1. Reuse current-session results and valid .rsdoctor-analysis-cache.json entries before doing new work. 2. Locate rsdoctor-data.json fast: user-provided path, then dist/rsdoctor-data.json, output/rsdoctor-data.json, static/rsdoctor-data.json, .rsdoctor/rsdoctor-data.json, then o…

    Reuse current-session results and valid .rsdoctor-analysis-cache.json entries before doing new work.Locate rsdoctor-data.json fast: user-provided path, then dist/rsdoctor-data.json, output/rsdoctor-data.json, static/rsdoctor-data.json, .rsdoctor/rsdoctor-data.json, then one bounded rg --files search excluding nodemodu…If data exists, skip all plugin version/config/build generation logic. Update cache when useful.
  2. 02

    ROI Triage Gate

    Before recommending fixes, classify the current build into broad cost buckets and choose the highest-ROI lever from evidence, not intuition. This gate is generic for Rspack/Webpack projects; do not use framework-specific runtime layers unless the user's project exposes them in t…

    Report the measured breakdown first when it changes recommendation priority.Start with the largest bucket that maps to a practical fix; a smaller issue should not outrank a larger one unless the larger one is expected or intentionally unavoidable.Treat issuer/reference-chain tracing as second-pass work. Run it only when a high-impact candidate needs ownership evidence, or when the user asks "why" / "who imported this".
  3. 03

    Generation Gate

    Identify pluginName (@rsdoctor/rspack-plugin or @rsdoctor/webpack-plugin) and determine pluginVersion from local files first: package.json, lockfile, then nodemodules//package.json; use pnpm why / npm ls only as fallback.

    Identify pluginName (@rsdoctor/rspack-plugin or @rsdoctor/webpack-plugin) and determine pluginVersion from local files first: package.json, lockfile, then nodemodules//package.json; use pnpm why / npm ls only as fallbac…Use this exact if/else decision tree; do not merge branches:Preflight every build command: RSDOCTOROUTPUT=json is allowed only in the pluginVersion = 1.5.11 branch. For missing, unknown, or < 1.5.11, it is forbidden. For < 1.5.11, generating rsdoctor-data.json requires the plugi…
  4. 04

    Evidence and Command Bounds

    Use rsdoctor-agent for bundle data access only after rsdoctor-data.json exists; prefer parallel independent fetches; bound output with --filter, pagination, and --limit.

    Use rsdoctor-agent for bundle data access only after rsdoctor-data.json exists; prefer parallel independent fetches; bound output with --filter, pagination, and --limit.Default analysis stays within the Default Evidence Set. For non-default analysis, choose minimal fields from references/rsdoctor-data-types.md and patterns from references/common-analysis-patterns.md.Treat chain tracing, broad commands, optimization edits, splitChunks experiments, and build re-runs as opt-in follow-ups that require user confirmation.
  5. 05

    Output and Recovery

    1. Issues found in the current build and recommended fixes: - Group each issue with its fix recommendation. - Include concrete evidence (size/time/count/path/rule code) and priority. - For duplicate packages and tree-shaking issues, include a short "continue tracing vs stop here…

    Issues found in the current build and recommended fixes:Group each issue with its fix recommendation.Include concrete evidence (size/time/count/path/rule code) and priority.

Permission review

Static risk signals and limitations

Reads files

low · line 109

The documentation asks the agent to read local files, directories, or repositories.

JSON read error: verify file path, JSON validity, and permissions.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars89SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
rstackjs/agent-skills
Skill path
skills/rsdoctor-analysis/SKILL.md
Commit
921e132e4bc4f181c8df2573c826bd3b21f5de93
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Rsdoctor Analysis Assistant Skill

Use the globally installed rsdoctor-agent CLI from @rsdoctor/agent-cli only after a real rsdoctor-data.json path exists. Keep analysis read-only unless the user explicitly asks for install/config setup.

Response order (required): High-Priority Issues -> Proposed Solutions -> Optional Reference-Chain Follow-up Choices -> Next Deep-Dive Issue Categories (Not commands).

Core Workflow

  1. Reuse current-session results and valid .rsdoctor-analysis-cache.json entries before doing new work.
  2. Locate rsdoctor-data.json fast: user-provided path, then dist/rsdoctor-data.json, output/rsdoctor-data.json, static/rsdoctor-data.json, .rsdoctor/rsdoctor-data.json, then one bounded rg --files search excluding node_modules and .git. Treat manifest.json only as an index.
  3. If data exists, skip all plugin version/config/build generation logic. Update cache when useful.
  4. If data is missing, stop analysis: do not run rsdoctor-agent analysis commands, do not run the Analysis Gate, and either ask for the data path or run the Generation Gate below only when setup/generation is required.
  5. After a real data file exists, run Analysis Gate at most once before the first rsdoctor-agent data-fetch command: verify global @rsdoctor/agent-cli with npm view @rsdoctor/agent-cli version and rsdoctor-agent --version; install latest only if missing/outdated, a version-related error occurs, or the user asks to refresh.
  6. Fetch only the Default Evidence Set first; run independent fetches in parallel when possible.
  7. Run the ROI Triage Gate below before selecting deep-dive commands or recommendations. Use it to rank issue categories by measured impact, then synthesize findings in the required response order.

Performance rules: parallelize independent checks, cache only derived facts (dataFile, dataFileMtime, pluginName, pluginVersion, dependency/config/plugin modification times), and invalidate cache when paths disappear, modification times change, the user asks to refresh, or cached values fail. Speculative plugin checks must not trigger generation; use them only after confirming the data file is missing.

ROI Triage Gate

Before recommending fixes, classify the current build into broad cost buckets and choose the highest-ROI lever from evidence, not intuition. This gate is generic for Rspack/Webpack projects; do not use framework-specific runtime layers unless the user's project exposes them in the data.

Cost bucketEvidence sourceFirst lever
Assets/mediaassetsTop, assets media, chunkGraph.assetsCompress, convert, deduplicate, subset, or lazy-load large assets
Large packages/modulespackagesTop, module/package size fieldsReplace heavy packages, use deep imports, split non-critical code, or review direct dependency choices
Duplicate/cross-chunk costE1001/E1002, packages duplicates, cross-chunk package summariesDeduplicate versions, tune package resolution, or adjust splitChunks/cache groups
Tree-shaking wasteretainedModulesTop, retained CJS/barrel/side-effects modulesFix CJS/barrel imports, sideEffects declarations, or package entrypoints
Build-time costbuildCost, loaders/plugins/directories cost dataOptimize loaders/plugins, cache, watcher, or source-map/dev settings; prioritize only when the user asks about build performance

Decision rules:

  • Report the measured breakdown first when it changes recommendation priority.
  • Start with the largest bucket that maps to a practical fix; a smaller issue should not outrank a larger one unless the larger one is expected or intentionally unavoidable.
  • Treat issuer/reference-chain tracing as second-pass work. Run it only when a high-impact candidate needs ownership evidence, or when the user asks "why" / "who imported this".
  • Do not present aggregate rule output as sufficient evidence for a fix that requires a concrete file, package, chunk, size, or dependency path.
  • If the largest bucket is structural or intentionally required, say that it is a wall and name the external change that would be needed instead of inventing low-impact source edits.

Generation Gate

Identify pluginName (@rsdoctor/rspack-plugin or @rsdoctor/webpack-plugin) and determine pluginVersion from local files first: package.json, lockfile, then node_modules/<plugin>/package.json; use pnpm why / npm ls only as fallback.

Use this exact if/else decision tree; do not merge branches:

if pluginName is missing:
  install/register the matching Rsdoctor plugin, then configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only
else if pluginVersion is unknown:
  resolve pluginVersion first; if still unknown, configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only
else if pluginVersion >= 1.5.11:
  do not edit plugin config just for JSON; build with RSDOCTOR_OUTPUT=json and RSDOCTOR=true if needed
else: # pluginVersion < 1.5.11
  MUST configure output.mode='brief' and output.options.type=['json']; build with RSDOCTOR=true only

Preflight every build command: RSDOCTOR_OUTPUT=json is allowed only in the pluginVersion >= 1.5.11 branch. For missing, unknown, or < 1.5.11, it is forbidden. For < 1.5.11, generating rsdoctor-data.json requires the plugin config below:

output: {
  mode: 'brief',
  options: {
    type: ['json'],
  },
}

Evidence and Command Bounds

Default Evidence Set:

Summary keyEvidence sourceBounds
buildCostbuild summaryfiltered fields only
assetsToptop assets by raw/gzip sizefixed Top-N
packagesToptop packages by gzip sizefixed Top-N; avoid full packages list pages
duplicatePackagesE1001 duplicate package summaryfirst-pass summary only
crossChunkPackagesE1002 cross-chunk duplication summaryfirst-pass summary only
retainedModulesToptree-shaking retained-modules --limit 10filtered fields only; no --compact

Scope rules:

  • Use rsdoctor-agent for bundle data access only after rsdoctor-data.json exists; prefer parallel independent fetches; bound output with --filter, pagination, and --limit.
  • Default analysis stays within the Default Evidence Set. For non-default analysis, choose minimal fields from references/rsdoctor-data-types.md and patterns from references/common-analysis-patterns.md.
  • Treat chain tracing, broad commands, optimization edits, splitChunks experiments, and build re-runs as opt-in follow-ups that require user confirmation.
  • For duplicate packages and tree-shaking issues, identify issues first; trace reference/import chains only after user confirmation.
  • Prefer tree-shaking retained-modules --emitted-only --category side-effects --limit 10 with narrow --filter for side-effects investigations.
  • For retained emitted modules, use tree-shaking retained-modules with --emitted-only, bounded --category, --sort gzipSize, --limit, and narrow --filter; do not pass --compact.
  • Use tree-shaking summary only as fallback for missing fields or aggregate context. Treat tree-shaking bailout-reasons as high-volume; run it only when explicitly requested and pass target --modules (max 100).
  • If any command exceeds 5k tokens, 500 KB raw output, or a few hundred transcript lines, stop broad fetching and switch to targeted compact queries.

Output and Recovery

Output format:

  1. Issues found in the current build and recommended fixes:
    • Group each issue with its fix recommendation.
    • Include concrete evidence (size/time/count/path/rule code) and priority.
    • For duplicate packages and tree-shaking issues, include a short "continue tracing vs stop here" choice.
  2. Whether deeper analysis is still needed:
    • List remaining issue categories only, not commands.

For Top-N insights, prefer a table: Name | Volume/Time | Count | Recommendation.

Recovery rules:

  • rsdoctor-data.json missing: do not run rsdoctor-agent; ask for the data path or run Generation Gate, then use the matching install reference if setup is needed.
  • Command not found: run Analysis Gate, then retry with rsdoctor-agent.
  • query reports unknown tool: run list and use a catalog tool name, or switch to direct <group> <subcommand> mode.
  • JSON read error: verify file path, JSON validity, and permissions.
  • Run installs, builds, version checks, and rsdoctor-agent... commands only in the host's authorized command environment when it has the required project, dependency, and network access. If the available environment lacks that access, stop and ask the user instead of attempting to bypass the sandbox or permission boundary. Clearly identify the missing permission or access; if an Rsdoctor dependency must be installed, tell the user which dependency is required and provide the appropriate package-manager command for them to run.

References: commands/options references/command-map.md; install/config/data location references/install-rsdoctor.md, references/install-rsdoctor-rspack.md, references/install-rsdoctor-webpack.md, references/install-rsdoctor-common.md; raw data fields references/rsdoctor-data-types.md; common patterns references/common-analysis-patterns.md.

Frequently asked questions

What to verify before installation and use

What does the rsdoctor-analysis source document cover?

Use the globally installed rsdoctor-agent CLI from @rsdoctor/agent-cli only after a real rsdoctor-data.json path exists. Keep analysis read-only unless the user explicitly asks for install/config setup.

How do I install rsdoctor-analysis?

The source record exposes this install command: npx skills add https://github.com/rstackjs/agent-skills --skill "skills/rsdoctor-analysis". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged read-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10015,122

wanshuiyin/Auto-claude-code-research-in-sleep

citation-audit

Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.

Computed 10014,671

prowler-cloud/prowler

postgresql-indexing

PostgreSQL indexing best practices for Prowler: index design, partial indexes, partitioned table indexing, EXPLAIN ANALYZE validation, concurrent operations, monitoring, and maintenance. Trigger: When creating or modifying PostgreSQL indexes, analyzing query performance with EXPLAIN, debugging slow queries, reviewing index usage statistics, reindexing, dropping indexes, or working with partitioned table indexes. Also trigger when discussing index strategies, partial indexes, or index maintenance

Computed 9965

brucesongs/kali-claw

insecure-design

Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.