1. Habit
  2. Skills
  3. Rsbuild Best Practices skill
rstackjs · 3K installs

Rsbuild Best Practices skill
Runs by itself, PR changes build config.

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

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

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

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one pull request and at most 2 build reruns.

  1. 01

    Read the diff

    The agent checks changes to rsbuild.config.ts, tsconfig.json and dependencies.

  2. 02

    Check configuration rules

    It flags tools.rspack or tools.bundlerChain where a first-class option exists, and missing source.entry for multi-page apps.

  3. 03

    Check bundle habits

    Heavy imports on non-critical paths get a suggestion to use dynamic import().

  4. 04

    Check assets

    Source assets should come from source folders, and public files by absolute URL path.

  5. 05

    Build and type check

    It runs rsbuild build and tsc --noEmit, and reads dist/.rsbuild to confirm the final config.

  6. 06

    Report and log

    Findings go into a review comment and the log.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Rsbuild Best Practices skill helps.

Use it when

  • ✓ setting up an Rsbuild project
  • ✓ reviewing an Rsbuild config change
  • ✓ a build is slow or too large

Skip it when

  • – you use a different bundler
  • – you need Rspack internals only

Questions

Rsbuild Best Practices skill, answered.

How does it debug odd config results?

The skill suggests running with DEBUG=rsbuild and reading dist/.rsbuild instead of trusting assumed config.

Does it profile slow builds?

It can, using --cpu-prof for JavaScript overhead or RSPACK_PROFILE=OVERVIEW for compiler phases.

How do I install the Rsbuild Best Practices skill?

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.

Is the Rsbuild Best Practices skill free?

Yes. It is published under MIT. Habit is free too.

Rsbuild Best Practices. Now as a habit.

Install the Rsbuild Best Practices skill and make it a habit: follow https://gethabit.dev/skills/rstackjs/rsbuild-best-practices.md

  • Free
  • No account
  • Undo in one line

All rstackjs skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by rstackjs, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.