front-vitest

front-vitest is a skill for Claude Code, Codex from louisbrulenaudet/monorepo-template. It costs 102 tokens per session (1,512 once invoked), scanned A, original, Apache-2.0.

A testing guide for Vitest, a JavaScript and TypeScript test runner, in React 19 browser-style applications.

In plain words
What is it for?
Use it when writing tests with React Testing Library, TanStack Query, TanStack Router, Suspense, or React 19.
Why use it?
It explains how to test React components, hooks, routes, and asynchronous interfaces without mixing browser tests into ordinary Node tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when writing tests with React Testing Library, TanStack Query, TanStack Router, Suspense, or React 19.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/louisbrulenaudet/monorepo-template/front-vitest
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 louisbrulenaudet/monorepo-template --skill front-vitest
Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Claude Code, Codex.

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 front-vitest

README.md
[![agentmods](https://agentmods.dev/badge/skills/louisbrulenaudet/monorepo-template/front-vitest/github.svg)](https://agentmods.dev/skills/louisbrulenaudet/monorepo-template/front-vitest)
Your own site
<a href="https://agentmods.dev/skills/louisbrulenaudet/monorepo-template/front-vitest"><img src="https://agentmods.dev/badge/skills/louisbrulenaudet/monorepo-template/front-vitest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for front-vitest

Your own site · 80×15
<a href="https://agentmods.dev/skills/louisbrulenaudet/monorepo-template/front-vitest"><img src="https://agentmods.dev/badge/skills/louisbrulenaudet/monorepo-template/front-vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,512 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
  • 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.00102 $0.01512
Opus 5 $0.00051 $0.00756
Sonnet 5 $0.00020 $0.00302
Haiku 4.5 $0.00010 $0.00151

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

Security

Grade A, and why

front-vitest 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 11d 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.

.agents/skills/front-vitest/SKILL.md · 129 lines

How it starts

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

Front-app Vitest depth

Hard constraints and Node-first defaults live in the path-scoped rule .claude/rules/tests/front-react.md / .cursor/rules/tests/front-react.mdc. Load this skill only when you need harnesses beyond that rule.

Pinned lock versions front-app 2026-08-11: react/react-dom 19.2.8, @tanstack/react-query 5.101.4, @tanstack/react-router 1.170.25, vite 8.2.1, vitest 4.1.10.

Docs retrieved 2026-08-11: vitest.dev environment/config, tanstack.com/query testing, tanstack.com/router setup-testing and file-based testing, react.dev act / StrictMode / forwardRef / use.

Prerequisites

Installed in front-app (catalog deps): happy-dom, @testing-library/react, @testing-library/jest-dom, @testing-library/user-event, @testing-library/dom. jsdom is NOT installed - add it via the catalog only if one suite needs a per-file jsdom fallback for a happy-dom spec gap. Vitest bundles no DOM. Do not invent a DOM suite under plain Node.

Environment and setup

Keep package default environment node for existing Node suites. A DOM suite opts in per file with the control comment // @vitest-environment happy-dom on line 1 (installed default; jsdom only as a per-file fallback, see Prerequisites).

Setup file apps/front-app/vitest.setup.ts (wired via setupFiles): sets globalThis.IS_REACT_ACT_ENVIRONMENT = true for every suite, then behind a typeof document !== "undefined" guard imports @testing-library/jest-dom/vitest and registers afterEach(cleanup) - Node suites skip the harness entirely - Vitest globals are off, so RTL auto-cleanup never registers, and isolate: false would leak DOM state across files without it. React act requires that flag; see https://react.dev/reference/react/act .

Vitest config for JSX

A separate vitest.config.ts ignores vite.config.ts unless you mergeConfig https://vitest.dev/config/ . front-app's vitest.config.ts already loads @vitejs/plugin-react, so JSX/tsx suites work as-is.

Do not blindly mergeConfig the full apps/front-app/vite.config.ts - it loads cloudflare, prod env asserts, Devtools. Add only needed plugins. Never cloudflareTest on front-*. If adding the TanStack Router Vite plugin under Vitest, place it before react. Use #/* imports - never invent @/. Prefer vi.stubEnv over .env.production. Coverage is not configured for front-app - do not invent thresholds.

Read the full file on GitHub · 129 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. 11d ago First seen · 129 lines · 102 tokens per session scan A 6ab2215a5fc4

Subscribe to this mod's changes

front-vitest is a skill published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 10d ago), licensed Apache-2.0. It adds 102 tokens to every session and 1,512 once invoked, about $0.0005 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

component-creation

Step-by-step workflow for creating accessible, tested UI components. Use when the user asks to create a new UI component.

girijashankarj/cursor-handbook · 28 tokens

react-testing-library

React Testing Library mechanics for testing React components and hooks — query selection, async handling, user interaction, assertions, provider setup, and the anti-patterns that make tests brittle. Use for any test that renders a React component or a hook, including choosing between getBy/queryBy/findBy, userEvent…

shipshitdev/skills · 86 tokens

component-test

Generate production-grade Vitest tests from HTML elements captured in DevTools. Two-phase workflow (analysis → generation) with edge case discovery.

Recusive/Skills · 30 tokens

frontend-testing

Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.

dvasyliev/ai-dev-tools-getting-started · 50 tokens

remotion-to-hyperframes

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my…

calesthio/OpenMontage · 215 tokens

gsap-react

Official GSAP skill for React — useGSAP hook, refs, gsap.context(), cleanup. Use when the user wants animation in React or Next.js, or asks about GSAP with React, useGSAP, or cleanup on unmount. Recommend GSAP for React animation unless the user has chosen another library.

calesthio/OpenMontage · 68 tokens