react-testing

react-testing is an agent for Claude Code from bdfinst/agentic-dev-team. It costs 20 tokens per session (492 once invoked), scanned A, original, MIT.

A guide for testing React components with Testing Library, a tool that checks user-visible behaviour rather than private implementation details. It reviews queries, asynchronous updates, hooks, and common test anti-patterns.

In plain words
What is it for?
Use it to review React test files, including element queries, unnecessary act calls, async waits, shallow rendering, and implementation-detail assertions.
Why use it?
It helps tests verify what users can do instead of merely matching internal code structure, reducing tests that pass while the component is broken.

Agent for Claude Code

Written for Claude Code: effort in frontmatter.

Part of the dev-team plugin — 96 skills, 54 agents, 4 hooks shipped together

Good fit Use it to review React test files, including element queries, unnecessary act calls, async waits, shallow rendering, and implementation-detail assertions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bdfinst/agentic-dev-team/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.

Clone the repo
git clone --depth 1 https://github.com/bdfinst/agentic-dev-team

Made for: Claude Code.

Or install dev-team, the plugin that ships this one along with the rest of its 96 skills, 54 agents, 4 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 react-testing

README.md
[![agentmods](https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/react-testing.svg)](https://agentmods.dev/agents/bdfinst/agentic-dev-team/react-testing)
Your own site
<a href="https://agentmods.dev/agents/bdfinst/agentic-dev-team/react-testing"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/react-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 492 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.
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.00020 $0.00492
Opus 5 $0.00010 $0.00246
Sonnet 5 $0.00004 $0.00098
Haiku 4.5 $0.00002 $0.00049

Measured 2d ago against content hash 5ba512f6a1e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-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 2d 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/dev-team/templates/agents/react-testing.md · 62 lines

What it actually says

React Testing

Output JSON:

{"status": "pass|warn|fail|skip", "issues": [{"severity": "error|warning|suggestion", "confidence": "high|medium|none", "file": "", "line": 0, "message": "", "suggestedFix": ""}], "summary": ""}

Status: pass=good test practices, warn=anti-patterns detected, fail=tests give false confidence Severity: error=test doesn't verify behavior, warning=anti-pattern, suggestion=improvement opportunity Confidence: high=mechanical (remove unnecessary act(), use getByRole); medium=test design judgment; none=requires domain context

Context needs: full-file File scope: *.test.ts, *.test.tsx, *.spec.ts, *.spec.tsx

Activates when

react or react-dom in package.json dependencies.

Skip

Return skip when no test files for React components in the changeset.

Detect

Testing Library best practices:

  • Using getByTestId when getByRole, getByLabelText, or getByText would work
  • Wrapping non-async operations in act() unnecessarily
  • Using container.querySelector instead of Testing Library queries
  • Missing waitFor for async state updates

Anti-patterns:

  • Testing implementation details (internal state, method calls)
  • Shallow rendering (enzyme.shallow) — test behavior, not component tree
  • Snapshot tests as the only assertion (fragile, low signal)
  • Mocking too many internals — test the component as a user would use it

Hook testing:

  • Testing hooks through implementation rather than through a component
  • Missing renderHook for custom hooks that don't render UI
  • Not wrapping state updates in act() when testing hooks directly

Assertions:

  • Missing assertions (test runs but doesn't verify anything)
  • Asserting on implementation artifacts instead of user-visible behavior
  • toMatchSnapshot without more specific assertions alongside it

Ignore

Unit tests for non-React code, E2E tests, API tests (handled by other agents).

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. 2d ago First seen · 62 lines · 20 tokens per session scan A 5ba512f6a1e9

Subscribe to this mod's changes

react-testing is an agent published in the GitHub repository bdfinst/agentic-dev-team (280 stars, last pushed 2d ago), licensed MIT. It adds 20 tokens to every session and 492 once invoked, about $0.0001 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-05.

Related

Other agents, from other repositories

react18-test-guardian

Test suite fixer and verifier for React 16/17 → 18.3.1 migration. Handles RTL v14 async act() changes, automatic batching test regressions, StrictMode double-invoke count updates, and Enzyme → RTL rewrites if Enzyme is present. Loops until zero test failures. Invoked as subagent by react18-commander.

github/awesome-copilot · 81 tokens

staff-frontend

Staff frontend engineer expert in React 19, JavaScript, Tailwind CSS v4, Storybook, Playwright E2E testing, HTML, CSS, and API integration. Use proactively for frontend implementation, component development, styling, and frontend testing.

ATTCKDigital/smith · 55 tokens

playwright-test-generator

Generate Playwright e2e tests for the admin frontend panel.

RaNDoM6913/claude-code-superkit · 17 tokens

tailwind-frontend-expert

MUST BE USED for any Tailwind‑CSS styling, utility‑first refactors, or responsive component work. Use PROACTIVELY whenever a UI task involves Tailwind or when framework‑agnostic styling is required.

nodnarbnitram/claude-code-extensions · 52 tokens

react19-test-guardian

Test suite fixer and verification specialist. Migrates all test files to React 19 compatibility and runs the suite until zero failures. Uses memory to track per-file fix progress and failure history. Does not stop until npm test reports 0 failures. Invoked as a subagent by react19-commander.

jiamaozheng/awesome-claude-code · 67 tokens

react-specialist

Senior React engineer mastering concurrent features, server components, and production-grade front-end systems. Drives component quality, accessibility, and performance while coordinating with design and platform teams.

NickCrew/Claude-Cortex · 38 tokens