frontend-testing

frontend-testing is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent-skills. It costs 23 tokens per session (925 once invoked), scanned A, original, MIT.

A guide to testing frontend applications at several levels, from isolated components to complete user journeys. End-to-end, or E2E, tests reproduce actions across the whole application.

In plain words
What is it for?
Use it to plan unit, integration, component, E2E, visual-regression, and accessibility tests with tools such as Vitest and Testing Library.
Why use it?
It helps catch broken logic, rendering problems, accessibility issues, visual changes, and failures in important user flows.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { server } from '../mocks/server';.

Good fit Use it to plan unit, integration, component, E2E, visual-regression, and accessibility tests with tools such as Vitest and Testing Library.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills
agentmods
npx agentmods add skills/cosmicstack-labs/mercury-agent-skills/frontend-testing

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/cosmicstack-labs/mercury-agent-skills/frontend-testing.svg)](https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/frontend-testing)
Your own site
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent-skills/frontend-testing"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent-skills/frontend-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 925 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.00023 $0.00925
Opus 5 $0.00012 $0.00463
Sonnet 5 $0.00005 $0.00185
Haiku 4.5 $0.00002 $0.00093

Measured 4d ago against content hash 034ab2c498d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, 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 4d 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.

categories/frontend/frontend-testing/SKILL.md · 127 lines

How it starts

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

Frontend Testing

Complete testing strategy for frontend applications — from unit tests to visual regression to E2E.

Testing Pyramid

        ╱  E2E ╲          ╱ Few, critical paths ╲
       ╱─────────╲        ╱  Smoke tests, auth   ╲
      ╱ Integration ╲    ╱  Component + feature  ╲
     ╱───────────────╲  ╱  User interaction flows ╲
    ╱ Unit + Component ╲╱  Logic, rendering, hooks ╲
   ╱────────────────────╲╱  Fast, many, isolated    ╲

Test Types

Unit Tests (Vitest + Testing Library)

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

describe('Button', () => {
  it('renders with text', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByText('Click me')).toBeInTheDocument();
  });

  it('handles click events', async () => {
    const onClick = vi.fn();
    render(<Button onClick={onClick}>Click</Button>);
    await userEvent.click(screen.getByText('Click'));
    expect(onClick).toHaveBeenCalledTimes(1);
  });
});

Integration Tests

import { render, screen, waitFor } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { ProductsList } from './ProductsList';
import { server } from '../mocks/server';

beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());

test('loads and displays products', async () => {
  render(
    <QueryClientProvider client={new QueryClient()}>
      <ProductsList />
    </QueryClientProvider>
  );

  expect(screen.getByText('Loading...')).toBeInTheDocument();
  await waitFor(() => {
    expect(screen.getByText('Product A')).toBeInTheDocument();
    expect(screen.getByText('Product B')).toBeInTheDocument();
  });
});

E2E Tests (Playwright)

import { test, expect } from '@playwright/test';

test('user can complete checkout', async ({ page }) => {
  await page.goto('/products');
  await page.click('text=Add to Cart');
  await page.click('text=Checkout');
  await page.fill('[name=email]', '[email protected]');
  await page.fill('[name=card]', '4242 4242 4242 4242');
  await page.click('text=Pay Now');
  await expect(page.getByText('Order confirmed!')).toBeVisible();
});

Read the full file on GitHub · 127 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. 4d ago First seen · 127 lines · 23 tokens per session scan A 034ab2c498d2

Subscribe to this mod's changes

frontend-testing is a skill published in the GitHub repository cosmicstack-labs/mercury-agent-skills (471 stars, last pushed 13d ago), licensed MIT. It adds 23 tokens to every session and 925 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-03.

Related

Other skills, from other repositories

testing-setup

Analyze and create a testing strategy for native Android apps - install testing libraries, set up test infrastructure, create harnesses for unit tests, UI tests, screenshot tests, and end-to-end tests.

android/skills · 43 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

diff

Reconcile a converted/built web page against its source prototype with two complementary probes — a PIXEL/layout diff (stretched images, dropped wraps, blank renders, colour flips) and a STRUCTURAL content+typography diff (dropped/mis-slotted headings, eyebrows, CTAs; rendered-face font forks). Stack-agnostic via…

adobe/skills · 120 tokens

find-test-content

Use this when you need to find existing pages that already use a specific block in an AEM Edge Delivery Services project, for example to locate test content or examples during block development. Covers reporting page URLs with occurrence counts and block variants. This searches existing content; to import a new page…

adobe/skills · 68 tokens

test-implement

Implements React/TypeScript unit, integration, and browser E2E tests with the repository's configured runner, mocks, setup, and browser harness. Use when creating or completing frontend tests and generated test skeletons.

shinpr/claude-code-workflows · 48 tokens

verify

Verification loop — lint -> typecheck -> unit -> integration -> e2e.

sd0xdev/sd0x-harness · 17 tokens