testing-react

testing-react is a skill for Claude Code, Codex from TheBeardedBearSAS/claude-craft. It costs 32 tokens per session (562 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 CodeCodex

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

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.

agentmods
npx agentmods add skills/thebeardedbearsas/claude-craft/testing-react
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, Codex.

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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 562 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00032 $0.00562
Opus 5 $0.00016 $0.00281
Sonnet 5 $0.00006 $0.00112
Haiku 4.5 $0.00003 $0.00056

Measured yesterday against content hash 67ca5a057c7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 47 lines

What it actually says

Stratégie de Tests React 19 + Compiler 1.0

Versions : React 19.2+ | React Compiler 1.0 | Vitest 4.1+ | 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 4.1+ Browser Mode Chromium/Firefox/WebKit natif
Component Testing Playwright CT Alternative à RTL — browser réel
E2E Playwright Flows utilisateur complets
Mutation Stryker Qualité des tests (score >= 80%)
Property-based fast-check Génération de cas de test

Abandonner : JSDOM (lourd, incomplet) et React Testing Library (remplacé par Playwright CT).

Sources : Vitest 4, Playwright Component Testing, Stryker Mutator

Invariants non-négociables

  • Vitest Browser Mode (provider: playwright) — pas de 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 workspaces pour monorepos (unit / browser séparés)
  • 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

Détails complets, exemples de code, configs et checklists : voir REFERENCE.md

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. yesterday 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 (105 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 562 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

generic-react-ux-designer

Professional UI/UX design expertise for React applications. Covers design thinking, user psychology (Hick's/Fitts's/Jakob's Law), visual hierarchy, interaction patterns, accessibility, performance-driven design, and design critique. Use when designing features, improving UX, solving user problems, or conducting design…

travisjneuman/.claude · 69 tokens

generic-react-feature-developer

Guide feature development for React applications with architecture focus. Covers Zustand/Redux patterns, IndexedDB usage, component systems, lazy loading strategies, and seamless integration. Use when adding new features, refactoring existing code, or planning major changes.

travisjneuman/.claude · 53 tokens

generic-react-design-system

Complete design system reference for React applications. Covers colors, typography, spacing, component patterns, glassmorphism effects, GPU-accelerated animations, and WCAG AA accessibility. Use when implementing UI, choosing colors, applying spacing, creating components, or ensuring brand consistency.

travisjneuman/.claude · 59 tokens

generic-react-code-reviewer

Review React/TypeScript code for bugs, security vulnerabilities, performance issues, accessibility gaps, and CLAUDE.md workflow compliance. Enforces TypeScript strict mode, GPU-accelerated animations, WCAG AA accessibility, bundle size limits, and surgical simplicity. Use when completing features, before commits, or…

travisjneuman/.claude · 71 tokens

playwright

Live E2E browser automation via Microsoft's @playwright/cli: named sessions, accessibility-ref snapshots, click/fill by ref, screenshots, console and network capture, network mocking, tracing, video, and auth state, with artifacts written to disk so only paths enter context (far fewer tokens than Playwright MCP). Use…

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

visual-validate

Validate UI changes in a real browser using Chrome DevTools or Playwright MCP. Takes screenshots, compares before/after, exercises interactions, captures console errors. Use when user asks to "visual validate", "/visual-validate", "check the UI", "screenshot before/after", or finishes a UI change. Don't use for unit…

helderberto/agent-skills · 96 tokens