
rsbuild-best-practices
Configure, review, or troubleshoot Rsbuild applications, including build/dev commands, assets, type checking, and bundle optimization.
- Installs
- 2.7K
- Last 24h
- +11
- Trending rank
- #8140
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/rstackjs/agent-skills --skill rsbuild-best-practices- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads rsbuild-best-practices automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Rsbuild best practices
Apply these rules when writing or reviewing Rsbuild projects.
Configuration
- Use
rsbuild.config.tsanddefineConfig - Use
tools.rspackortools.bundlerChainonly when no first-class Rsbuild option exists - Define explicit
source.entryvalues for multi-page applications - In TypeScript projects, prefer
tsconfig.jsonpath aliases first
CLI
- Use
rsbuildfor local development - Use
rsbuild buildfor production build - Use
rsbuild previewonly for local production preview - Use
rsbuild inspectto inspect final Rsbuild/Rspack configs
Type checking
- Use
@rsbuild/plugin-type-checkfor integrated dev/build type checks - Or run
tsc --noEmit/vue-tsc --noEmitas an explicit script step
Bundle size optimization
- Prefer dynamic
import()for non-critical code paths - Prefer lightweight libraries where possible
- Keep browserslist aligned with real compatibility requirements
Asset management
- Import source-managed assets from project source directories, not from
public - Reference
publicfiles by absolute URL path
Security
- Do not publish
.mapfiles to public servers/CDNs when production source maps are enabled
Debugging
- Run with
DEBUG=rsbuildwhen diagnosing config resolution or plugin behavior - Read generated files in
dist/.rsbuildto confirm final config, not assumed config
Profiling
- Use Node CPU profiling (
--cpu-prof) when JavaScript-side overhead is suspected - Use
RSPACK_PROFILE=OVERVIEWand analyze trace output for compiler-phase bottlenecks
Documentation
- For the latest (v2) docs, read http://rsbuild.rs/llms.txt
- For Rsbuild v1 docs, read http://v1.rsbuild.rs/llms.txt
FAQ
What does the rsbuild-best-practices skill do?
Configure, review, or troubleshoot Rsbuild applications, including build/dev commands, assets, type checking, and bundle optimization.
How do I install rsbuild-best-practices?
Run npx skills add https://github.com/rstackjs/agent-skills --skill rsbuild-best-practices in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/rsbuild-best-practices/ (personal) or .claude/skills/rsbuild-best-practices/ (project).
Which AI agents can use rsbuild-best-practices?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is rsbuild-best-practices safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains rsbuild-best-practices?
It is published by rstackjs in rstackjs/agent-skills. It has 2,742 recorded installs.
More from rstackjs/agent-skills
rstest-best-practices
rstackjs/agent-skills
Set up, write, or review Rstest tests and configuration, including environments, mocks, snapshots, coverage, and CI.
rslib-best-practices
rstackjs/agent-skills
Configure, review, or troubleshoot Rslib library builds, output formats, declarations, dependency handling, and integrations.
rspack-best-practices
rstackjs/agent-skills
Configure, review, or troubleshoot Rspack builds, including loaders, CSS, assets, type checking, bundle optimization, and profiling.
rspress-best-practices
rstackjs/agent-skills
Configure, review, or troubleshoot Rspress v2 sites, including content conventions, navigation, MDX, assets, search, and deployment.
rspack-v2-upgrade
rstackjs/agent-skills
Use when upgrading a Rspack 1.x project to v2, including dependency and configuration updates.
rspress-description-generator
rstackjs/agent-skills
Generate missing description frontmatter for Rspress Markdown/MDX pages, including new docs pages and site-wide SEO metadata updates.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.