testing-anti-patterns

Detect testing anti-patterns in test suites during design and review.

146|31|Updated Jul 25, 2025
One-click install
npx skills add https://github.com/bobmatnyc/claude-mpm --skill testing-anti-patterns-bobmatnyc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-anti-patterns
Source: https://github.com/bobmatnyc/claude-mpm/tree/main/src/claude_mpm/skills/bundled/testing/testing-anti-patterns
Command: npx skills add https://github.com/bobmatnyc/claude-mpm --skill testing-anti-patterns-bobmatnyc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markdown, python, and includes references (resource) components.

What problem does it solve?

Helps identify and prevent common testing anti-patterns (mocking, test-only methods, vague test names) to improve test quality and reliability.

Core Features & Use Cases

  • Reference materials for anti-patterns and detection guides
  • Gate functions and best practices for test design
  • Cross-references to TDD and verification workflows

Quick Start

  1. Skim anti-patterns docs
  2. Use gate functions to detect anti-patterns
  3. Improve test design

Frequently Asked Questions about testing-anti-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify common testing anti-patterns in my test suite?

Testing anti-patterns like over-mocking, test-only production methods, and vague test names undermine test reliability. This skill provides detection guides and gate functions to spot these patterns during test design, maintenance, and review, helping ensure tests verify real behavior rather than implementation details.

What are the most common mocking mistakes in TDD workflows?

Incomplete or overly broad mocks are common anti-patterns that mask real bugs. This skill teaches mocking best practices and verification techniques to ensure mocks accurately represent production behavior and don't hide integration issues.

Why shouldn't I add test-only methods to production code?

Test-only production methods violate separation of concerns and complicate maintenance. This skill identifies this anti-pattern and explains how to refactor tests to verify real public interfaces instead, keeping production code clean.

How do I write clearer, more maintainable test names?

Vague test names like 'test_function' make suites hard to understand and maintain. This skill guides naming conventions and test design patterns that clearly express what behavior is being verified, improving readability and debugging efficiency.

Can I apply anti-pattern detection when reviewing existing tests?

Yes. This skill is designed for test design, maintenance, and review phases. Use the provided gate functions and reference materials to audit existing test suites, identify anti-patterns, and refactor tests before they accumulate technical debt.

What's the relationship between test anti-patterns and TDD practice?

Anti-patterns often emerge when TDD discipline lapses. This skill cross-references TDD and verification workflows to help you maintain good testing practices throughout development, preventing patterns that make tests brittle or unreliable.