01
It starts by itself
PR changes build config. Runs in GitHub Actions or Claude Code routine.
- ↻ PR changes build config
pull_request.opened or synchronize, rsbuild.config.ts or package files
Rsbuild builds stay lean and safe.
Install the Rsbuild Best Practices skill and make it a habit: follow https://gethabit.dev/skills/rstackjs/rsbuild-best-practices.md
3K installs96 starsMIT licenceSource on GitHub ↗

Rsbuild Best Practices
by rstackjs · 3K installs
The skill
The rsbuild best practices skill helps developers configure, review and troubleshoot Rsbuild apps: config layout, CLI commands, type checking, bundle size, assets, source map safety, debugging and profiling.
Only when you ask.
The habit
Rsbuild builds stay lean and safe.
↻ Runs by itselfPR changes build config
When does it start? How does it check its work? What does it remember?
Stops after one pull request and at most 2 build reruns.
The agent checks changes to rsbuild.config.ts, tsconfig.json and dependencies.
It flags tools.rspack or tools.bundlerChain where a first-class option exists, and missing source.entry for multi-page apps.
Heavy imports on non-critical paths get a suggestion to use dynamic import().
Source assets should come from source folders, and public files by absolute URL path.
It runs rsbuild build and tsc --noEmit, and reads dist/.rsbuild to confirm the final config.
Findings go into a review comment and the log.
It writes only in its own folder and asks you before anything goes out.
Read both lists. If the left one sounds like you, the Rsbuild Best Practices skill helps.
The skill suggests running with DEBUG=rsbuild and reading dist/.rsbuild instead of trusting assumed config.
It can, using --cpu-prof for JavaScript overhead or RSPACK_PROFILE=OVERVIEW for compiler phases.
Copy the prompt at the top into your agent. It installs the skill from rstackjs/agent-skills and sets up the habit. Or run npx skills add rstackjs/agent-skills --skill rsbuild-best-practices.
Yes. It is published under MIT. Habit is free too.
Install the Rsbuild Best Practices skill and make it a habit: follow https://gethabit.dev/skills/rstackjs/rsbuild-best-practices.md
All rstackjs skills →More code skills →
Works in
Made by rstackjs, published under MIT. Habit links to the original and never changes it. Is this your skill?