# testing-anti-patterns

> Claude/Codex skill by [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 1.4k stars · Updated 2026-06-02

Reviews test code to identify and fix common testing anti-patterns including flaky tests, over-mocking, brittle assertions, test interdependency, and hidden test logic. Flags bad patterns, explains the specific defect, and provides corrected implementations. Use when reviewing test code, debugging intermittent or unreliable test failures, or when the user mentions flaky tests, test smells, brittle tests, test isolation issues, mock overuse, slow tests, or test maintenance problems.

Tags: testing, anti-patterns, quality, code-smells, agent-skills, agentskills, ai, cli, codex, cursor, gemini, opencode, skills

## Install

```sh
git clone https://github.com/rohitg00/skillkit /tmp/skillkit && ln -s /tmp/skillkit/packages/core/src/methodology/packs/testing/anti-patterns ~/.claude/skills/testing-anti-patterns
```

## From README

Testing Anti-Patterns You are identifying and avoiding common testing anti-patterns. Review Workflow Follow these steps when reviewing test code: Run tests in isolation — Verify each test passes independently (no shared state, no ordering dependency). Check for patterns below — Scan for each anti-pattern in the checklist; flag every match with the specific defect. Apply refactoring strategy — Use the refactoring strategies section to select and apply the appropriate fix. Verify the test still fails when code breaks — After fixing, confirm the corrected test catches real regressions (remove or stub the implementation to confirm a failure occurs). Critical Anti-Patterns The Liar - Tests That Always Pass Problem: Test passes even when the code is broken. Detection: Remove or break the implementation - test should fail. The Giant - Tests Too Large Problem: Single test covers too many behaviors. Fix: One test, one logical assertion concept.

## Links

- HTML page: https://omgskills.com/skills/rohitg00/skillkit/packages/core/src/methodology/packs/testing/anti-patterns/
- GitHub: https://github.com/rohitg00/skillkit
- Author: [@rohitg00](https://omgskills.com/library/rohitg00/index.md)

## More from this repo

- [design-first](https://omgskills.com/skills/rohitg00/skillkit/packages/core/src/methodology/packs/planning/design-first/index.md) — Guides the creation of technical design documents before writing code, producing architecture diagrams, data models,...
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 1.4k stars
- [find-skills](https://omgskills.com/skills/rohitg00/skillkit/skills/find-skills/index.md) — Discovers, searches, and installs skills from multiple AI agent skill marketplaces (400K+ skills) using the SkillKit...
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 1.4k stars
- [handoff-protocols](https://omgskills.com/skills/rohitg00/skillkit/packages/core/src/methodology/packs/collaboration/handoff-protocols/index.md) — Manages work transitions between team members or agents by creating structured handoff documents, summarizing project...
   - [@rohitg00](https://omgskills.com/library/rohitg00/index.md) · 1.4k stars
