
Rspack Tracing
When your Rspack build is crashing or crawling, this skill walks you through capturing and analyzing trace files to find the culprit. It shows you how to run builds with RSPACK_PROFILE flags, then either tail the trace for quick crash diagnosis or run the bundled analysis script for full performance profiling. The workflow helps you pinpoint slow plugins and loaders by mapping hook names back to your config. It's straightforward tooling for build performance work, with references for common bottlenecks. Most useful when you're staring at a slow build wondering which of your dozen plugins is the problem.
- skills.sh installs
- 286
- GitHub stars
- 98
- last updated
- Aug 21, 2026
Install
$ npx -y skills add rstackjs/agent-skills --skill rspack-tracing --agent claude-codeInstalls into .claude/skills of the current project.
Files
Rspack tracing & performance profiling
When to use this skill
Use this skill when you need to:
- Diagnose why an Rspack build is slow.
- Understand which plugins or loaders are taking the most time.
- Analyze a user-provided Rspack trace file.
- Guide a user to capture a performance profile.
Workflow
1. Capture a trace
First, ask the user to run their build with tracing enabled.
# Set environment variables for logging to a file
RSPACK_PROFILE=TRACE RSPACK_TRACE_LAYER=logger RSPACK_TRACE_OUTPUT=./trace.json pnpm build
This will generate a trace file in a timestamped directory like .rspack-profile-{timestamp}-{pid}/trace.json.
See references/tracing-guide.md for more details on configuration.
2. Quick diagnosis for Crashes/Errors
If the user wants to identify which stage a crash or error occurred in, use tail to quickly view the last events without running the full analysis:
# Navigate to the generated profile directory
cd .rspack-profile-*/
# View the last 20 events to see where the build failed
tail -n 20 trace.json
Sponsors
Details
- Repository
- github.com/rstackjs/agent-skills
- Categories
- DevOps & CI/CD, Documentation, AI & Agent Building, Debugging
- First seen
- Jun 3, 2026