frontend-testing

frontend-testing is a skill for Claude Code, Codex from schalkneethling/webdev-agent-skills. It costs 66 tokens per session (2,742 once invoked), scanned A, original, MIT.

A frontend testing guide for checking web applications from the user’s point of view and testing important implementation details. It covers Vitest unit tests, Playwright end-to-end tests, visual comparisons, and accessibility checks.

In plain words
What is it for?
Use it when writing or reviewing unit, browser, visual-regression, accessibility, or structure-validation tests for a frontend.
Why use it?
It helps ensure tests verify what users need, not just how the code happens to be written. It also covers edge cases, error handling, visual changes, and accessibility.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/schalkneethling/webdev-agent-skills/frontend-testing
Any agent
npx skills add schalkneethling/webdev-agent-skills --skill frontend-testing
Clone the repo
git clone --depth 1 https://github.com/schalkneethling/webdev-agent-skills

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/schalkneethling/webdev-agent-skills/frontend-testing.svg)](https://agentmods.dev/skills/schalkneethling/webdev-agent-skills/frontend-testing)
Your own site
<a href="https://agentmods.dev/skills/schalkneethling/webdev-agent-skills/frontend-testing"><img src="https://agentmods.dev/badge/skills/schalkneethling/webdev-agent-skills/frontend-testing.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,742 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00066 $0.02742
Opus 5 $0.00033 $0.01371
Sonnet 5 $0.00013 $0.00548
Haiku 4.5 $0.00007 $0.00274

Measured 4d ago against content hash 39e58d18151d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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.

frontend-testing/SKILL.md · 356 lines

How it starts

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

Frontend Testing

Start by writing tests that validate acceptance criteria. Then add implementation tests where they provide value.

Core Principle

"The more your tests resemble the way your software is used, the more confidence they can give you." — Kent C. Dodds

This principle guides testing decisions, but isn't the whole picture:

  • Acceptance criteria tests verify the system does what users/stakeholders need. These should be stable across refactors.
  • Implementation tests verify the pieces are robust — edge cases, error handling, complex logic. These may change when you refactor.

Both have value. The anti-pattern to avoid is tests that only mirror implementation without validating meaningful behavior.

When to Load References

Load reference files based on test type:

  • Unit tests with DOM: references/locator-strategies.md
  • E2E tests: references/locator-strategies.md, references/aria-snapshots.md
  • Visual regression tests: references/visual-regression.md
  • Accessibility audits: references/accessibility-testing.md
  • Structure validation: references/aria-snapshots.md — consolidate multiple assertions into one
  • All tests: Start with this file for core workflow

Workflow

Step 1: Start with Acceptance Criteria

Before writing any test, identify what the code should do from the user's perspective.

Ask for or extract criteria from:

  • Ticket description or user story
  • Figma annotations
  • Functional requirements
  • Product owner clarification

Document criteria as a checklist. These become your first tests.

Write acceptance tests before reading implementation. This prevents circular validation where tests just confirm "code does what code does."

Step 2: Map Criteria to Test Cases

For each criterion, identify:

  • Happy path: Normal expected behavior
  • Edge cases: Boundary conditions
  • Error cases: Invalid inputs, failures

Example mapping:

Criterion: "User can filter products by category"
├─ Happy path: Select category, products filter correctly
├─ Edge case: No products match filter, show empty state
├─ Edge case: Clear filter, all products show again
├─ Error case: Filter API fails, show error message
└─ Accessibility: Filter controls are keyboard accessible

Read the full file on GitHub · 356 lines

Files

What ships with it

4 files 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.

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 · 356 lines · 66 tokens per session scan A 39e58d18151d

Subscribe to this mod's changes

frontend-testing is a skill published in the GitHub repository schalkneethling/webdev-agent-skills (7 stars, last pushed 4mo ago), licensed MIT. It adds 66 tokens to every session and 2,742 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.

Related

Other skills, from other repositories

js-in-html-testing

Test JS logic embedded in HTML using two-layer strategy - Python unit tests + Playwright browser integration tests.

liaohch3/claude-tap · 25 tokens

designing-tests

Designs and implements testing strategies for any codebase. Use when adding tests, improving coverage, setting up testing infrastructure, debugging test failures, or when asked about unit tests, integration tests, or E2E testing.

CloudAI-X/claude-workflow-v2 · 48 tokens

qa/test-strategy

测试策略和测试金字塔原则,定义单元测试、集成测试、E2E测试的分布和覆盖要求.

echoVic/boss-skill · 33 tokens

prd-auto-test-loop

PRD 驱动的自动化测试编排技能。用于把每版 PRD 的测试计划、AI 自测与自修复、测试报告标准化落地;适用于按验收标准拆分 Unit/Integration/E2E、划分自动化与人工边界、生成版本化 TESTPLAN/TESTREPORT 的场景。.

yunshu0909/yunshu_skillshub · 79 tokens

pact-testing-strategies

Testing strategies, test pyramid guidance, and quality assurance patterns for PACT Test phase. Use when: designing test suites, implementing unit tests, integration tests, E2E tests, performance testing, security testing, or determining test coverage priorities. Triggers on: test design, unit testing, integration…

Synaptic-Labs-AI/PACT-Plugin · 88 tokens

test-writer

Skill "test-writer" from miniidealab/openlogos, covering skill: test writer, 触发条件, 前置依赖, 核心能力 and 执行步骤.

miniidealab/openlogos · 0 tokens