Skip to content
rstackjs avatar

Rspack Tracing

Diagnostic toolkit for Rspack build traces that locates crashes, slow phases, and costly plugins or loaders.

CCM score
54 of 100
skills.sh installs
303
GitHub stars
101
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers capturing Rspack trace files with RSPACK_PROFILE=TRACE, inspecting the last events after a failure, and running a full performance analysis
  • Includes scripts/analyze_trace.mjs for ranking slow hooks, plus reference guides for tracing configuration and bottleneck span mapping
  • Maps the slowest hook from the analysis to the plugin tapping it, then reports the plugin's source paths, lines, and columns
  • Designed for developers whose Rspack builds fail or run slowly and who need to pinpoint the responsible stage or plugin

Install

$ npx -y skills add rstackjs/agent-skills --skill rspack-tracing -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/rstackjs/agent-skills
Categories
Debugging, Frontend & UI Code
First seen
Jun 3, 2026

Questions

What does the rspack-tracing skill do?

The rspack-tracing skill captures or analyzes Rspack build traces to locate slow compiler phases, plugins, loaders, or the last events before a build failure. It can run a bundled analysis script on a generated trace file and map the slowest hooks back to plugin source code.

How do I install the rspack-tracing skill?

Run npx -y skills add rstackjs/agent-skills --skill rspack-tracing -y in your project. Once installed, the agent can guide you through capturing a trace and analyzing it.

When should I use rspack-tracing to debug a build?

Use it when your Rspack build is slow or fails and you want to know which stage, plugin or loader is responsible. It works both for crash diagnosis, by viewing the last trace events, and for full performance profiling.

Where does rspack-tracing stand in the Debugging category?

rspack-tracing is in the Debugging category on Claude Marketplaces, alongside diagnosing-bugs, azure-messaging, safe-debug, systematic-debugging and sentry-cli. It focuses specifically on Rspack build traces rather than general debugging.

More from rstackjs/agent-skills

All 12

Similar to Rspack Tracing

More Debugging