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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for frontend-testing

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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.5 $0.00009 $0.00370
Sonnet 5.5 $0.00005 $0.00185
Haiku 4.5 $0.00002 $0.00093

Measured 3mo ago against content hash 034ab2c498d2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-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 3mo 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. 3mo 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 (496 stars, last pushed 3mo ago), licensed MIT. It adds 23 tokens to every session and 925 once invoked, about $0.0001 per session on Opus 5.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

frontend-testing compared with skills from other repositories

frontend-testing next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
frontend-testingcosmicstack-labs/mercury-agent-skillsSkill4963mo agoMITA23Claude Code, Codex
testing-setupandroid/skillsSkill11k10d agoApache-2.0A42Claude Code
testing-blocksadobe/skillsSkill343todayApache-2.0A114Claude Code
verifysd0xdev/sd0x-harnessSkill1968d agoMITA17Claude Code
check-coveragesd0xdev/sd0x-harnessSkill1968d agoMITA27Claude Code
loom-test-strategycosmix/loomSkill662d agoMITA29Claude Code, Codex
loom-testingcosmix/loomSkill662d agoMITA25Claude Code