agentleFS
rstackjsrstackjs/agent-skills/skills/rstest-debugging/SKILL.md

rstest-debugging

Skill95 starsChanged 4 months agoMITView on GitHub

Diagnose Rstest startup, build, runtime, logging, memory, or performance problems using traces and comparable measurements.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run rstest --trace when supported and classify the cost as host build/startup, runtime load/setup/collect, test bodies/hooks, or …

    line 13
  2. Very specific:

    Use DEBUG=rstest for resolved config and build output.

    line 14
  3. Very specific:

    If dependency loading or compilation is implicated, read references/dependency-bundling.md.

    line 15
  4. Very specific:

    If a fully mocked heavy module still reaches the build graph, read references/mocked-module-build-graph.md before testing an exact external.

    line 16
  5. Very specific:

    If assets, console output, pools, isolation, or memory dominate, read references/runtime-output-memory.md.

    line 17
  6. Distinctive:

    Use the project's installed Rstest for final claims.

    line 22
  7. Distinctive:

    Keep Node version, test files, coverage, cache state, environment, workers, and command shape fixed while comparing.

    line 23
  8. Very specific:

    Do not add worker durations that overlap or subtract runner/build/tests values without verifying their lifecycle boundaries.

    line 24
  9. Distinctive:

    Do not treat aggregate process-tree RSS as physical memory.

    line 25
  10. Distinctive:

    Do not disable isolation, reduce coverage, silence failures, or change production/test semantics for a benchmark win.

    line 26
  11. Distinctive:

    Do not stack speculative aliases, externals, compiler hooks, pool settings, or caches.

    line 27
  12. Very specific:

    When invoked from migrate-to-rstest, first confirm that the Jest/Vitest and Rstest manifests match.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.