testing
Skill8 starsChanged 4 months agoMITView on GitHub
Strategy and rules for writing or improving automated tests. Use when adding tests, improving coverage, fixing flaky tests, setting up a test suite, or deciding what and how to test. Emphasizes deterministic tests, testing behavior over implementation, and a tight validation loop. For diagnosing production failures whose cause is unknown, use the debugging skill. Once the cause is identified, bug-fix returns here for the regression test.
123 other projects use a version of this.
Adopted by
Most recently taken up by
- timmo001/skillstheir own version, first seen Oct 5, 2026
- kortix-ai/sunatheir own version, first seen Oct 5, 2026
- gilsmt/skillstheir own version, first seen Oct 4, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- JetBrains/intellij-communitytheir own version, first seen Oct 3, 2026
- shinpr/codex-workflowstheir own version, first seen Oct 2, 2026
Used with
Projects with it also use oss-pr, pr-automation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
ffsshhttiikkSkillcicd
Continuous integration and delivery pipelines
Also in 4 projects that use this
ffsshhttiikkSkillnetworking
Practical application and coding skills for Networking
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 9 projects that use this
Cogni-AI-OUSkilldotfiles
Reference for repository dotfiles, including their purposes, standard configurations, and usage guidelines. You MUST load this skill when configuring, troubleshooting, or understanding repository dotfiles.
Also in 3 projects that use this
- +2 more from CES-Ltd
- +1 more from ffsshhttiikk
Other versions123 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 123
- lobehub/lobehub★ 83ksame name
- iOfficeAI/AionUi★ 33ksame name
- JetBrains/intellij-community★ 21ksame name
- kortix-ai/suna★ 20ksame name
- modelcontextprotocol/inspector★ 11ksame name
- microsoft/fast★ 9.7ksame name
- bytebase/dbhub★ 3.6ksame name
- theopenco/llmgateway★ 1.7ksame name
- BankrBot/skills★ 1.2ksame name
- microsoft/CCF★ 875same name
113 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- architecture-reviewSkill
- bug-fixSkill
- code-quality-reviewSkill
- debuggingSkill
- infra-designSkill
- security-auditSkill
- terraform-reviewSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 10 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 105 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Write tests that fail for exactly one reason, pass deterministically, and survive refactoring.
- Distinctive: line 21
Test observable behavior and contracts, not implementation details.
- Very specific: line 23
Every bug fix gets a regression test (see the bug-fix skill).
- Distinctive: line 24
Follow the project's existing test framework, directory layout, naming, and assertion style — do not introduce a new test framework into a …
- Distinctive: line 28
No hidden dependencies on wall-clock time, timezones, locale, random seeds, network, or test execution order.
- Very specific: line 30
Treat flaky tests as defects in the test suite: find the nondeterminism instead of masking it with retries or sleeps.
- Distinctive: line 34
Never test against a development, staging, or production database.
- Distinctive: line 37
Never share a test database between parallel test runs unless the project explicitly supports it.
- Distinctive: line 44
Prefer real collaborators inside the process.
- Distinctive: line 45
Keep test data minimal and meaningful — only include fields the behavior depends on.
- Distinctive: line 46
Prefer the project's existing factories or fixtures over handwritten setup such as raw SQL.
- Distinctive: line 52
Do not weaken or rewrite an existing test simply to make it pass.
“Common” is measured: kept by at least 6 in 10 of the 105 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing
Write tests that fail for exactly one reason, pass deterministically, and survive refactoring.
Scope
Use for deciding what to test and writing it: new tests, coverage gaps, flaky tests, test structure, setting up a suite.
Do not use for:
- Diagnosing why production code misbehaves when the cause is unknown — use
debugging. Once the cause is identified,bug-fixreturns here for the regression test. - Judging non-test production code — use
code-quality-review.
What to test
- Test observable behavior and contracts, not implementation details. A refactor that preserves behavior should not break tests.
- Prioritize by risk: core business logic and boundary conditions first, then error paths, then integration seams. Do not chase coverage numbers for trivial code (getters, framework glue).
- Every bug fix gets a regression test (see the
bug-fixskill). - Follow the project's existing test framework, directory layout, naming, and assertion style — do not introduce a new test framework into a project that has one.
Determinism
- No hidden dependencies on wall-clock time, timezones, locale, random seeds, network, or test execution order. Inject clocks, seed randomness, and fake external services at the boundary.
- Each test owns its setup and teardown; tests must pass in isolation and in any order.
- Treat flaky tests as defects in the test suite: find the nondeterminism instead of masking it with retries or sleeps. If the nondeterminism turns out to be in the production code rather than the test, hand off to
debugging.
Databases and external state
- Never test against a development, staging, or production database. Use the project's test database, or add a disposable one (container or in-process instance) if none exists.
- Assert in global setup that the target is the test database; never let a missing test configuration fall back to the default database.
- Reset between tests — transaction rollback, truncation, or a fresh schema. Never rely on data left by another test or manual seeding.
- Never share a test database between parallel test runs unless the project explicitly supports it.
- Apply the same isolation rules to caches, queues, object storage, and search indexes — use isolated instances or per-test namespaces.
Structure
- One behavior per test; name the test after the behavior and expected outcome, following the project's naming convention.
- Arrange–Act–Assert (or Given–When–Then), kept visually distinct.
- Prefer real collaborators inside the process; mock only at process or network boundaries. Heavy mocking usually signals the unit under test is doing too much.
- Keep test data minimal and meaningful — only include fields the behavior depends on.
- Prefer the project's existing factories or fixtures over handwritten setup such as raw SQL.
Validation loop
- While developing, run only the affected test file or case; run the broader relevant suite before declaring the work done.
- Confirm a new test fails for the expected reason before relying on it.
- Do not weaken or rewrite an existing test simply to make it pass. Fix the production code unless the test itself is incorrect.
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.

