testing-anti-patterns

testing-anti-patterns is a skill for Claude Code, Codex from rohitg00/skillkit. It costs 95 tokens per session (1,997 once invoked), scanned A, original, Apache-2.0.

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

Written for no agent in particular: nothing here depends on one.

Good fit It helps review tests, run them independently, identify the specific defect, refactor the test, and check that it catches real regressions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rohitg00/skillkit/anti-patterns
About the project

SkillKit is a package manager for AI coding-agent skills that installs skills from many sources and translates them between the different formats used by coding agents. It helps developers share skills across agents such as Claude Code, Cursor, Copilot, and Codex.

rohitg00/skillkit · 1,556 stars · on GitHub · skillkit.sh

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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing-anti-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/rohitg00/skillkit/anti-patterns/github.svg)](https://agentmods.dev/skills/rohitg00/skillkit/anti-patterns)
Your own site
<a href="https://agentmods.dev/skills/rohitg00/skillkit/anti-patterns"><img src="https://agentmods.dev/badge/skills/rohitg00/skillkit/anti-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing-anti-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/rohitg00/skillkit/anti-patterns"><img src="https://agentmods.dev/badge/skills/rohitg00/skillkit/anti-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Data Exfiltration · line 176
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
How audits are shown
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.1 $0.00095 $0.01997
Opus 5.5 $0.00038 $0.00799
Sonnet 5.5 $0.00019 $0.00399
Haiku 4.5 $0.00010 $0.00200

Measured 1mo ago against content hash 296b4de35bb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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,556 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 95 tokens to every session and 1,997 once invoked, about $0.0004 per session on Opus 5.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

quality-gates

Expert knowledge in quality assurance gates, code quality standards, and automated checks. Use when enforcing quality standards.

sampleXbro/agentsmesh · 25 tokens

review

Skill "review" from AlanHuang168/AI-Project-Workflow, covering goal, use cases, preconditions, required context and inputs.

AlanHuang168/AI-Project-Workflow · 0 tokens

code-review

AI-powered code review and PR analysis. Performs systematic reviews covering security vulnerabilities, code quality, style compliance, architectural integrity, test coverage, and performance considerations. Works with PR diffs, commit ranges, file changes, or raw code snippets. Primary keyword clusters: AI code review…

JPeetz/agent-skills · 137 tokens

code-review

Use this skill to systematically review code changes for correctness, security, performance, maintainability, and test coverage. Activates after implementation, before merging, or when asked to review a pull request or code change. Produces a structured review report with findings categorized by severity.

karthikrshet/aiskills · 56 tokens

pytest-expert

Pytest fixtures, parametrize, mock/monkeypatch, async testing with pytest-asyncio, and coverage reporting.

Blazkojj/skillhub · 29 tokens

review-work

Post-implementation gate review: run manual QA on the real surface yourself, then launch ONE gate reviewer (never a panel) to audit goal, constraints, code quality, security, missed context, and QA evidence. Use before a PR handoff or when the user explicitly asks to review completed work.

code-yeongyu/lazycodex · 63 tokens