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/vladolaru/claude-code-plugins/testing-patternsnpx skills add vladolaru/claude-code-plugins --skill testing-patternsgit clone --depth 1 https://github.com/vladolaru/claude-code-pluginsWrote 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/vladolaru/claude-code-plugins/testing-patterns)<a href="https://agentmods.dev/skills/vladolaru/claude-code-plugins/testing-patterns"><img src="https://agentmods.dev/badge/skills/vladolaru/claude-code-plugins/testing-patterns.svg" alt="Measured on agentmods" 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 | $0.00042 | $0.01495 |
| Opus 5 | $0.00021 | $0.00747 |
| Sonnet 5 | $0.00008 | $0.00299 |
| Haiku 4.5 | $0.00004 | $0.00150 |
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 yesterday.
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 — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill Directory
Resolve SKILL_DIR to the absolute directory containing this SKILL.md, as
shown by the current host, before using any bundled path below.
Before a shell command uses $SKILL_DIR, assign it in that command or replace
it with the resolved path. It is not a host-exported environment variable.
Testing Patterns
Apply these language-agnostic test quality principles when writing or reviewing tests. Diagnose test smells. Enforce behavior-first testing. Route to language-specific skills for framework details.
RULE 0: Test Behavior, Not Implementation
Every test must verify observable outcomes (return values, side effects, exceptions) — never internal method calls, execution order, or implementation structure. Tests that break during behavior-preserving refactors are testing the wrong thing.
When this rule conflicts with other guidance in this skill, this rule wins.
When to Use This Skill
Use for language-agnostic test quality: philosophy, smells, structure, mocking strategies, coverage decisions, test data.
Before applying patterns: Read 2-3 existing tests in the project to identify established conventions (naming, structure, assertion style, fixture approach). Align your suggestions with the codebase's existing patterns unless they violate RULE 0.
Delegate to language-specific skills for framework details:
php-testing-patterns— PHPUnit, WordPress, WooCommercejs-testing-patterns— Jest, Vitest, React Testing Librarye2e-testing-patterns— Playwright, Page Object Modelgo-testing-patterns— Go testing, table-driven tests, httptestrust-testing-patterns— built-in framework, mockall, proptestpython-testing-patterns— pytest, hypothesis, factory_boy
Do not use for TDD workflow (separate skill).
Reference Routing
When you find a test concern, read ONLY the specified sections. Do NOT read full files.
| Test Concern | Reference File | Sections to Read |
|---|---|---|
| Tests pass but don't verify behavior | $SKILL_DIR/references/test-philosophy.md |
## Quick Reference + ## The Behavior vs Implementation Distinction |
| Flaky tests (random pass/fail) - usually an implementation bug, not a test bug | $SKILL_DIR/references/test-smells.md |
## Quick Reference + ### 1. Flaky Tests |
| Brittle tests (break on refactor) | $SKILL_DIR/references/test-smells.md |
## Quick Reference + ### 2. Brittle Tests |
| Over-mocking / mock confusion | $SKILL_DIR/references/mocking-strategies.md |
## Quick Reference + ## The Mocking Decision Framework |
| Poor structure (no AAA, bad names) | $SKILL_DIR/references/test-structure.md |
## Quick Reference + ## The AAA Pattern |
| Missing edge/error case coverage | $SKILL_DIR/references/coverage.md |
## Quick Reference + ## What to Test |
| Over-testing trivial code | $SKILL_DIR/references/coverage.md |
## Quick Reference + ## What NOT to Test |
| Test data strategy | $SKILL_DIR/references/test-data.md |
## Quick Reference + ## Factories |
| Choosing test layer (unit/integration/system) | $SKILL_DIR/references/test-layers.md |
## Quick Reference + ## Choosing the Right Layer |
| Independence/determinism/speed/readability issues | $SKILL_DIR/references/test-philosophy.md |
## Quick Reference + relevant pillar section |
| "Why should we test this?" - stakeholder justification | $SKILL_DIR/references/test-benefits.md |
## Quick Reference |
| TDD red-green-refactor questions | $SKILL_DIR/references/tdd-workflow.md |
## Quick Reference + ## The Red-Green-Refactor Cycle |
What ships with it
16 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.
- references/coverage.md 7.8 KB
- references/go-testing-patterns.md 14 KB
- references/jest-vitest-patterns.md 9.1 KB
- references/mocking-strategies.md 9.2 KB
- references/phpunit-patterns.md 10 KB
- references/playwright-patterns.md 11 KB
- references/python-testing-patterns.md 14 KB
- references/README.md 4.1 KB
- references/rust-testing-patterns.md 13 KB
- references/tdd-workflow.md 9.9 KB
- references/test-benefits.md 11 KB
- references/test-data.md 8.5 KB
- references/test-layers.md 7.2 KB
- references/test-philosophy.md 11 KB
- references/test-smells.md 8.7 KB
- references/test-structure.md 6.4 KB
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.
- yesterday First seen · 108 lines · 42 tokens per session scan A e3dd163fcb2a
testing-patterns is a skill published in the GitHub repository vladolaru/claude-code-plugins (8 stars, last pushed yesterday), licensed MIT. It adds 42 tokens to every session and 1,495 once invoked, about $0.0002 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
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.
chat-perf
Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…