testing-react

testing-react is a skill for Claude Code from TheBeardedBearSAS/claude-craft. It costs 34 tokens per session (685 once invoked), scanned A, original, MIT.

A testing strategy for React 19 and the React Compiler. It covers component, browser, end-to-end, mutation, and property-based tests, including workspaces for monorepos.

In plain words
What is it for?
Use it when writing React tests, reviewing coverage, testing components in real browsers, or setting up tests in a monorepo.
Why use it?
It keeps tests focused on what users can see and do while accounting for browser behaviour and projects split into multiple packages.

Skill for Claude Code

Written for Claude Code: context: fork in frontmatter.

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

Good fit Use it when writing React tests, reviewing coverage, testing components in real browsers, or setting up tests in a monorepo.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/thebeardedbearsas/claude-craft/testing-react
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 TheBeardedBearSAS/claude-craft --skill testing-react
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 hooks.

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 testing-react

README.md
[![agentmods](https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react/github.svg)](https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react)
Your own site
<a href="https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react"><img src="https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react/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 testing-react

Your own site · 80×15
<a href="https://agentmods.dev/skills/thebeardedbearsas/claude-craft/testing-react"><img src="https://agentmods.dev/badge/skills/thebeardedbearsas/claude-craft/testing-react.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 685 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 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 MCP Rug Pull · line 44
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00034 $0.00685
Opus 5.5 $0.00014 $0.00274
Sonnet 5.5 $0.00007 $0.00137
Haiku 4.5 $0.00003 $0.00068

Measured 7d ago against content hash 9de38a11397f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing-react 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 7d 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.

.claude/skills/testing-react/SKILL.md · 49 lines

How it starts

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

Stratégie de Tests React 19 + Compiler 1.0

Versions : React 19.2+ | React Compiler 1.0 | Vitest 5 | Playwright

React Compiler 1.0 (auto-memoization) est transparent pour les tests — tester le comportement visible, jamais les optimisations internes.

Stack recommandée 2026

Type Outil Usage
Unit/Composants Vitest 5 Browser Mode Chromium/Firefox/WebKit natif
Composants (navigateur) vitest-browser-react render + locators, intégré à Vitest Browser Mode
Component Testing Playwright CT Alternative à RTL — browser réel
Composants (JSDOM) React Testing Library 16 Toujours maintenu — pertinent pour les suites JSDOM existantes
E2E Playwright Flows utilisateur complets
Mutation Stryker Qualité des tests (score >= 80%)
Property-based fast-check Génération de cas de test

Privilégier un vrai navigateur (Vitest Browser Mode, Playwright CT) plutôt que JSDOM (lourd, incomplet). React Testing Library 16 reste maintenu : l'utiliser pour les suites JSDOM existantes, ne pas migrer sans bénéfice.

Sources : Vitest Browser Mode, vitest-browser-react, Playwright Component Testing, Stryker Mutator

Invariants non-négociables

  • Vitest Browser Mode (provider: playwright) pour les nouveaux tests composants — éviter JSDOM
  • Tester le comportement (ce que voit l'utilisateur), pas l'implémentation
  • Ne jamais tester les optimisations du React Compiler (memoization)
  • Mutation score >= 80% via Stryker avant merge
  • Vitest projects pour monorepos (unit / browser séparés) — workspace est déprécié
  • MSW pour mocker les appels API (pas de fetch mockée à la main)

Checklist par type

Type Vérification
Composant Vitest Browser Mode ou Playwright CT, interactions réelles
Hook Vitest, renderHook si nécessaire
RSC Test du rendu HTML retourné (pas de DOM)
E2E Playwright, flows complets avec expect().toHaveURL()
Mutation npx stryker run, seuil break >= 50, high >= 80

Read the full file on GitHub · 49 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago Changed · +2 lines · +2 tokens per session 9de38a11397f
  2. 1mo ago First seen · 47 lines · 32 tokens per session scan A 67ca5a057c7b

Subscribe to this mod's changes

testing-react is a skill published in the GitHub repository TheBeardedBearSAS/claude-craft (107 stars, last pushed 7d ago), licensed MIT. It adds 34 tokens to every session and 685 once invoked, about $0.0001 per session on Opus 5.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-09-03.

Related

Other skills, from other repositories

storybook-testing

Storybook 10 testing patterns with Vitest integration, ESM-only distribution, CSF3 typesafe factories, play() interaction tests, Chromatic TurboSnap visual regression, module automocking, accessibility addon testing, and autodocs generation. Use when writing component stories, setting up visual regression testing…

yonatangross/orchestkit · 77 tokens

agent-e2e-test-specialist

Specialist subagent: Playwright, Cypress, and visual regression testing specialist. Use only when the user explicitly asks for E2E tests, browser test automation, or visual regression testing. Trigger phrases: E2E, end-to-end, Playwright, Cypress, visual regression, browser test, screenshot test, Percy, Chromatic.

travisjneuman/.claude · 76 tokens

drive

Launch and operate the project's app, observe it and record evidence, without judging it. Actions: drive a feature, ready (what is reachable), capture one artifact, cleanup. Use when another skill, a scheduled run or a CI job needs the real app run and shown (/verification:confirm, /debugging:debug), or when asked to…

melodic-software/claude-code-plugins · 92 tokens

test-execution

Run unit and integration tests, generate coverage reports, and view results. Use to validate code changes before committing or merging.

Yoshikemolo/mcp-jira-devflow · 28 tokens

next-partial-prefetching-optimizer

Optimize what selected Next.js client navigations include before the click under Partial Prefetching. Use after Cache Components and Partial Prefetching are adopted when the user wants selected URL-specific UI to be instant, wants reusable content to wait for navigation, or needs to choose between default, viewport…

vercel/next.js · 82 tokens

uat-signoff

Walk a business/UAT approver through a plain-language demo of a verified feature and capture business acceptance signoff.

HoangNguyen0403/agent-skills-standard · 27 tokens