testing-anti-patterns

A code-review skill for finding common problems in automated tests, such as tests that always pass, flaky tests, excessive mocking, and fragile checks.

In plain words
What is it for?
It helps review tests, run them independently, identify the specific defect, refactor the test, and check that it catches real regressions.
Why use it?
It helps ensure tests fail when the underlying code is broken and do not depend on order or shared state.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/rohitg00/skillkit/anti-patterns
Any agent
npx skills add rohitg00/skillkit --skill anti-patterns
Clone the repo
git clone --depth 1 https://github.com/rohitg00/skillkit

Made for: Claude Code, Codex.

Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,997 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00095 $0.01997
Opus 5 $0.00048 $0.00999
Sonnet 5 $0.00019 $0.00399
Haiku 4.5 $0.00010 $0.00200

Measured 2d ago against content hash 296b4de35bb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

testing-anti-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/core/src/methodology/packs/testing/anti-patterns/SKILL.md · 282 lines

How it starts

The opening of the file, as written. The whole thing — 282 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

// 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 break the implementation - test should fail.

2. The Giant - Tests Too Large

Problem: Single test covers too many behaviors.

// BAD - Tests multiple things
it('should handle user registration', async () => {
  const user = await register(userData);
  expect(user.id).toBeDefined();
  expect(user.email).toBe(userData.email);
  expect(user.password).toBeUndefined();
  expect(sendEmail).toHaveBeenCalled();
  expect(createProfile).toHaveBeenCalled();
  // ... 20 more assertions
});

// GOOD - Focused tests
it('should create user with provided email', async () => {
  const user = await register(userData);
  expect(user.email).toBe(userData.email);
});

it('should send welcome email on registration', async () => {
  await register(userData);
  expect(sendEmail).toHaveBeenCalledWith(
    expect.objectContaining({ type: 'welcome' })
  );
});

Read the full file on GitHub · 282 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 282 lines · 95 tokens per session scan A 296b4de35bb6

Subscribe to this mod's changes

testing-anti-patterns is a skill published in the GitHub repository rohitg00/skillkit (1,477 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,997 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

workflows-create

Create a durable Zapier workflow from natural language using @zapier/zapier-durable and the Zapier SDK CLI. Use when the user wants to build a Zapier workflow, create an automation, write a durable workflow, build me a Zap that, create a durable that, or automate a multi-step process involving Zapier-connected apps.

zapier/agent-skills · 73 tokens

workflows-modify

Modify and republish an existing durable workflow using the Zapier SDK experimental Code Workflows commands. Use when the user asks to fix my Zap, update my Zap, modify my workflow, repair this Zap, or edit a deployed Zapier workflow.

zapier/agent-skills · 54 tokens

workflows-list

List durable workflows in the authenticated Zapier account using the Zapier SDK experimental Code Workflows commands. Use when the user asks to list my Zaps, show my durable workflows, what workflows do I have, or see what Zapier workflows are deployed.

zapier/agent-skills · 55 tokens

workflows-history

Show run history for a specific durable workflow using the Zapier SDK experimental Code Workflows commands. Use when the user asks for run history, execution history, what happened with this Zap, or how a workflow fired.

zapier/agent-skills · 47 tokens

apple-cleanup

Exhaustive engineering hardening of an iOS app. Reviews for Swift 6 compliance, crash risks, App Store rejection risks, and tech debt; builds a surgical plan; dispatches parallel subagents to fix all P0-P2 issues; then pushes an alpha to TestFlight. Use for pre-submission cleanup and code hardening, not design polish.

markdavidgan/apple-dev-skills · 77 tokens

apple-review

Comprehensive Apple-grade review of an iOS app covering design (Apple design leader perspective), engineering (architecture and code quality), compliance (App Store rejection risks), and keynote readiness (product story and demo quality). Use when asked for a full app review, Apple-quality audit, design critique, HIG…

markdavidgan/apple-dev-skills · 88 tokens