testing-anti-patterns

Detect testing anti-patterns like improper mocking and incomplete mocks in codebases.

60|4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/dsifry/goodtogo --skill testing-anti-patterns-dsifry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-anti-patterns
Source: https://github.com/dsifry/goodtogo/tree/main/.claude/plugins/superpowers/skills/testing-anti-patterns
Command: npx skills add https://github.com/dsifry/goodtogo --skill testing-anti-patterns-dsifry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested. This skill guides developers to identify and fix common testing anti-patterns to improve reliability and maintainability.

Core Features & Use Cases

  • Detects commonly seen anti-patterns such as testing mock behavior, adding test-only production methods, mocking without understanding dependencies, incomplete mocks, and treating integration tests as afterthoughts.
  • Provides actionable fixes and gatekeeping prompts to align tests with real behavior and promote TDD.
  • Useful during code reviews, refactoring, or when onboarding new contributors to ensure tests reflect actual system behavior.

Quick Start

Analyze your repository's tests to surface anti-patterns and recommended remediations.

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 testing anti-patterns in my codebase?

Detect mocking anti-patterns by analyzing test files to find incomplete mocks and test-only production code. The skill provides concrete remediation steps ensuring unit tests exercise real behavior rather than mock behavior.

Why does my unit test pass but fail in production?

Your unit test likely exercises mock behavior rather than real behavior. The skill detects improper mocking and incomplete mocks, providing actionable fixes to align tests with actual system behavior.

How do I fix test-only production methods added for unit testing?

Fix test-only production methods by applying gatekeeping prompts and concrete remediation steps that remove test-specific code. The skill helps refactor tests to verify real behavior without polluting the production codebase.

Can I use this to review integration and end-to-end tests?

Yes, you can review integration and end-to-end tests. The skill applies across unit, integration, and end-to-end tests in common languages to detect anti-patterns like treating integration tests as afterthoughts.

What are common mocking anti-patterns when writing unit tests?

Common mocking anti-patterns include testing mock behavior instead of real behavior, mocking without understanding dependencies, and incomplete mocks. The skill surfaces these issues during code reviews or refactoring.