react-testing

react-testing is a skill for Claude Code, Codex from fusengine/agents. It costs 34 tokens per session (1,421 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 CodeCodex

Part of the fuse-react plugin — 8 skills, 1 agent 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/fusengine/agents/react-testing
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, Codex.

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.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.svg" alt="Measured on agentmods" 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,421 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.00034 $0.01421
Opus 5 $0.00017 $0.00711
Sonnet 5 $0.00007 $0.00284
Haiku 4.5 $0.00003 $0.00142

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

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, use TeamCreate to spawn 3 agents:

  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. yesterday 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 (25 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 1,421 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

test-gen

Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns.

SethGammon/Citadel · 24 tokens

check-and-test

Run lint checks (ruff for Python, Biome for TS/JS), type checks (pyright for Python, tsc for TS/JS), and the standard pytest tiers (unit + e2e + tests skipped during pre-commit). Investigates failures to determine if they are application bugs or test issues, and fixes application bugs rather than weakening tests. Does…

ReflexioAI/claude-smart · 97 tokens

check-coverage

Comprehensive assessment of Unit / Integration / E2E three-layer test coverage, identify gaps and provide actionable recommendations.

sd0xdev/sd0x-harness · 27 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 · 353 tokens

fix-bug

Diagnoses and fixes bugs using a test-first workflow (reproduce, diagnose, fix). Use this skill whenever the user reports a bug, describes unexpected behavior, or asks to investigate or fix a defect. Even if the user says "something's broken", "this isn't working", "fix this bug", or "why does X happen", load this…

nowsprinting/unity-coding-skills · 86 tokens

testing-strategy

Test pyramid, coverage targets, and test patterns (unit/integration/E2E). TRIGGER when: planning tests, writing test code, or reviewing coverage. SKIP: quality-gate scoring of plans (use quality-validation); security testing (use security-review-checklists). (Examples use common runners such as pytest and vitest.).

komluk/scaffolding · 71 tokens