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.
npx agentmods add skills/soulcodex/agentic/react-component-testingnpx skills add soulcodex/agentic --skill react-component-testinggit clone --depth 1 https://github.com/soulcodex/agenticWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00059 | $0.00654 |
| Opus 5 | $0.00030 | $0.00327 |
| Sonnet 5 | $0.00012 | $0.00131 |
| Haiku 4.5 | $0.00006 | $0.00065 |
Grade A, and why
react-component-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.
How it starts
The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
React Component Testing Skill
Step 1 — Classify What Needs to Be Tested
Assign each file to a test tier before writing tests:
- Hook / reducer / pure function -> unit test.
- Component behavior / interaction -> component test.
- Multi-page user flow -> end-to-end test.
Step 2 — Write Unit Tests
- Test hooks with
renderHookand explicit inputs. - Test reducers and utilities as pure functions.
- Mock network boundaries; do not mount full UI.
import { describe, expect, it } from 'vitest'
import { authReducer } from './auth.reducer'
it('sets user on login success', () => {
const state = authReducer({ user: null }, { type: 'login/success', payload: { id: '1' } })
expect(state.user?.id).toBe('1')
})
Step 3 — Write Component Tests
- Use React Testing Library queries by role/label/text.
- Use
userEventfor interactions, not low-level DOM event simulation unless necessary. - Wrap with providers used in production (router, query client, store) via a shared test render utility.
- Assert user-visible output and callback side effects.
- In TypeScript projects, keep TS/JS imports ESM-only and use aliases for cross-directory imports.
import { render, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
import { SaveButton } from './SaveButton'
it('calls onSave when clicked', async () => {
const onSave = vi.fn()
render(<SaveButton onSave={onSave} />)
await userEvent.click(screen.getByRole('button', { name: 'Save' }))
expect(onSave).toHaveBeenCalledTimes(1)
})
Step 4 — Write End-to-End Tests
- Use Playwright for full browser flows across routes.
- Cover one happy path and key failure path for each critical user journey.
- Keep E2E focused on integration risks, not exhaustive branch coverage.
Step 5 — Verify
- Each custom hook has unit tests for success and edge behavior
- Interactive components test primary user interactions
- No tests assert private state or implementation-only details
- Critical journeys have Playwright coverage (happy path + failure path)
-
pnpm testpasses with zero failures
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.
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.
- yesterday First seen · 84 lines · 59 tokens per session scan A c88edd5c454a
react-component-testing is a skill published in the GitHub repository soulcodex/agentic (10 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 654 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
flow
Use when you need to run Flow type checking, or when seeing Flow type errors in React code.
zoning-envelope
Generate interactive 3D zoning envelope viewers from zoning analysis reports. Use when the user asks to "visualize the zoning envelope" or see buildable massing in 3D, typically after /as:zoning-analysis-nyc. Requires a zoning analysis report as input.
authoring-components
Guide for creating new Elements components with all required files, base classes, metadata patterns, and test boilerplate. Use this skill whenever the user wants to create, scaffold, or set up a new component from scratch, needs to understand the required 10-file structure, asks about base classes and mixins…
seo
Optimize for search engine visibility and ranking. Use when asked to "improve SEO", "optimize for search", "fix meta tags", "add structured data", "sitemap optimization", or "search engine optimization".
astro-expert
Astro framework expertise — islands architecture, SSR/hybrid modes, React integration, performance, and production-ready frontend scaffolding.
react-component-design
When building or refactoring React UI components to ensure reusability and maintainability.