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 bobmatnyc/claude-mpm-skills --skill testing-anti-patternsgit clone --depth 1 https://github.com/bobmatnyc/claude-mpm-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/bobmatnyc/claude-mpm-skills/testing-anti-patterns)<a href="https://agentmods.dev/skills/bobmatnyc/claude-mpm-skills/testing-anti-patterns"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/testing-anti-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/bobmatnyc/claude-mpm-skills/testing-anti-patterns"><img src="https://agentmods.dev/badge/skills/bobmatnyc/claude-mpm-skills/testing-anti-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.00041 | $0.01950 |
| Opus 5.5 | $0.00016 | $0.00780 |
| Sonnet 5.5 | $0.00008 | $0.00390 |
| Haiku 4.5 | $0.00004 | $0.00195 |
Grade A, and why
testing-anti-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 2mo 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 — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testing Anti-Patterns
Overview
Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested.
Core principle: Test what the code does, not what the mocks do.
Following strict TDD prevents these anti-patterns. See the Test-Driven Development skill (available in the skill library) for the complete TDD workflow.
When to Use This Skill
Activate this skill when:
- Writing or changing tests - Verify tests cover real behavior
- Adding mocks - Ensure mocking is necessary and correct
- Reviewing test failures - Check if mock behavior is the issue
- Tempted to add test-only methods - STOP and reconsider
- Tests feel overly complex - Sign of over-mocking
The Iron Laws
1. NEVER test mock behavior
2. NEVER add test-only methods to production classes
3. NEVER mock without understanding dependencies
4. NEVER create incomplete mocks
5. NEVER treat tests as afterthought
Core Anti-Pattern Categories
1. Testing Mock Behavior
Asserting on mock elements instead of real behavior. Fix: Test real component or don't mock it. → core-anti-patterns.md
2. Test-Only Methods in Production
Methods in production classes only used by tests. Fix: Move to test utilities. → core-anti-patterns.md
3. Mocking Without Understanding
Mocking without understanding dependencies/side effects. Fix: Understand first, mock minimally. → core-anti-patterns.md
4. Incomplete Mocks
Partial mocks missing fields downstream code needs. Fix: Mirror complete API structure. → completeness-anti-patterns.md
5. Tests as Afterthought
Implementation "complete" without tests. Fix: TDD - write test first. → completeness-anti-patterns.md
What ships with it
6 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.
- 2mo ago First seen · 192 lines · 41 tokens per session scan A e30fb0928dff
testing-anti-patterns is a skill published in the GitHub repository bobmatnyc/claude-mpm-skills (79 stars, last pushed 4mo ago), licensed MIT. It adds 41 tokens to every session and 1,950 once invoked, about $0.0002 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-09-03.
testing-anti-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| testing-anti-patternsbobmatnyc/claude-mpm-skills | Skill | 79 | 4mo ago | MIT | A | 41 | Claude Code |
| JavaScript Testing PatternsPramodDutta/qaskills | Skill | 252 | 27d ago | MIT | A | 36 | Claude Code, Codex |
| jest-expertpersonamanagmentlayer/pcl | Skill | 46 | 1mo ago | Apache-2.0 | A | 65 | Claude Code |
| Jest Mocking PatternsPramodDutta/qaskills | Skill | 252 | 27d ago | MIT | A | 44 | Claude Code, Codex |
| CI Test Sharding ParallelizationPramodDutta/qaskills | Skill | 252 | 27d ago | MIT | A | 34 | Claude Code, Codex |
| frontmcp-testingagentfront/frontmcp | Skill | 154 | today | Apache-2.0 | A | 175 | Claude Code |
| jestanivar/jest-skill | Skill | 9 | yesterday | MIT | A | 179 | Claude Code, Codex |