react-testing

react-testing is a skill for Claude Code from fusengine/agents. It costs 34 tokens per session (1,429 once invoked), scanned A, original, MIT.

A React testing guide built around Testing Library and Vitest. It shows how to test components and hooks through user actions, including newer React features, loading states, errors, and accessibility checks.

In plain words
What is it for?
Use it for React component tests, interaction tests, custom-hook tests, API mocking, loading and error states, or accessibility audits.
Why use it?
It helps catch broken interface behavior by testing what users see and do, rather than relying only on the component's internal code.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the fuse-react plugin — 8 skills, 1 agent shipped together

Good fit Use it for React component tests, interaction tests, custom-hook tests, API mocking, loading and error states, or accessibility audits.

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

Made for: Claude Code.

Or install fuse-react, the plugin that ships this one along with the rest of its 8 skills, 1 agent.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/fusengine/agents/react-testing"><img src="https://agentmods.dev/badge/skills/fusengine/agents/react-testing.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 1,429 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.00034 $0.01429
Opus 5.5 $0.00014 $0.00572
Sonnet 5.5 $0.00007 $0.00286
Haiku 4.5 $0.00003 $0.00143

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

Security

Grade A, and why

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

plugins/react-expert/skills/react-testing/SKILL.md · 176 lines

How it starts

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

Also covers testing React 19 features (useActionState, use()), custom hooks, Suspense boundaries, error boundaries, and accessibility audits with axe-core. Provides Vitest configuration and 9 ready-to-copy test templates. This is a testing-methodology skill layered on top of the React skills (react-19, react-state, react-forms) — it doesn't teach those APIs themselves, only how to test components that use them.

React Testing Library

Test React components the way users interact with them.

Agent Workflow (MANDATORY)

Before ANY implementation, spawn 3 agents in parallel, one Agent call each with a name:

  1. fuse-ai-pilot:explore-codebase - Analyze existing test patterns
  2. fuse-ai-pilot:research-expert - Verify latest Testing Library docs via Context7/Exa
  3. mcp__context7__query-docs - Check userEvent, waitFor patterns

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

When to Use

  • Testing React component behavior
  • Validating user interactions
  • Ensuring accessibility compliance
  • Mocking API calls with MSW
  • Testing custom hooks
  • Testing React 19 features (useActionState, use())

Why React Testing Library

Feature Benefit
User-centric Tests what users see
Accessible queries Encourages a11y markup
No implementation details Resilient to refactoring
Vitest integration 10-20x faster than Jest

Critical Rules

  1. Query by role first - getByRole is most accessible
  2. Use userEvent, not fireEvent - Realistic interactions
  3. waitFor for async - Never setTimeout
  4. MSW for API mocking - Don't mock fetch
  5. Test behavior, not implementation - No internal state testing

Read the full file on GitHub · 176 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. 22d ago Changed 31782612072c
  2. 1mo ago Changed 8ad91026b04d
  3. 1mo ago First seen · 176 lines · 34 tokens per session scan A a020354f3401

Subscribe to this mod's changes

react-testing is a skill published in the GitHub repository fusengine/agents (33 stars, last pushed 7d ago), licensed MIT. It adds 34 tokens to every session and 1,429 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

review-ugc-render

Mandatory pre-publish review gate for a UGC video render. Transcribes the finished render's AUDIO with Whisper and word-diffs it against the approved spoken script, then gates pinning the final render (videoprojectupsert patch.finalrenderid) — blocking a render whose generated audio mis-voices a word (e.g. the…

gooseworks-ai/goose-skills · 207 tokens

r-testthat

Best practices for writing R package tests with testthat version 3+. Use this skill when writing or organizing tests for an R package or when improving existing tests that use testthat. It covers test structure and expectations, self-sufficient test design, proper cleanup with withr, fixtures, mocking external…

posit-dev/skills · 77 tokens

r-package-development

R package development with devtools, testthat, and roxygen2. Use when the user is working on an R package, running tests, writing documentation, or building package infrastructure.

posit-dev/skills · 41 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 175 tokens

test-strategy-document

Create a production-ready Testing Strategy and QA Execution Plan. Covers testing levels (unit, integration, E2E, performance), mocking boundaries, test environment matrix, code coverage thresholds, and automated CI pipeline runsheets. Use when establishing a QA framework for a new system or feature set.

fattain-naime/engineering-docs · 62 tokens

test-selection

Use this skill when someone describes a specific code path, feature, or bug and asks what kind of test to write for it — or when an audit or strategy engagement surfaces a testing gap and needs a recommendation for where to start. Trigger on "what test should I write for this", "unit or integration test for X", "our…

EmanueleMinotto/minottobot · 108 tokens