rstest-best-practices

rstest-best-practices is a skill for Claude Code from rstackjs/agent-skills. It costs 79 tokens per session (1,163 once invoked), scanned A, original, MIT.

A set of instructions for setting up, writing, and reviewing Rstest tests. Rstest is a JavaScript and TypeScript testing tool with support for features such as mocks, snapshots, browser-like DOM tests, and coverage reports.

In plain words
What is it for?
Use it to create or review Rstest projects, write tests and mocks, configure test environments, measure coverage, and connect tests to continuous integration (CI).
Why use it?
It helps configure tests to match the project's package setup, verify that tests are found, and check both focused and complete test runs.

Skill for Claude Code

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

Part of the rstack plugin — 29 skills shipped together

not rated 93repo +1 3d ago A scan Socket: passSnyk: passSkillSpector: warn 79 tokens original MIT

Good fit Use it to create or review Rstest projects, write tests and mocks, configure test environments, measure coverage, and connect tests to continuous integration (CI).

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rstackjs/agent-skills/rstest-best-practices
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 rstest-best-practices
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 rstest-best-practices

README.md
[![agentmods](https://agentmods.dev/badge/skills/rstackjs/agent-skills/rstest-best-practices.svg)](https://agentmods.dev/skills/rstackjs/agent-skills/rstest-best-practices)
Your own site
<a href="https://agentmods.dev/skills/rstackjs/agent-skills/rstest-best-practices"><img src="https://agentmods.dev/badge/skills/rstackjs/agent-skills/rstest-best-practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,163 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 30 Apr 2026
  • Snyk pass 30 Apr 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 46
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00079 $0.01163
Opus 5 $0.00039 $0.00581
Sonnet 5 $0.00016 $0.00233
Haiku 4.5 $0.00008 $0.00116

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

Security

Grade A, and why

rstest-best-practices 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 8d 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/rstest-best-practices/SKILL.md · 66 lines

How it starts

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

Rstest Best Practices

Apply these rules when setting up, writing, or reviewing Rstest projects.

Workflow

  • Inspect the existing package manager, dependency policy, module mode, build configuration, test layout, and framework conventions before editing.
  • Add @rstest/core, a package-local test script, and a config file whose extension matches the package's module mode.
  • Reuse existing build configuration only when doing so lowers maintenance cost and remains compatible. An adapter is optional; use an independent Rstest config when adapter integration is incompatible or disproportionately costly, and explicitly reproduce required aliases, plugins, defines, environments, and externals.
  • Configure test discovery, environment, and setup files intentionally. Do not enable passWithNoTests unless an empty test set is an expected and documented state.
  • Verify test discovery with rstest list, then run focused tests, the full suite, and the project's existing build or type-check command.

Configuration and environments

  • Use defineConfig from @rstest/core and a config file extension compatible with the package's module mode.
  • Prefer explicit imports from @rstest/core over globals: true.
  • Use setupFiles for shared matchers and cleanup; use plugins, resolve, or source for ordinary build integration and low-level tools only when necessary.
  • Set include explicitly when the package's test layout is non-standard; do not assume the default discovery pattern.
  • Use node for server/SSR tests, happy-dom or jsdom for simulated DOM tests, and Browser Mode for real-browser behavior; install the selected environment package explicitly.
  • For React or Vue component tests, register the matching build plugin, use the corresponding Testing Library, and centralize matcher extension and cleanup in a setup file.
  • Use multiple test projects only when environments or configurations genuinely differ; keep global options such as reporters, coverage, pool, isolation, and bail at the root.

Read the full file on GitHub · 66 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. 8d ago First seen · 66 lines · 79 tokens per session scan A 022d8cb0370e

Subscribe to this mod's changes

rstest-best-practices is a skill published in the GitHub repository rstackjs/agent-skills (93 stars, last pushed 3d ago), licensed MIT. It adds 79 tokens to every session and 1,163 once invoked, about $0.0004 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