test-anti-patterns

Audits existing test code for anti-patterns and produces severity-ranked findings with concrete fixes.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill test-anti-patterns-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-anti-patterns
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/test-anti-patterns
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill test-anti-patterns-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test suites often contain hidden quality issues — tests with no assertions, swallowed exceptions, flakiness from sleeps and wall-clock reads, or ordering dependencies — that give false confidence and erode trust in CI results. This Skill systematically audits existing test code and reports exactly what is wrong, where, and how to fix it. ## Core Features & Use Cases - Polyglot anti-pattern detection: Covers .NET (MSTest/xUnit/NUnit/TUnit), Python (pytest/unittest), JS/TS (Jest/Vitest/Mocha), Java (JUnit/TestNG), Go, Ruby, Rust, Swift, Kotlin, PowerShell (Pester), and C++ (GoogleTest/Catch2), with language-specific guidance loaded via extension files. - Severity-ranked reporting: Findings are grouped into Critical, High, Medium, and Low tiers with file/method/line locations and concrete before/after fixes, plus positive observations about what the tests do well. - Honest calibration: Built-in rules prevent false positives on idiomatic patterns like Go table-driven tests, pytest bare asserts, and distinct boundary-condition tests. - Use Case: Ask for an audit of a flaky pytest suite and receive a report flagging un-awaited async assertions as Critical, time.sleep synchronization as High, and magic values as Medium, each with a targeted fix. ## Quick Start Audit the test files in my project's tests directory for anti-patterns and rank the findings by severity.

Frequently Asked Questions about test-anti-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit my test code for anti-patterns?

Point the audit at your test files or directory and it scans for issues like missing assertions, swallowed exceptions, flakiness, and ordering dependencies. Findings are returned grouped by severity with specific locations and concrete fixes.

What test frameworks does test anti-pattern detection support?

It supports .NET (MSTest, xUnit, NUnit, TUnit), Python (pytest, unittest), JS/TS (Jest, Vitest, Mocha), Java (JUnit, TestNG), Go, Ruby (RSpec, Minitest), Rust, Swift, Kotlin, PowerShell (Pester), and C++ (GoogleTest, Catch2).

Can it detect flaky tests caused by sleeps and Date.now?

Yes, flakiness indicators are a High-severity category covering wall-clock sleeps like Thread.Sleep and time.sleep, unabstracted clock reads like DateTime.Now and Date.now, unseeded randomness, and environment-dependent paths.

When should I not use a test anti-pattern audit?

Do not use it for writing new tests, running tests, measuring code coverage, or migrating between test frameworks. It is a diagnostic review of existing tests, not a test generation or execution tool.

Why does the audit not flag Go table-driven tests as a smell?

Go and Rust table-driven loops with sub-tests are idiomatic patterns, not conditional test logic, so calibration rules explicitly exclude them. The same applies to pytest bare asserts and Go's if got != want equality checks.