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 svngoku/coding-agents-skills --skill testing-patternsgit clone --depth 1 https://github.com/svngoku/coding-agents-skillsWrote 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/svngoku/coding-agents-skills/testing-patterns)<a href="https://agentmods.dev/skills/svngoku/coding-agents-skills/testing-patterns"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/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/svngoku/coding-agents-skills/testing-patterns"><img src="https://agentmods.dev/badge/skills/svngoku/coding-agents-skills/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.00184 | $0.02819 |
| Opus 5.5 | $0.00074 | $0.01128 |
| Sonnet 5.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 1mo 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.
- 1mo 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 (12 stars, last pushed yesterday), licensed MIT. It adds 184 tokens to every session and 2,819 once invoked, about $0.0007 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.
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
Drives development with tests using the red-green-refactor loop. 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. Use when asked to add tests to a function, fix a bug…
test-driven-development
Use when implementing any feature or bugfix, before writing implementation code.
writing-skills
A guide for creating and testing reusable instructions for AI agents, called skills. It applies test-driven development, or TDD—the practice of writing tests before implementation—to instruction documents.