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 sawrus/agent-guides --skill testing-patternsgit clone --depth 1 https://github.com/sawrus/agent-guidesWrote 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/sawrus/agent-guides/testing-patterns)<a href="https://agentmods.dev/skills/sawrus/agent-guides/testing-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/testing-patterns/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/sawrus/agent-guides/testing-patterns"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/testing-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00000 | $0.00459 |
| Opus 5 | $0.00000 | $0.00230 |
| Sonnet 5 | $0.00000 | $0.00092 |
| Haiku 4.5 | $0.00000 | $0.00046 |
Grade A, and why
testing-patterns 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 5d 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.
What it actually says
Skill: Frontend Testing Patterns
When to load
When writing tests for components, hooks, or integration flows.
Philosophy
Test behavior, not implementation. A user doesn't care that you called setState; they care that clicking "Submit" shows a success message.
Component Test Template
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { UserCard } from './UserCard';
const defaultUser: User = {
id: '1', name: 'Jane Smith', email: '[email protected]', role: 'admin',
};
describe('UserCard', () => {
it('renders user information', () => {
render(<UserCard user={defaultUser} />);
expect(screen.getByText('Jane Smith')).toBeInTheDocument();
});
it('calls onEdit when edit button is clicked', async () => {
const onEdit = vi.fn();
render(<UserCard user={defaultUser} onEdit={onEdit} />);
await userEvent.click(screen.getByRole('button', { name: /edit/i }));
expect(onEdit).toHaveBeenCalledWith(defaultUser.id);
});
});
Custom Hook Testing
import { renderHook, act } from '@testing-library/react';
import { useCounter } from './useCounter';
it('increments count', () => {
const { result } = renderHook(() => useCounter(0));
act(() => { result.current.increment(); });
expect(result.current.count).toBe(1);
});
MSW: Mock API Calls
import { http, HttpResponse } from 'msw';
export const handlers = [
http.get('/api/users', () =>
HttpResponse.json([{ id: '1', name: 'Jane' }])
),
];
Test Type Decision
| Scenario | Test Type |
|---|---|
| Component renders | Unit (RTL) |
| User interaction | Unit (RTL + userEvent) |
| Data fetching states | Unit (RTL + MSW) |
| Full user journey | E2E (Playwright) |
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.
- 5d ago First seen · 70 lines · 0 tokens per session scan A 5dccc4fc760d
testing-patterns is a skill published in the GitHub repository sawrus/agent-guides (17 stars, last pushed 8d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 459 tokens. 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.
Other skills, from other repositories
unit-test-writer
Write comprehensive unit tests that verify behavior, catch regressions, and document intent. Covers test organization, assertions, mocking, and coverage.
snapshot-tester
Professional Snapshot Tester Expert skill. Implement robust test suites and automated quality checks for modern web/mobile applications.
test-data-builder
Professional Test Data Builder skill. Implement robust test suites and automated quality checks for modern web/mobile applications.
test-driven-development
Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.
agent-harness-fault-injection
Use when an agent workflow needs deterministic recovery evidence for sandbox, MCP/tool, worker, checkpoint, memory, or orchestration failures.
quinn
Proves the system works by writing and executing comprehensive test suites.