testing-anti-patterns

Detect and block testing anti-patterns during test creation and modification.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/maxwalser001-del/shieldpilot --skill testing-anti-patterns-maxwalser001-del
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-anti-patterns
Source: https://github.com/maxwalser001-del/shieldpilot/tree/main/.claude/skills/testing-anti-patterns
Command: npx skills add https://github.com/maxwalser001-del/shieldpilot --skill testing-anti-patterns-maxwalser001-del

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces testing discipline by detecting anti-patterns in tests, preventing fragile or misleading tests from undermining software quality.

Core Features & Use Cases

  • Testing mock behavior: Prevents tests from asserting that mocks exist or were called instead of verifying real behavior.
  • Production code integrity: Prohibits test-only lifecycle or cleanup methods in production code.
  • Understanding dependencies: Encourages validating dependencies before mocking and mocking only slow or external parts.
  • Complete mocks: Ensures mocks reflect complete real data structures and documented fields.
  • Test-first mindset: Integrates with test-driven development to ensure testing remains a first-class activity.

Quick Start

Apply this skill to automatically detect and remediate common testing anti-patterns in your test suite.

Frequently Asked Questions about testing-anti-patterns

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

FAQPage Schema
How do I prevent mocking behavior instead of verifying real behavior in tests?

To prevent mocking behavior, apply automated gate checks that block tests from asserting mocks exist or were called. This enforces verifying real behavior and ensures mocks mirror actual dependencies. Mocks should validate slow or external parts only, reflecting complete real data structures and documented fields.

How do I stop test-only production code from affecting software quality?

Stop test-only production code by enforcing production code integrity checks. This prohibits test-only lifecycle or cleanup methods from entering production code, preventing flawed tests from misleading software quality and maintaining clear separation between test utilities and production logic.

What are common testing anti-patterns that undermine test quality?

Common testing anti-patterns include asserting mock behavior instead of real outcomes, incomplete mocks lacking documented fields, and adding test-only methods to production code. These flawed testing practices undermine software quality by creating fragile tests that do not validate actual dependencies.

How do I align mocking practices with test-driven development?

Align mocking practices with test-driven development by validating dependencies before mocking them. Ensure mocks mirror complete real data structures, targeting only slow or external parts, which keeps testing a first-class activity and prevents flawed tests from undermining your test-driven development workflow.

When should I not use mocks in my test suite?

You should not use mocks when verifying real behavior or validating internal dependencies. Mocks should target only slow or external parts of the system, ensuring mocks reflect complete real data structures and documented fields rather than mocking behavior that should be tested directly.

Does this testing anti-patterns skill support code review workflows?

Yes, this skill supports code review workflows by applying gate checks during test creation and when modifying mocks or adding test utilities. It enforces production code integrity and prevents flawed tests, ensuring quality assurance standards are met during reviews.