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 agentmods add skills/svngoku/coding-agents-skills/testing-patternsnpx skills add svngoku/coding-agents-skills --skill testing-patternsgit clone --depth 1 https://github.com/svngoku/coding-agents-skillsWhat 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 | $0.00184 | $0.02819 |
| Opus 5 | $0.00092 | $0.01409 |
| Sonnet 5 | $0.00037 | $0.00564 |
| Haiku 4.5 | $0.00018 | $0.00282 |
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 2d 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 — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Patterns
Automated tests are how a codebase stays safe to change. This language-agnostic skill tells you what to test, where each test belongs, and how to keep the suite fast and reliable — with worked examples in Python (pytest, Hypothesis, factory_boy, testcontainers) and JavaScript/TypeScript (Vitest, Jest, fast-check, Playwright).
Quick Reference
| Task | Reference |
|---|---|
| pytest fixtures & parametrization, factory_boy, Hypothesis, coverage.py, mutmut | python-testing.md |
| Vitest/Jest mocking, fast-check, Playwright config & selectors, testcontainers-node | js-ts-testing.md |
| CI parallelization, flaky-test triage, rerun policies, quarantine | flaky-tests-ci.md |
Test Pyramid
Many fast, isolated unit tests at the bottom; fewer slower integration tests in the middle; a handful of slow, brittle end-to-end tests at the top.
| Layer | Scope | Speed | Typical count | Catches |
|---|---|---|---|---|
| Unit | one function/class | ms | hundreds+ | logic errors, edge cases |
| Integration | modules + real deps (DB, cache, APIs) | s | dozens | schema/contract mismatches, wiring |
| E2E | whole system via UI/API | min | tens | broken journeys, config/deploy |
Map each feature to the lowest layer that can catch its failure:
Feature Layer Tool
price calculation unit pytest / vitest
order persistence integration pytest + testcontainers Postgres
guest checkout e2e Playwright
When the pyramid is wrong
- Testing trophy (Kent C. Dodds): front-end apps should be integration-heavy — render components with real hooks/context, assert on user-visible behavior. Reserve e2e for critical journeys.
- Contract tests: at service-to-service boundaries, test the API contract once per side (consumer-driven contracts) instead of full-stack e2e flows.
What ships with it
9 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.
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.
- 2d ago First seen · 298 lines · 184 tokens per session scan A 0bba2c368e82
testing-patterns is a skill published in the GitHub repository svngoku/coding-agents-skills (9 stars, last pushed 20d ago), licensed MIT. It adds 184 tokens to every session and 2,819 once invoked, about $0.0009 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.
Other skills, from other repositories
skill-authoring
Guide creating Claude Code skills with TDD and persuasion principles. Use for new skill development.
autonomous-tdd-debugger
Empowers the agent to autonomously run tests, read terminal stack traces, and self-heal code until tests pass. Transforms the agent from a passive coder to an active CI pipeline debugger.
tdd
Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
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.
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.