rstackjs avatar

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-code

Installs into .claude/skills of the current project.

Files

Rspack tracing & performance profiling

When to use this skill

Use this skill when you need to:

  1. Diagnose why an Rspack build is slow.
  2. Understand which plugins or loaders are taking the most time.
  3. Analyze a user-provided Rspack trace file.
  4. 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

More from rstackjs/agent-skills

All 12
1shareai-lab avataragent-buildershareai-lab/learn-claude-codeDesign and build AI agents for any domain. Use when users: (1) ask to "create an agent", "build an assistant", or "design an AI system" (2) want to understand a286skills.sh installs
2wix avatarwix-cli-orchestratorwix/skillsBLOCKING REQUIREMENT - When user requests to add/build/create/implement ANY feature or component for a Wix CLI app, you MUST invoke this skill IMMEDIATELY as yo286skills.sh installs
3postplusai avatarpersona-packpostplusai/postplus-skillsBuild fact-grounded short-form video personas and visual consistency packs from validated benchmark research. Use this when you need to define a repeatable crea285skills.sh installs
4davila7 avatarrailway-newdavila7/claude-code-templatesCreate Railway projects, services, and databases with proper configuration. Use when user says "setup", "deploy to railway", "initialize", "create project", "cr284skills.sh installs
5jamesrochabrun avatarreading-teacherjamesrochabrun/skillsInteractive reading teacher that instantly generates playful, engaging learning experiences for children ages 1-10. Creates visual playgrounds, phonics games, a284skills.sh installs
6patricio0312rev avatarbackground-jobs-designerpatricio0312rev/skillsDesigns background job processing systems with queue integration (BullMQ/Celery), job definitions, retry policies, exponential backoff, idempotent execution, an281skills.sh installs