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 ApexIQ/skillsmith --skill frontend_testing_best_practicesgit clone --depth 1 https://github.com/ApexIQ/skillsmithWrote 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/apexiq/skillsmith/frontend_testing_best_practices)<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/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/apexiq/skillsmith/frontend_testing_best_practices"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/frontend_testing_best_practices.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.00027 | $0.00595 |
| Opus 5.5 | $0.00011 | $0.00238 |
| Sonnet 5.5 | $0.00005 | $0.00119 |
| Haiku 4.5 | $0.00003 | $0.00060 |
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.
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
getByRolequeries. 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
findByfor async elements,getByfor sync.
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.
- 3mo ago First seen · 72 lines · 27 tokens per session scan A c04d61b1be47
frontend-testing is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 8mo ago), licensed MIT. It adds 27 tokens to every session and 595 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-08-31.
frontend-testing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| frontend-testingApexIQ/skillsmith | Skill | 5 | 8mo ago | MIT | A | 27 | Claude Code, Codex |
| dev-nextjschristopherlouet/claude-base | Skill | 5 | 14d ago | MIT | A | 50 | Claude Code |
| dev-react-perfchristopherlouet/claude-base | Skill | 5 | 14d ago | MIT | A | 81 | Claude Code |
| dev-shadcnchristopherlouet/claude-base | Skill | 5 | 14d ago | MIT | A | 57 | Claude Code |
| state-managementchristopherlouet/claude-base | Skill | 5 | 14d ago | MIT | A | 28 | Claude Code |
| hooks-masteryVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 79 | Claude Code |
| nextjs-app-routerVersoXBT/claude-initial-setup | Skill | 4 | 6mo ago | MIT | A | 95 | Claude Code |