Route Apple-platform testing tasks to the correct Knowledge Contracts -- XCTestCase subclassing with test-prefixed methods and the per-test setUp()/setUpWithError()/tearDown()/tearDownWithError() lifecycle plus the XCTAssert family and XCTSkip/XCTSkipIf/XCTSkipUnless; the Swift Testing framework's @Test/#expect/#require/@Suite/Tag vocabulary; @Test(arguments:) parameterization (single-collection, two-collection Cartesian product, zip-paired) and async throws test functions in both frameworks; XCUIApplication/XCUIElement UI testing with identifier-based lookup; and XCTestExpectation for callback-based async code with no async/await entry point. Use when writing class Foo: XCTestCase, func test..., override func setUp()/setUpWithError()/tearDown()/tearDownWithError(), XCTAssertEqual/XCTAssertTrue/XCTAssertNil/XCTAssertThrowsError, XCTSkip/XCTSkipIf/XCTSkipUnless, import Testing, @Test, @Suite, #expect(_:), #require(_:), .tags(_:), @Test(arguments:), zip(...) inside @Test(arguments:), async throws test methods, XCUIApplication(), .launch(), continueAfterFailure, app.buttons["..."], .tap(), .typeText(_:), .waitForExistence(timeout:), XCTestExpectation, expectation(description:), .fulfill(), or await fulfillment(of:timeout:). v1 covers only XCTest, Swift Testing, and XCUITest as described -- no performance testing (measure { }, XCTMetric, XCTClockMetric), no Xcode Test Plans or code coverage configuration, no third-party snapshot testing, no UI test recording, no mocking/dependency-injection/test-double patterns, and no performAccessibilityAudit(). Triggers on XCTest, XCTestCase, XCTAssert, XCTSkip, Swift Testing, @Test, #expect, #require, @Suite, Tag, parameterized test, XCUITest, XCUIApplication, XCUIElement, accessibilityIdentifier, XCTestExpectation, fulfillment.
Testing patterns for behavior-driven tests. Use when writing tests, creating test factories, structuring test files, or deciding what to test. Do NOT use for UI-specific testing (see front-end-testing or react-testing skills).
IMPORTANT: load BEFORE planning, writing or changing code in a repository that has tests - features, bug fixes and refactors too, not only requests that mention tests - and before writing a plan's Tests or Verification section. Makes a green run mean the real thing works: real code before fakes, recorded live data before hand-written mocks or fake responses, live drift checks, red/green, mutation checks, and no personal data in test data or output. Also use when (1) writing, fixing, reviewing or deleting tests, coverage or TDD; (2) mock, patch, monkeypatch, fake sessions or responses, VCR, cassettes or snapshots come up; (3) code calls an external service or API (Canvas, LADOK, SharePoint, GitHub, an LLM, a database), or you probe one by hand to check a change; (4) tests are flaky, pass while the code is broken, or break on every refactor; (5) test data or output may hold names, emails, personnummer or tokens. Pytest-centred; covers literate (.nw) projects.
Use before you implement a feature, a behaviour change, or a bug fix, before you plan, write, change, port, or remove a test, when a plan, a review, or a brief asks for a test, when a test fails or flakes, when you update a snapshot or an expected value, when a test would sleep, retry, assert elapsed time, or read docs, plans, agent rules, or workflow YAML, when you add a browser spec or a test for each input, host, or platform, and when the user asks to audit tests or cut test time.
Write tests red → green, one slice at a time, at agreed seams. Use when building a feature or fixing a bug test-first, or when another skill needs code driven by tests.
Use when adding, changing, reviewing, debugging, or validating tests; when fixing bugs; when refactoring behavior; or when changing CI, fixtures, snapshots, schemas, generated outputs, test commands, or test infrastructure.
Testing strategy and coverage requirements — component-specific testing approaches, test types, coverage targets, and test organization. Use when planning test strategy, determining what types of tests to write, setting coverage goals, organizing test projects, or deciding between unit vs integration tests. Platform, language, and architecture agnostic — does not assume any specific architectural pattern or layering model.
Write and review tests that match this project's conventions, or do test-first development (TDD). Use when adding tests, asked to "test" a feature/endpoint/module, reproducing a bug with a test, or reviewing test quality. This is the central entry point for any testing in the repo; it routes to framework-specific guidance. Say "FastAPI testing" (or work on an API route / endpoint) to load the FastAPI conventions, "Playwright" or "acceptance / e2e tests" for the browser acceptance-testing conventions, or "R package testing" (testthat) for the R conventions.
Expert in creating comprehensive pytest test suites for Drift project with strict 90%+ coverage requirements. Specializes in unit tests, integration tests, mocking external APIs (Anthropic, AWS Bedrock), and coverage validation using pytest-cov. Use when writing tests, test fixtures, validating test coverage, or implementing mocking strategies for external dependencies.
Paste this prompt into any AI assistant — Claude, ChatGPT, Gemini, Copilot, or others.]
# Test Suite Generator
You are an expert software testing engineer specializing in generating comprehensive, maintainable test suites
Test-writing procedure: order, mocks, regression naming. Use when writing or expanding tests, not because testing.mdc is on. Produces the verifying test for this change; does not authorize unrelated refactors.
Write tests that catch real regressions — choosing what to test, structuring tests, testing behavior over implementation, handling databases and async, and killing flakiness. Use when adding or improving tests, setting up a test for a bug fix or new feature, deciding what to cover, or dealing with flaky/slow tests. Stack: vitest, `pnpm test`.
Writes, fixes and reviews tests for TypeScript and JavaScript projects, which means vitest unit and DOM tests, Playwright end-to-end specs, coverage thresholds, regression tests that reproduce the bug state, and tests of Cloudflare Workers code on real bindings. Use when adding or fixing a test, a coverage gate is red, a spec is flaky or fails in CI, a bug fix needs its regression test, a test passes but you doubt it can fail, or asked "how do we test this". Not for Go tests (go-dev), Lighthouse audits or manual QA scripts.
Pick the right PostgreSQL test flavor for a core / contrib patch — covers pg_regress .sql / .out pairs, isolationtester specs and permutations for concurrency / deadlock races, TAP (PostgreSQL::Test::Cluster) for multi-node and pg_basebackup / replication / recovery scenarios, and src/test/modules for in-tree C test modules. Spans where test files live, how to wire them into the right schedule / meson.build, and how to run a single test fast (REGRESS_OPTS, --temp-instance, PROVE_FLAGS). Use whenever adding tests to a PG patch, reviewing a patch's test coverage, picking between regress / isolation / TAP for a new feature, debugging a regression diff, or asked "where should the test for X live". Skip for pytest / unittest / Jest / Vitest / Mocha / RSpec / JUnit / Go testing / Rust cargo-test app testing, pgbench / sysbench / HammerDB performance benchmarking, end-to-end / Selenium / Playwright web testing, and load / stress testing of production PG.
Testing strategy, patterns, and evaluation for software and LLM/AI systems. Use when: writing tests, choosing test boundaries, designing test data, structuring test suites, evaluating LLM outputs, building evaluation pipelines, setting coverage thresholds, auditing test coverage gaps in existing projects, or improving test quality and structure.
Testing standards for TypeScript and Effect projects using Bun and Vitest. Use when adding, reviewing, reorganizing, or improving tests, fixing regressions, increasing meaningful coverage, designing fixtures or test doubles, or verifying application behaviour.
Write, repair, debug, audit or delete automated tests. Use when adding coverage for new behavior, writing a regression test for a defect, fixing a failing or flaky test, choosing the right test level, or auditing a suite's quality. Not for explaining what an existing test does, and not for running a suite as a routine verification step.
Use when writing or reviewing Go tests for a service, choosing test doubles, testing database code, timeouts, retries or HTTP wiring, or adding fuzz tests and benchmarks. Covers table tests with t.Run, hand-written fakes over consumer-side interfaces, real Postgres instead of sqlmock, testing/synctest for time, end-to-end tests through run(), fuzzing parsers, b.Loop benchmarks with benchstat, and t.Context.
Use when writing or reviewing Java tests (JUnit, Mockito, @SpringBootTest, Testcontainers), choosing H2 or a real database for repository tests, testing code that reads the time or waits, splitting fast and slow tests (surefire, failsafe), fixing flaky or order-dependent tests, or seeing "A Java agent has been loaded dynamically". Key rule: JUnit 6 (junit-jupiter.version 6.1.3 over Spring Boot 4.1.1's 6.0.3) and Testcontainers 2 (testcontainers-postgresql, org.testcontainers.postgresql.PostgreSQLContainer); repository tests on the production engine and version (postgres:17), never H2 or a mocked repository; static @Container @ServiceConnection in Spring Boot tests; inject java.time.Clock and use Clock.fixed, never Thread.sleep; each test owns its data, no @TestMethodOrder dependence; *Test in surefire without Docker, *IT in failsafe; Mockito as -javaagent via maven-dependency-plugin properties and argLine @{argLine} -javaagent:${org.mockito:mockito-core:jar}.
A folder with a SKILL.md file: a name, a description of when to use it, and instructions. Claude loads a skill only when the task matches its description.
How do I use one I find here?
Copy the folder into your project's .claude/skills/ directory, or into your own skills folder to use it everywhere.
What do the warnings mean?
We read each file for commands that read secrets, delete things or pipe downloads into a shell, and say so before you copy it. No warning is not a promise that a file is safe.
Which skills worked for people?
Open a skill to see its discussion. Reports from people and their agents are coming.