testing
Skill1 starsChanged 25 days agoMITView on GitHub
Write and organise tests. Use whenever writing, changing or reviewing tests, fixing a bug, or choosing the acceptance tests for a spec. Two levels: unit tests on the pure core, integration tests through the real entry point with fakes only at the I/O edge; no end-to-end tests against live services. Every test must be able to fail and must pass on a clean checkout.
194 other projects use a version of this.
Adopted by
Most recently taken up by
- realsenseai/librealsensetheir own version, first seen Nov 16, 2026
- maideps/ai-harness-frameworktheir own version, first seen Nov 16, 2026
- FAHTHIZ/oasistheir own version, first seen Nov 16, 2026
- fatihkan/baditheir own version, first seen Nov 16, 2026
- magnusrodseth/dotfilestheir own version, first seen Nov 16, 2026
- skillberry-ai/cap-evolvetheir own version, first seen Nov 15, 2026
Used with
Projects with it also use bundle-dependency-prs, update-library-template 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.
MicrosoftSkillbundle-dependency-prs
Fix broken dependency update PRs and aggregate the ones that work into one PR.
Also in 7 projects that use this
MicrosoftSkillupdate-library-template
Merges the latest Library.Template into this repo (at position of HEAD) and resolves conflicts.
Also in 7 projects that use this
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Dev environment setup for Megatron Bridge — container-based development, uv package management, lockfile regeneration, adding dependencies, Slurm container usage, and common build pitfalls.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobe-chat★ 86ksame name
- lobehub/lobehub★ 86ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 33ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
184 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 repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- clarify-firstSkill
- coding-standardsSkill
- dependency-safetySkill
- docs-maintenanceSkill
- lean-contextSkill
- security-advisoriesSkill
- spec-writingSkill
- writing-claude-mdSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 175 edited versions we read keep these.
5
Distinctive
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 28
No end-to-end tests: none that touch live services, deployed systems, real accounts or paid APIs.
- Distinctive: line 38
Never mock the repo's own modules.
- Distinctive: line 40
Prefer in-memory fakes and recorded responses to mock objects.
- Distinctive: line 47
Watch it fail first: Write the test before the code and run it: it must fail for the right reason.
- Very specific: line 52
Derive expected values independently: Write the arithmetic in the test (1000 + 300 - 75 - 100) or use a hand-checked worked example.
- Distinctive: line 57
A clean checkout passes the suite: Never read gitignored, hand-kept or live data, the network or the clock.
“Common” is measured: kept by at least 6 in 10 of the 175 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
Levels
| Level | Covers | Test doubles |
| Unit | Functions of the pure core: examples, edge cases, properties. | None needed. |
| Integration | Units wired together, driven through the real entry point (CLI in-process or as a subprocess, public API, pipeline stage) on committed fixtures. | Fakes or recorded responses at the I/O edge only (see below). Real filesystem in a temp dir. |
- Logic, branches and edge cases go in unit tests; most tests live there.
- Laws an API must keep (round-trip, idempotence, ordering, conservation) become property-based tests (Hypothesis in Python) alongside examples.
- A change to what an entry point accepts or does (a command, flag, step or output) gets an integration test that reaches it from the entry point. Test there what only the wiring can break: parsing, step order, what is written or printed, exit codes, errors crossing modules. Don't re-test the units' branches.
- A bug fix gets a test at the lowest level that reproduces it.
- No end-to-end tests: none that touch live services, deployed systems, real accounts or paid APIs. They cost money, flake, and can't run on a clean checkout. A check against real data is a script, or a test that skips with a reason when the data is absent and has an offline counterpart.
Test doubles
- Fake only the I/O edge: network, paid APIs, clock, randomness, and local tools the suite can't assume are installed (feed their recorded output). Tools it can assume, like git, run for real in a temp dir; set environment variables per test.
- Never mock the repo's own modules. Code that is hard to test without mocking them has logic in the shell; move it into the core.
- Prefer in-memory fakes and recorded responses to mock objects. Assert on outcomes, not on which methods were called.
- A recorded response is a real one captured once, trimmed and scrubbed of secrets, and committed.
Every test
- Watch it fail first. Write the test before the code and run it: it must fail for the right reason. For a bug fix, revert the fix once and see the test fail; for code that already works, break the behaviour once, see the test fail, restore.
- Test behaviour. Assert what a caller can observe (return values, CLI output, files written), not private helpers or the wording of prompts and docs.
- Derive expected values independently. Write the arithmetic in the test
(
1000 + 300 - 75 - 100) or use a hand-checked worked example; never compute the expectation with the code under test or copy numbers from a run. - No tests that cannot fail:
is not Noneor type-only asserts, a pure function called twice to prove determinism. - A clean checkout passes the suite. Never read gitignored, hand-kept or live data, the network or the clock; use committed fixtures.
- One behaviour per test, named for it (
test_merge_keeps_newest_entry); use table-driven cases (pytest'sparametrize) rather than a loop. - Layout follows the repo. Where there is none, keep integration tests in their own directory so each level can run alone.
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.

