Testing Anti Patterns

Use to avoid critical testing mistakes. Five Iron Laws: Never test mock behavior, Never add test-only methods, Never mock without understanding, Always integration test, Always test error paths.

8 stars 3 forksTesting & QA Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add Freddy-CHEN-ux/00_claude_skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add Freddy-CHEN-ux/00_claude_skills --skill testing-anti-patterns
Manual install
git clone --depth 1 https://github.com/Freddy-CHEN-ux/00_claude_skills.git /tmp/00_claude_skills
mkdir -p ~/.claude/skills
cp -r /tmp/00_claude_skills/skills/testing-anti-patterns ~/.claude/skills/testing-anti-patterns

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Testing Anti-Patterns

## Core Principle

Avoid the five critical testing mistakes that undermine test value and create false confidence.

## When to Use This Skill

- Writing new tests
- Reviewing test code
- Debugging failing tests
- Test suite feels fragile
- Tests pass but bugs still occur
- Refactoring breaks many tests
- Unsure how to test something

## The Five Iron Laws

### 1. NEVER TEST MOCK BEHAVIOR

**If your test only verifies mock interactions, it tests nothing.**

```php
// ❌ BAD: Testing the mock, not the system
public function test_user_service_calls_repository()
{
    $mockRepo = $this->createMock(UserRepository::class);
    $mockRepo->expects($this->once())
             ->method('save')
             ->with($this->isInstanceOf(User::class));

    $service = new UserService($mockRepo);
    $service->createUser(['name' => 'John']);

    // This test passes if mock is called
    // But does the system actually work? Unknown!
}

// ✅ GOOD: Test actual behavior
public function test_user_service_creates_user()
{
    $service = new UserService(new UserRepository());
    $user = $service->createUser(['name' => 'John']);

    $this->assertDatabaseHas('users', ['name' => 'John']);
    $this->assertEquals('John', $user->name);
    // Tests actual system behavior, not mocks
}
```

### 2. NEVER ADD TEST-ONLY METHODS

**If code only exists for testing, your test is wrong.**
Read the full skill on GitHub

Details

Skill name
testing-anti-patterns
Path
skills/testing-anti-patterns/SKILL.md
Repo updated
10 January 2026

FAQ

What does the Testing Anti Patterns skill do?

Use to avoid critical testing mistakes. Five Iron Laws: Never test mock behavior, Never add test-only methods, Never mock without understanding, Always integration test, Always test error paths.

How do I install the Testing Anti Patterns skill?

Claude Code plugin: /plugin marketplace add Freddy-CHEN-ux/00_claude_skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Testing Anti Patterns popular?

It lives in Freddy-CHEN-ux/00_claude_skills, which has 8 GitHub stars and 3 forks.

Related skills

Add Integration

8

Freddy-CHEN-ux/00_claude_skills

Build a new API integration for Nexus. Load when user mentions "add integration", "new integration", "integrate with", "connect to [service]", or "build [service] integration". Interactive workflow that discovers API endpoints, plans the integration, and creates a project for implementation.

Software Development

AI Agents

8

Freddy-CHEN-ux/00_claude_skills

Production-grade AI agent patterns with MCP integration, agentic RAG, handoff orchestration, multi-layer guardrails, and observability (modern best practices)

AI, LLMs & Agents

AI LLM

8

Freddy-CHEN-ux/00_claude_skills

Production LLM engineering skill. Covers strategy selection (prompting vs RAG vs fine-tuning), dataset design, PEFT/LoRA, evaluation workflows, deployment handoff to inference serving, and lifecycle operations with cost/safety controls.

AI, LLMs & Agents

Testing Skills with Subagents

8

Freddy-CHEN-ux/00_claude_skills

Use to validate process documentation. Apply TDD to skill writing: RED (run without skill, document failures) → GREEN (write skill) → REFACTOR (close loopholes). Test under pressure: time constraints, sunk cost, exhaustion, authority.

Testing & QA

Testing

8

Freddy-CHEN-ux/00_claude_skills

Run tests before and after changes. Only add tests for complex logic, not boilerplate. Database tests matter most.

Testing & QA

To Tickets

5

vnovakovits/claude-skills

Break a plan, spec, grilling summary or conversation into a set of tracer-bullet tickets — thin, end-to-end slices that each work and can be demonstrated on their own — with explicit "blocked by" edges, so the work forms a dependency graph and anyone can pick up a ticket whose blockers are done. Covers vertical vs horizontal slicing (Hunt & Thomas's tracer bullets, Cockburn's Elephant Carpaccio, INVEST), prefactoring first ("make the change easy, then make the easy change"), sequencing a wide refactor as expand-migrate-contract (Parallel Change), sizing a ticket to one session and one pull req

Testing & QA

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.