test-anti-patterns

Audits test files in any language for anti-patterns and produces severity-ranked quality reports.

Updated Jul 12, 2026
One-click install
npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill test-anti-patterns-patrick-rex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-anti-patterns
Source: https://github.com/Patrick-Rex/DotNetTechSamples/tree/main/.agents/plugins/dotnet-test/skills/test-anti-patterns
Command: npx skills add https://github.com/Patrick-Rex/DotNetTechSamples --skill test-anti-patterns-patrick-rex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test suites often contain tests that pass but verify nothing, are flaky, or are hard to maintain, giving teams false confidence in their code. This Skill audits existing test files across many languages and frameworks, detecting anti-patterns and reporting them ranked by severity so you know exactly what to fix first. ## Core Features & Use Cases - Severity-ranked detection: Finds Critical issues (no assertions, swallowed exceptions, self-referential assertions, missing await on async assertions), High issues (flakiness from Thread.Sleep, DateTime.Now, shared state, over-mocking), and Medium/Low issues (poor naming, magic values, duplicate tests). - Multi-language support: Works with .NET (xUnit/NUnit/MSTest), Python/pytest, TypeScript/Jest, Java/JUnit, Go, Ruby/RSpec, Rust, C++, and PowerShell/Pester via language-specific extension guidance. - Honest calibration: Avoids false positives by recognizing idiomatic patterns like Go table-driven tests and pytest bare asserts, and leads with positive observations when tests are well-written. - Use Case: Point the Skill at a flaky .NET test project and receive a report showing which tests use Thread.Sleep for synchronization, which assert nothing, and concrete before/after fixes prioritized by severity. ## Quick Start Ask the AI to audit the tests in your project directory for anti-patterns and report the findings ranked 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 find anti-patterns in my test suite?

Point the Skill at your test files or project directory and it scans for anti-patterns like missing assertions, swallowed exceptions, and flakiness indicators. Findings are grouped by severity (Critical, High, Medium, Low) with specific locations and concrete fixes.

What test frameworks does test anti-pattern detection support?

It supports xUnit, NUnit, and MSTest for .NET, pytest for Python, Jest for TypeScript, JUnit for Java, Go testing, RSpec for Ruby, Rust, Catch2/GoogleTest for C++, and Pester for PowerShell. Language-specific markers are loaded from extension files.

Can it detect flaky tests caused by Thread.Sleep or DateTime.Now?

Yes, flakiness indicators are a High-severity category. It flags wall-clock sleeps like Thread.Sleep and time.sleep, unabstracted clock reads like DateTime.Now, unseeded randomness, and shared mutable state across tests.

Does it flag Go table-driven tests or pytest bare asserts as problems?

No, the Skill explicitly calibrates against false positives. Go table-driven sub-tests, pytest bare asserts, and Go's if got != want pattern are recognized as idiomatic and are not flagged.

When should I not use test anti-pattern detection?

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