testing-anti-patterns
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.
npx skills add rohitg00/skillkit --skill anti-patterns --agent codex
Same command for any agent — swap --agent for claude-code, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Testing Anti-Patterns You are identifying and avoiding common testing anti-patterns. ## Review Workflow Follow these steps when reviewing test code: 1. **Run tests in isolation** — Verify each test passes independently (no shared state, no ordering dependency). 2. **Check for patterns below** — Scan for each anti-pattern in the checklist; flag every match with the specific defect. 3. **Apply refactoring strategy** — Use the refactoring strategies section to select and apply the appropriate fix. 4. **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 ### 1. The Liar - Tests That Always Pass **Problem:** Test passes even when the code is broken. ```typescript // BAD - Always passes because it tests nothing meaningful it('should process data', () => { const result = processData(input); expect(result).toBeDefined(); // Too weak }); // GOOD - Actually verifies behavior it('should transform input to uppercase', () => { const result = processData({ text: 'hello' }); expect(result.text).toBe('HELLO'); }); ``` **Detection:** Remove or b
- Review Workflow
- Critical Anti-Patterns
- 1. The Liar - Tests That Always Pass
- 2. The Giant - Tests Too Large
- 3. The Inspector - Testing Implementation Details
- 4. The Mockery - Over-Mocking
- 5. The Flaky Test - Random Failures
- 6. The Slow Poke - Unnecessarily Slow Tests
- 7. The Chain Gang - Test Dependency
- 8. The Secret Catcher - Hidden Test Logic
- Anti-Pattern Detection Checklist
- Refactoring Strategies
- When to Delete Tests
What does the testing-anti-patterns skill do?
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.
How do I install it?
Run `npx skills add rohitg00/skillkit --skill anti-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From rohitg00/skillkit, a repository with 1,422 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.