/rstack:rslib-best-practicesfrom rstack
Guides configuring, building, and troubleshooting Rslib library projects: output formats, declarations, dependency handling, and toolchain integration.
Ships in rstack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Apply these rules when writing or reviewing Rslib library projects.
rslib.config.ts and defineConfiglib.*), and also leverage Rsbuild configurations (e.g., source.*, output.*, tools.*) as neededtools.rspack or tools.bundlerChain to access Rspack's native configurationstsconfig.json path aliasesrslib to buildrslib --watch to build in watch mode for local developmentrslib inspect to inspect final Rslib/Rsbuild/Rspack configs"type": "module" in package.jsonoutput.target set to 'web' when building component librariesexports field in package.json is correctly configured and matches the actual JavaScript output and declaration files output of different formats (ESM, CJS, etc.)lib.dts: true or detailed configurationslib.dts.tsgo experimental feature with @typescript/native-preview installeddevDependencies in bundle mode and dependencies in dependencies and peerDependencies will be automatically externalized (not bundled) by defaultpackage.json carefully to ensure no missing dependency errors occur when consumers install and use this packagelib.syntax aligned with real compatibility requirements to enable better optimizations@rstest/adapter-rslib for writing tests@rspress/plugin-preview and @rspress/plugin-api-docgen for component previews and API docsDEBUG=rsbuild when diagnosing config resolution or plugin behaviordist/.rsbuild to confirm final Rsbuild/Rspack config, not assumed configWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub rstackjs/agent-skills --plugin rstack23 skills in this plugin
/migrate-to-rsbuildMigrate webpack, Vite, create-react-app (CRA/CRACO), or Vue CLI projects to Rsbuild./migrate-to-rslibMigrate tsc or tsup library projects to Rslib./migrate-to-rslintMigrate ESLint flat config or Oxlint to Rslint, preserving rule options, file scopes, and plugins while updating lint scripts, editor settings, and inline directives./migrate-to-rstestMigrate Jest, Vitest, or Playwright Test to Rstest while preserving test discovery, assertions, mocks, snapshots, and coverage.Other plugins' skills for the same job