frontend-testing

frontend-testing is a skill for Claude Code, Codex from ApexIQ/skillsmith. It costs 27 tokens per session (595 once invoked), scanned A, original, MIT.

A set of practices for testing user-facing parts of React, Vue, and Angular applications. It uses tools that render components, simulate user actions, and check visible behavior.

In plain words
What is it for?
Use it when testing components, forms, buttons, and other frontend interactions. It covers test runners, Testing Library queries, simulated input, and mocked network requests.
Why use it?
It helps catch broken interface behavior without tying tests too closely to the code's internal structure. It also encourages accessible markup and avoids calls to real external services during tests.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when testing components, forms, buttons, and other frontend interactions. It covers test runners, Testing Library queries, simulated input, and mocked network requests.

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

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_testing_best_practices.svg)](https://agentmods.dev/skills/apexiq/skillsmith/frontend_testing_best_practices)
Your own site
<a href="https://agentmods.dev/skills/apexiq/skillsmith/frontend_testing_best_practices"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_testing_best_practices.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 595 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.00027 $0.00595
Opus 5 $0.00014 $0.00298
Sonnet 5 $0.00005 $0.00119
Haiku 4.5 $0.00003 $0.00060

Measured 8d ago against content hash c04d61b1be47, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

frontend-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 8d 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.

.agent/skills/frontend_testing_best_practices/SKILL.md · 72 lines

How it starts

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

⚛️ Frontend Testing Best Practices

Philosophy: Test how the user uses your app, not how the code is written.

1. The Stack

  • Runner: Vitest, Jest, or framework-specific runner.
  • DOM Simulation: Testing Library (React/Vue/Angular).
  • User Simulation: @testing-library/user-event.

2. Core Principles

  • Prioritize Behavior:
    • screen.getByRole('button', { version: 0.1.0 name: /submit/i }) (What user sees)
    • container.querySelector('.btn-primary') (Implementation detail)
  • Accessibility First: Use getByRole queries. Forces accessible HTML.
  • Mock External Dependencies: Don't hit real APIs.
    • Use MSW (Mock Service Worker) for network mocking.
    • Mock complex libraries if just testing component logic.

3. Structure of a Test

import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import MyComponent from './MyComponent';

test('submitting the form shows success message', async () => {
  const user = userEvent.setup();
  render(<MyComponent />);

  // 1. Arrange (Find elements)
  const input = screen.getByLabelText(/email/i);
  const button = screen.getByRole('button', { version: 0.1.0
name: /submit/i });

  // 2. Act (User interaction)
  await user.type(input, '[email protected]');
  await user.click(button);

  // 3. Assert (Expected outcome)
  expect(await screen.findByText(/success/i)).toBeInTheDocument();
});

4. Testing Advanced UI Patterns

  • Optimistic UI: Verify UI updates before API resolves.
  • Animations: Mock animation libraries or check final states.
  • Keyboard Shortcuts: Test with user.keyboard('{Meta>}{k}{/Meta}').

Examples

  • Form validation: Type invalid input -> Submit -> Verify error message shown.
  • Modal: Click button -> Verify modal opens -> Click outside -> Verify closes.

Guidelines

  • One test = one user behavior.
  • Avoid testing implementation details (state, props).
  • Use findBy for async elements, getBy for sync.

Read the full file on GitHub · 72 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. 8d ago First seen · 72 lines · 27 tokens per session scan A c04d61b1be47

Subscribe to this mod's changes

frontend-testing is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 5mo ago), licensed MIT. It adds 27 tokens to every session and 595 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-08-31.

Related

Other skills, from other repositories

storybook-testing

Storybook 10 testing patterns with Vitest integration, ESM-only distribution, CSF3 typesafe factories, play() interaction tests, Chromatic TurboSnap visual regression, module automocking, accessibility addon testing, and autodocs generation. Use when writing component stories, setting up visual regression testing…

yonatangross/orchestkit · 77 tokens

react-component-testing

Applies the three-tier test taxonomy for React applications: unit tests for hooks and pure logic, component tests for behavior and interactions, and end-to-end tests for user flows. Uses Vitest, React Testing Library, and Playwright while focusing on observable behavior over implementation details.

soulcodex/agentic · 59 tokens

dev-nextjs

Next.js development (App Router, Server Components, caching, streaming). Trigger when the user works with Next.js, modifies app/, pages/, next.config, or talks about RSC, Server Actions, Route Handlers, middleware.

christopherlouet/claude-base · 50 tokens

dev-react-perf

React/Next.js performance optimization. Trigger when the user wants to optimize rendering, reduce re-renders, or improve Core Web Vitals.

christopherlouet/claude-base · 33 tokens

dev-shadcn

Integration and customization of shadcn/ui (copy-paste React components, Radix + Tailwind). Trigger when the user wants to install shadcn, add components, customize the theme, or when shadcn/ui usage is detected in the project.

christopherlouet/claude-base · 57 tokens

state-management

State management patterns and implementation. Trigger when the user wants to manage global state, use Redux, Zustand, or other solutions.

christopherlouet/claude-base · 28 tokens