Skip to main content
skill CX Codex

rstest-debugging — Claude Code skill: what it does, install

rstest-debugging diagnoses Rstest startup, build, runtime, logging, memory, and performance issues with traces and comparable measurements.

MIT 133 installs ★ 100 updated 2026-10-22

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add rstackjs/agent-skills --skill rstest-debugging -a claude-code
Open on GitHub

What rstest-debugging does

The skill starts with matching baselines for one test file and the full scope. It then uses rstest --trace to sort the cost into host build and startup, runtime loading and collection, test bodies and hooks, or CLI, reporting, and teardown work.

DEBUG=rstest exposes resolved configuration and build output. Rsdoctor, verbose reports, and profilers come later, after the suspected area is narrower. The included references cover dependency bundling, mocked-module build graphs, runtime output, pools, isolation, and memory. The workflow compares bundleDependencies: false with bundleDependencies: true rather than assuming either choice wins everywhere.

One variable stays changed at a time, and a result must survive repeated measurement while behavior, discovery, snapshots, and coverage remain valid. Final claims should use the Rstest version installed in the project; local checkout or unreleased diagnostic results need separate labeling.

What it helps with

  • locate the Rstest lifecycle stage causing a slowdown
  • measure one-file and full-scope test runs
  • compare dependency loading with different bundleDependencies values
  • trace why a mocked module still enters the build graph
  • separate memory, output, pool, and isolation costs

Example prompts for the agent

  • Investigate a slow Rstest run: compare one file with the full scope, then use rstest --trace.
  • Test whether bundleDependencies affects dependency loading, changing one variable per run.
  • Find the source of high test memory use and inspect output, pools, and isolation without changing coverage.

How to install rstest-debugging

1Skills CLI (Vercel)

npx skills add rstackjs/agent-skills --skill rstest-debugging -a claude-code

2Manually: put the files in place

~/.claude/skills/rstest-debugging/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rstest-debugging/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about rstest-debugging

How do I install rstest-debugging in Claude Code?

Run npx skills add rstackjs/agent-skills --skill rstest-debugging -a claude-code, then check ~/.claude/skills/rstest-debugging/SKILL.md.

What does rstest-debugging do?

It guides diagnosis of Rstest startup, build, runtime, logging, memory, and performance problems. The process uses traces, comparable baselines, and one controlled change at a time.

Which Rstest versions are covered for per-test bundle coverage?

The experimental per-test bundle coverage workflow applies to Rstest 0.11.7 and later. Final claims should use the version installed in the project.

Source text

SKILL.md · MIT
---
name: rstest-debugging
description: Diagnose Rstest startup, build, runtime, logging, memory, or performance problems using traces and comparable measurements.
---

# Rstest debugging

Diagnose the measured lifecycle stage before changing configuration. Keep behavior and the test manifest fixed, change one variable at a time, and remove experiments that do not produce a repeatable benefit.

## Workflow

1. Establish comparable single-file and full-scope baselines with `references/performance-measurement.md`.
2. Run `rstest --trace` when supported and classify the cost as host build/startup, runtime load/setup/collect, test bodies/hooks, or CLI/report/teardown overhead.
3. Use `DEBUG=rstest` for resolved config and build output. For Rstest 0.11.7+ experimental per-test bundle coverage, follow `references/performance-measurement.md`. Use Rsdoctor only after evidence points to the compiler. Use verbose reporting or a profiler only after narrowing to runtime files/cases.
4. If dependency loading or compilation is implicated, read `references/dependency-bundling.md`. Compare the environment default, `bundleDependencies: false`, and `bundleDependencies: true`; neither bundling nor externalization is universally faster.
5. If a fully mocked heavy module still reaches the build graph, read `references/mocked-module-build-graph.md` before testing an exact external.
6. If assets, console output, pools, isolation, or memory dominate, read `references/runtime-output-memory.md`.
7. Rerun the representative file and full scope. Keep a change only when behavior, discovery, snapshots, and coverage remain valid and the benefit survives repeated measurement. Remove traces, profiles, and `.rstest` debug artifacts created by the diagnosis before handing off.

## Guardrails

- Use the project's installed Rstest for final claims. Label local checkout or unreleased diagnostic results separately.
- Keep Node version, test files, coverage, cache state, environment, workers, and command shape fixed while comparing.
- Do not add worker durations that overlap or subtract runner/build/tests values without verifying their lifecycle boundaries.
- Do not treat aggregate process-tree RSS as physical memory; it can double-count shared pages.
- Do not disable isolation, reduce coverage, silence failures, or change production/test semantics for a benchmark win.
- Do not stack speculative aliases, externals, compiler hooks, pool settings, or caches. Preserve only the measured minimum.

## Handoff from migration

When invoked from `migrate-to-rstest`, first confirm that the Jest/Vitest and Rstest manifests match. If the migration intentionally adds tests, report same-scope performance separately from final expanded-scope performance.

© rstackjs · MIT · rstackjs/agent-skills

Similar skills

All skills for Testing and QA →

From the same set21

The whole set →
migrate-to-rsbuild migrate-to-rsbuild — a skill that migrates webpack, Vite, Create React App, and Vue CLI projects to Rsbuild. It rewrites build configs and validates dev servers before cleaning up old packages. CX Codex +1 342installs rspack-tracing rspack-tracing — a skill for Claude Code and other IDEs that captures and analyzes Rspack build traces to pinpoint slow compiler phases, plugins, and loaders. Diagnose performance bottlenecks and crashes during development. CX Codex +1 291installs rspack-debugging rspack-debugging captures the crash state of native Rspack with LLDB: backtraces for segfaults, deadlocks and builds that hang. Useful when the failure sits inside Rust. CX Codex +1 282installs storybook-rsbuild The storybook-rsbuild skill sets up Storybook with Rsbuild or migrates an existing project from webpack or Vite. It also handles integrations with Rslib, Modern.js, and Rspack. CX Codex +1 212installs migrate-to-rslib migrate-to-rslib converts TypeScript library builds from tsc or tsup to Rslib with validation before cleanup. CX Codex +1 201installs rspack-split-chunks rspack-split-chunks teaches the agent to diagnose and tune optimization.splitChunks in Rspack: find duplicate modules, over-fetching, cache group issues, and oversized chunks. CX Codex +1 187installs rspress-v2-upgrade The rspress-v2-upgrade skill automates upgrading an Rspress project from v1 to v2. It reads the config, updates dependencies, rewrites import paths, and validates the build against the official migration guide. CX Codex +1 150installs rslib-modern-package The rslib-modern-package skill guides agents through building or reviewing JS/TS libraries with Rslib, from package exports to release readiness. Use it for a new library or a package refresh. CX Codex +1 125installs

Project sponsors

Companies that keep this analytics open