migrate-to-rstest

migrate-to-rstest is a skill for Claude Code from rstackjs/agent-skills. It costs 124 tokens per session (1,053 once invoked), scanned A, original, MIT.

A guide for moving tests from Jest, Vitest, or Playwright Test to Rstest. Rstest is a JavaScript and TypeScript test runner used to run automated checks.

In plain words
What is it for?
It helps detect the existing test framework, record the current test results, migrate configuration and setup, and update tests with the smallest necessary changes.
Why use it?
It helps preserve test discovery and behavior while updating scripts, configuration, setup files, mocks, snapshots, coverage, and dependencies.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the rstack plugin — 29 skills shipped together

Good fit It helps detect the existing test framework, record the current test results, migrate configuration and setup, and update tests with the smallest necessary changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rstackjs/agent-skills/migrate-to-rstest
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rstackjs/agent-skills --skill migrate-to-rstest
Clone the repo
git clone --depth 1 https://github.com/rstackjs/agent-skills

Made for: Claude Code.

Or install rstack, the plugin that ships this one along with the rest of its 29 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for migrate-to-rstest

README.md
[![agentmods](https://agentmods.dev/badge/skills/rstackjs/agent-skills/migrate-to-rstest.svg)](https://agentmods.dev/skills/rstackjs/agent-skills/migrate-to-rstest)
Your own site
<a href="https://agentmods.dev/skills/rstackjs/agent-skills/migrate-to-rstest"><img src="https://agentmods.dev/badge/skills/rstackjs/agent-skills/migrate-to-rstest.svg" alt="Measured on agentmods" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 20 May 2026
  • Snyk warn 20 May 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00124 $0.01053
Opus 5 $0.00062 $0.00526
Sonnet 5 $0.00025 $0.00211
Haiku 4.5 $0.00012 $0.00105

Measured 4d ago against content hash d23666c2fb04, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

migrate-to-rstest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/migrate-to-rstest/SKILL.md · 44 lines

How it starts

The opening of the file, as written. The whole thing — 44 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Migrate to Rstest

Goal

Migrate the smallest runnable Jest, Vitest, or Playwright Test scope with minimal behavior change. Use documentation and types that match the installed Rstest version; use latest online docs only after the capability gate confirms they apply.

Workflow

  1. Detect the runner, environment, Rstack integration, and smallest runnable scope with references/detect-test-framework.md.
  2. Run references/dependency-install-gate.md before choosing Rstest, coverage, adapter, or plugin APIs.
  3. Before editing, record the exact command, Node and runner versions, environment, files/tests/skips/snapshots, and failures. Capture the pre-migration test manifest and follow references/discovery-parity.md throughout the migration.
  4. For Jest read references/jest-migration-deltas.md; for Vitest read references/vitest-migration-deltas.md; for global APIs also read references/global-api-migration.md; for a detected Playwright Test runner read references/playwright-migration-deltas.md. Do not load the Playwright path for a browser-only request whose runner is not Playwright Test. Migrate scripts, config, and setup before editing test bodies; prefer adapter or Rsbuild/Rspack fixes over broad test rewrites.
  5. If config loading emits [MODULE_TYPELESS_PACKAGE_JSON], use references/config-module-type.md. Do not suppress the warning or change the whole package module type without an audit.
  6. Get the migrated scope semantically green. Fix failures in this order: dependency skew, config/resolver, discovery, setup/environment/coverage, mocks/timers/snapshots, then test bodies.
  7. Compare the post-migration manifest and execution counts with the baseline. Classify every added, removed, skipped, or excluded test explicitly; do not call a run equivalent merely because it is green. For Jest snapshot migrations, also complete the snapshot cleanup and unchecked validation in references/jest-migration-deltas.md.
  8. Remove temporary aliases, diagnostic hooks, and copied legacy workarounds that are no longer required. Keep only configuration proven necessary by behavior or measurement.
  9. If wall time, build, test runtime, logs, or memory materially regress, load and follow the rstest-debugging skill when available. Otherwise use the migration fallback in references/performance-diagnosis.md, then read references/dependency-bundling-performance.md and/or references/mocked-module-build-graph.md according to the measured bottleneck. Change one variable at a time.
  10. After correctness and performance validation, remove only legacy files and dependencies owned by the migrated scope. Summarize behavior parity, discovery differences, unsupported fields, retained compatibility config, performance tradeoffs, and TODOs.

Read the full file on GitHub · 44 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed d23666c2fb04
  2. 8d ago First seen · 44 lines · 124 tokens per session scan A 9559bb003473

Subscribe to this mod's changes

migrate-to-rstest is a skill published in the GitHub repository rstackjs/agent-skills (93 stars, last pushed 3d ago), licensed MIT. It adds 124 tokens to every session and 1,053 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

research-engineer

An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.

davila7/claude-code-templates · 43 tokens

tika-eval-compare

Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".

apache/tika · 50 tokens

neuron-evaluation-engineer

Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…

neuron-core/neuron-ai · 77 tokens

jetson-validate-image

Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.

NVIDIA/skills · 50 tokens

atmos-validation

Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.

cloudposse/atmos · 31 tokens

skill-benchmark

Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.

HoangNguyen0403/agent-skills-standard · 16 tokens