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 skills add tmj-90/gaffer --skill frontend-testinggit clone --depth 1 https://github.com/tmj-90/gafferWrote 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.
[](https://agentmods.dev/skills/tmj-90/gaffer/frontend-testing)<a href="https://agentmods.dev/skills/tmj-90/gaffer/frontend-testing"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/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.
<a href="https://agentmods.dev/skills/tmj-90/gaffer/frontend-testing"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/frontend-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00088 | $0.01238 |
| Opus 5.5 | $0.00035 | $0.00495 |
| Sonnet 5.5 | $0.00018 | $0.00248 |
| Haiku 4.5 | $0.00009 | $0.00124 |
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 16d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Test frontend code by behaviour, not implementation
Testing Library's guiding principle: the more your tests resemble the way your software
is used, the more confidence they give you. A good component test renders with realistic
props and providers, finds things by role and label, clicks and types, and asserts what
the user sees or what the app sent. It survives refactors because it never reaches for
internals. Full journeys belong to the e2e-browser-test skill; this covers everything
below it, where most UI confidence is cheapest to buy.
Procedure
- Use the repo's runner and library. Vitest/Jest with Testing Library (React, Vue,
Svelte, Angular flavours) or the framework's own harness, the repo's render helper that
wires providers (router, query client, store, theme, i18n), and its network mock layer
(MSW or a fetch mock). Call
search_lorefor conventions. Never add a second runner. - Map each acceptance criterion to a user-visible outcome — "shows an error under the email field when it is invalid", "disables Submit while saving". Each gets a test named after that outcome; that test must fail if the criterion's behaviour breaks.
- Render realistically. The shared render helper, realistic props from a factory
(the
test-fixtures-and-factoriesskill), the network mocked at the fetch/HTTP boundary — not the component's own data hook, which would skip the code under test. - Query like a user, in Testing Library's priority order:
getByRolewithname,getByLabelText,getByPlaceholderText,getByText,getByDisplayValue; thengetByAltText/getByTitle;getByTestIdlast, with a comment. UsegetBy*when the element must exist,queryBy*only to assert absence,findBy*for anything async. - Interact with
userEvent(const user = userEvent.setup();await user.click,await user.type,await user.keyboard('{Tab}')) rather thanfireEvent, so focus, keyboard and pointer sequences are real. - Cover every state the ticket introduces: default, loading, empty, error, success, disabled, and each interaction path including keyboard-only and submit. For data components, make the mocked request fail (500, network error) and assert the error UI and the retry path, not only the happy render.
- Cover the async races the UI can hit when an AC touches them: a double-click on Submit sends one request; a slow response for an old search does not overwrite a newer one (resolve mocked responses out of order); unmounting mid-request produces no update or warning; optimistic updates roll back when the request fails.
- Assert visible outcomes. Text, roles,
aria-invalid,disabled, focus position, navigation to the right path, the request sent with the right payload. Never internal state, CSS class names, or render counts (unless the ticket is about renders). - Add accessibility checks for new UI: the repo's
axehelper on each new state, keyboard reachability of every control, focus moved into and restored after dialogs (thefrontend-a11yskill). Axe finds a subset of issues; it does not replace the role-based queries above. - Keep snapshots small. A reviewed snapshot of a stable presentational fragment is fine; a page-sized snapshot nobody reads is noise. Visual regression belongs to the repo's visual tooling.
- Test hooks through a component or
renderHook, asserting returned behaviour; async withfindBy*/waitFor, fake timers only when explicitly enabled and advanced. Run the suite, then record evidence with therecord-evidenceskill (test_output).
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.
- 16d ago Changed · +16 lines 027fe43252bd
- 19d ago First seen · 64 lines · 88 tokens per session scan A a75c292cc088
frontend-testing is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 88 tokens to every session and 1,238 once invoked, about $0.0004 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-28.
Other skills, from other repositories
test-audit
Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.
mock-detection
Deep mock appropriateness analysis for Test Audit pipeline.
bug-magnet-data
Curated edge case test data for boundary testing, verification scripts, and test generation. Provides pre-curated reference data organized by data type with context-specific loading guidance.
assertion-patterns
Real output verification vs mock calls. Use when transforming T1-T4 violating tests to verify observable behavior.
test-classification
Prompt template for test classification stage in Test Audit pipeline.
fix-bug
Run the Fix Validation pipeline to investigate, fix, and validate a bug. Ensures deterministic pipeline execution with IssueAnalyzer, FixWriter, TestWriter (conditional), TestAudit (conditional), and FixValidator stages.