awesome-tests
Skill60 starsChanged 2 months agoMITView on GitHub
Writes, fixes, and reviews high-value, behavior-focused automated tests. Use this skill when the task is writing, improving, or repairing tests, reviewing test code or a test strategy, or diagnosing flaky, brittle, or false-green tests. Do not use for implementation plans or code reviews as a whole (even when they mention tests), production changes that involve no test work, just running an existing test command, manual exploratory QA, or general testing explanations.
In this repository8 other files it gives its agents.
- code-reviewSkill
- create-planSkill
- create-skillSkill
- create-slidesSkill
- create-wikiSkill
- generate-imageSkill
- implement-planSkill
- use-worktreesSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Write only high-value tests.
- Distinctive: line 24
Use the cheapest layer that can really observe the behavior, following the repository's conventions.
- Distinctive: line 25
Don't mock away the behavior under test.
- Distinctive: line 27
Read clearly: the name states behavior and condition, and setup shows intent.
- Distinctive: line 31
Don't edit production code unless asked.
- Very specific: line 39
Read references/test-quality-gates.md when choosing fixtures or doubles, testing UI or snapshots, or diagnosing flaky or false-green tests.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Awesome Tests
Write only high-value tests. Every test should protect behavior that matters to users, callers, or data. A test that exists for its own sake is maintenance cost with no protection. Don't add tests for niche edge cases or to push a coverage number.
What good tests do
- Assert observable outcomes through public contracts: return values and errors, persisted state, emitted events, rendered semantics, authorization decisions. Assert exact text, order, calls, or snapshots only when they are part of the contract.
- Fail on the bad behavior. The oracle must reject what would actually go wrong, not just execute the code or check that something exists.
- Use the cheapest layer that can really observe the behavior, following the repository's conventions. Move outward only when wiring, serialization, persistence, the browser, or a third party is the risk.
- Don't mock away the behavior under test. A test through mocks proves wiring, not compatibility with the real database, network, or provider.
- Stay deterministic and isolated: await all async work, wait on observable state instead of sleeping, control time, randomness, and environment where they matter, and clean up.
- Read clearly: the name states behavior and condition, and setup shows intent. Some repetition beats an abstraction that hides the expectations.
Counts, coverage percentages, mocks, snapshots, and test IDs are signals, not verdicts. When reviewing, ask what behavior a test uniquely protects and whether a cheaper, sturdier oracle exists before changing or deleting it.
Don't edit production code unless asked.
Prove the test can fail
A test that passes after a fix doesn't prove it protects anything. When safe, show it fails against the pre-fix or known-bad behavior. Otherwise make one small temporary break in a disposable copy or a test seam, then revert it fully. Never break owner work or production code just to prove this; if no safe option exists, say so.
Reference
Read references/test-quality-gates.md when choosing fixtures or doubles, testing UI or snapshots, or diagnosing flaky or false-green tests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

