agentsclimarketplace

Test speed

Skill Amey-Thakur/AI-SKILLS/skills/testing/test-speed

Keep the suite fast enough to run on every change by measuring the slow tests, shaping the pyramid, cutting IO from the fast tier, and sharding. Use when the suite is slow enough that developers skip it or batch changes to avoid the wait.From its SKILL.md

Install
npx -y skills add Amey-Thakur/AI-SKILLS --skill test-speed

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 23 days oldThe repository was created 23 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.7 KB, 582 tokens by cl100k_base, as published. Nobody here has run it

Test speed

A suite that takes twenty minutes stops being run. People push without it, batch unrelated changes to amortize the wait, and the fast feedback the suite exists to give quietly collapses. Speed is not vanity: it is what keeps testing inside the edit loop. Most slow suites are slow for a few measurable reasons, and the culprits are rarely the tests you would guess.

Method

  1. Measure before optimizing. Run pytest --durations=25, Go's -json timing, or Jest --verbose and sort. A handful of tests usually own most of the wall clock; fix those and ignore the fast majority.
  2. Shape the pyramid toward the fast tier. Where a unit test can cover a rule, delete the integration test that duplicates it and keep integration tests for the wiring only. To audit the current distribution, defer to test-pyramid-audit.
  3. Cut IO the fast tier does not verify. Replace a real database with an in-memory one or transactional rollback, swap sleep-and-poll for an injected clock, and stub network calls. A unit test that opens a socket is misfiled: move it or fake the boundary. For choosing those doubles, defer to test-doubles.
  4. Reuse expensive setup instead of rebuilding it. Start Testcontainers or a dev database once with scope="session", not per test, and reset data with fast truncation. A per-test container start is often the single largest line in the durations report.
  5. Run in parallel across cores. Turn on pytest -n auto (xdist), Go's default package parallelism, or Jest workers. This requires isolation to already hold, so fix order-dependence before expecting the gain.
  6. Shard across CI machines and cache the unchanging. Split the suite by timing across runners so total time drops toward the slowest shard, and reuse built Docker layers and warmed dependency caches so cold-start cost is not paid every run.

Checks

  • Does --durations show a flat tail rather than a few tests dominating?
  • Does the unit tier run with zero real network or disk access?
  • Does wall-clock time roughly halve when you double the workers?

Boundaries

Speed serves feedback: do not trade away coverage of real integration seams to hit a number, and keep a slower e2e stage for genuine end-to-end confidence. Micro-optimizing already-fast unit tests is wasted effort. What to cover at each tier is testing-strategy's call. A system that is simply slow to boot is an architecture problem this skill cannot paper over.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most test skills give in 582 tokens

Counted across 964 of the 1,571 authors here whose files we hold, read 2026-08-07

  • Close the browser when donein 55 of 964, across 12 files
  • Wait for network idle statein 51 of 964, across 6 files
  • Launch Chromium in headless modein 49 of 964, across 6 files
  • Use descriptive selectors for elementsin 49 of 964, across 6 files
  • Run provided scripts with help flag firstin 49 of 964, across 6 files
  • Add appropriate explicit waitsin 48 of 964, across 5 files
  • Use bundled scripts as black boxesin 46 of 964, across 3 files
  • Do not read script source codein 46 of 964, across 3 files
  • Use sync playwright for scriptsin 46 of 964, across 3 files
  • Inspect dom before executing actionsin 46 of 964, across 3 files
  • Run the full test suitein 37 of 964
  • Write the failing test firstin 29 of 964, across 23 files

Said here and by no other author read

  • measure durations before optimizing
  • delete duplicate tests by favoring the unit tier
  • cut IO from the fast tier
  • use in-memory databases over real ones
  • stub network calls
  • replace sleeps with an injected clock

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 326,851. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.