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 subhansh-dev/agent-maxxing --skill testing-patternsgit clone --depth 1 https://github.com/subhansh-dev/agent-maxxingWrote 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/subhansh-dev/agent-maxxing/testing-patterns)<a href="https://agentmods.dev/skills/subhansh-dev/agent-maxxing/testing-patterns"><img src="https://agentmods.dev/badge/skills/subhansh-dev/agent-maxxing/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/subhansh-dev/agent-maxxing/testing-patterns"><img src="https://agentmods.dev/badge/skills/subhansh-dev/agent-maxxing/testing-patterns.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.00023 | $0.00510 |
| Opus 5 | $0.00012 | $0.00255 |
| Sonnet 5 | $0.00005 | $0.00102 |
| Haiku 4.5 | $0.00002 | $0.00051 |
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
Testing Patterns
What to Test
Always Test
- Happy path (the main use case)
- Edge cases (null, empty, 0, negative, max values)
- Error paths (what happens when things fail)
- Integration points (API calls, database, file I/O)
Don't Bother Testing
- Simple getters/setters
- Framework code you don't own
- Implementation details (test behavior, not implementation)
- Trivial utilities with no logic
Test Structure
describe('UserService', () => {
describe('createUser', () => {
it('creates a user with valid data', () => { ... })
it('rejects duplicate emails', () => { ... })
it('hashes the password', () => { ... })
it('returns user without password field', () => { ... })
})
})
Pattern: describe the unit, it describes the behavior in plain English.
Test Pyramid
/ E2E \ ← Few, slow, high confidence
/ Integration \ ← Some, medium speed
/ Unit Tests \ ← Many, fast, focused
- Unit tests: 70% — test individual functions
- Integration tests: 25% — test modules working together
- E2E tests: 5% — test the full user journey
Common Patterns
Arrange-Act-Assert
// Arrange: set up the test data
const user = { name: 'Test', email: '[email protected]' }
// Act: call the function
const result = createUser(user)
// Assert: check the result
expect(result).toHaveProperty('id')
expect(result.email).toBe('[email protected]')
Mock External Dependencies
jest.mock('./database', () => ({
query: jest.fn().mockResolvedValue([{ id: 1 }])
}))
Test Error Cases
it('throws on invalid input', () => {
expect(() => parseConfig(null)).toThrow('Config is required')
})
Coverage
- Aim for 80%+ line coverage
- But coverage ≠ quality — 100% coverage with no edge case tests is worthless
- Focus on covering the paths that matter most
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 · 83 lines · 23 tokens per session scan A abd82ba1c1f4
testing-patterns is a skill published in the GitHub repository subhansh-dev/agent-maxxing (2 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 510 once invoked, about $0.0001 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-09-03.
Other skills, from other repositories
dev-testing
A testing guide that defines when to use unit, integration, API, and end-to-end tests. Unit tests check small pieces of code, while end-to-end tests check a full user flow.
testing-patterns
Vitest + Playwright testing patterns: unit tests, mocking, fixtures, E2E, coverage, and anti-patterns. Use when writing tests, setting up test infrastructure, or following TDD workflows.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.
webapp-testing
Start/reuse a local app, wait for readiness, inspect rendered state/console/network, act from observed selectors, and verify with evidence.
axiom-testing
Use when writing ANY test, debugging flaky tests, making tests faster, or choosing Swift Testing vs XCTest. Covers unit tests, UI tests, async testing, test architecture.
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.