run-tests
Skill2 starsChanged 2 days agoMITView on GitHub
Picks the tests that prove a change, runs them at a low worker count, and says where each kind of test lives. Use while writing or fixing code, before clean-diff, and when a test fails.
53 other projects use a version of this.
Adopted by
Most recently taken up by
- vercel/next.jstheir own version, first seen Nov 29, 2026
- przemyslawkowalski-dashdevs/claude-code-setuptheir own version, first seen Nov 29, 2026
- tatsoft-llc/FrameworX-Projectstheir own version, first seen Nov 15, 2026
- wisterx-spec/agent-railstheir own version, first seen Nov 15, 2026
- utopia-rise/fmod-gdextensiontheir own version, first seen Nov 9, 2026
- Pubx-ai/skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use detect-static-dependencies, filter-syntax 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.
MicrosoftSkilldetect-static-dependencies
ACTIVATION PREREQUISITE: the request or discovered target must explicitly identify C#, .NET, `.cs`, or `.csproj`; otherwise stay dormant without invoking this skill. USE FOR: locating System.DateTime.Now/UtcNow, System.IO.File/Directory, System.Environment, HttpClient, Console, or Process usage in C#; auditing C# code for hard-to-test framework dependencies; or verifying those C# calls are already abstracted. DO NOT USE FOR: any target lacking the activation prerequisite; generating wrappers (use generate-testability-wrappers); migrating code (use migrate-static-to-wrapper); or general code review.
Also in 3 projects that use this
MicrosoftSkillfilter-syntax
Reference-only filter syntax for VSTest and MTP with MSTest, NUnit, xUnit v3, and TUnit. Load only after the platform/framework is known and a consumer needs to create or translate a filter. Do not load for unfiltered runs or platform detection. Used by run-tests and mtp-hot-reload; never invoke directly.
Also in 3 projects that use this
ShopifySkillprepare-release
Prepare the changeset-release/main branch for release by syncing version.ts files and running pnpm install
Also in 3 projects that use this
SentrySkillcreate-pr
Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.
Also in 5 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 4 projects that use this
- +7 more from microsoft
Other versions53 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 53
- vercel/next.js★ 144ksame name
- netbox-community/netbox★ 22ksame name
- yagop/node-telegram-bot-api★ 9.2ksame name
- gitextensions/gitextensions★ 8.6ksame name
- ethereum/consensus-specs★ 4ksame name
- dotnet/sdk★ 3.3ksame name
- ComplianceAsCode/content★ 2.9ksame name
- idaholab/moose★ 2.4ksame name
- CliMA/Oceananigans.jl★ 1.5ksame name
- serenedb/serenedb★ 1.1ksame name
43 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 repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-chainSkill
- add-mcp-toolSkill
- add-migrationSkill
- add-protocol-operationSkill
- add-venueSkill
- clean-diffSkill
- debug-failureSkill
- handle-security-reportSkill
- releaseSkill
- review-diffSkill
- review-money-pathSkill
- review-testsSkill
- shape-commitSkill
- speed-up-testsSkill
- test-telegramSkill
- tune-ciSkill
- vet-releaseSkill
- write-adrSkill
- binference-toolsSkill
- copy-tradingSkill
- dca-planSkill
- meme-huntingSkill
- safe-swapSkill
- token-due-diligenceSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.
0
Common
Most of the 48 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 54
Keep --maxWorkers=2 on a laptop that others share.
- Distinctive: line 85
Read the assertion and the first stack frame in our code.
- Very specific: line 90
Run the failing test, then its folder, then pnpm check once at the end.
- Very specific: line 95
No network (a refusing dispatcher is installed), no real timers, no sleeps, no polling.
- Very specific: line 97
No conditional tests or expects, no .only or .skip, every expect awaited.
“Common” is measured: kept by at least 6 in 10 of the 48 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
Run the tests
A change is proven by the cheapest test that would fail without it. Run that test while you work,
and the full pnpm check once, when the change is complete.
1. Know the kinds
| Kind | Where it lives | How it runs |
| Unit | <pkg>/src/**/<module>.test.ts, beside the code | pnpm vitest run <path> |
| Chinese | <module>.zh.test.ts: text a person reads in zh | pnpm vitest run <path> |
| Contract | src/contracts/<port>-contract.ts, one per port | from each adapter's own test |
| Property | <module>.property.test.ts, fast-check | pnpm vitest run <path> |
| End to end | src/e2e/: a real process or the composed engine | pnpm vitest run <path> |
| Fork | src/fork/: anvil on a fork of BSC | pnpm test:fork <path> |
| Crash | src/crash/: kills and restarts an engine | pnpm test:crash <path> |
| Image | src/image/: builds and runs the Docker image | pnpm test:image |
| Mutation | Stryker over engine and signer | CI only; never in a task's loop |
pnpm check and pnpm test skip the fork, crash and image folders. Those suites run each night in
CI. The image suite needs Docker; run it by hand, alone, after a change to the Dockerfile,
.dockerignore or how the binference package is built.
2. Pick the proof
- A pure function or a rule: a unit test in the module's own test file.
- A policy or amount module (
policy/*.ts,*amount*.ts): also a property test beside it;check:layoutfails without one. - A new port: a contract suite named
<port>Contract, exported from a*-contract.tsfile, and a hand-written fake insrc/fakes/whose test runs the suite. Every adapter's test runs it too.check:contract-suiteschecks both. - A fake in a test: use the package's
testingexport (@binference/<pkg>/testing), nevervi.mockin a pure package. - A wiring change across packages: a test in
packages/cli/src/compose/on the test composition. - A chain call, a venue's contract or a registry address: a fork test.
- A step between signing and receipt: a crash test.
- A bug: a test that fails on the old code for the reason the bug names. Keep the failing run for the pull request's evidence.
3. Run it
pnpm vitest run packages/engine/src/limits --maxWorkers=2
pnpm vitest run packages/engine/src/limits/limit-handlers.test.ts -t "<test name>"
pnpm test:fork plugins/kyberswap/src/fork
BINFERENCE_CRASH_RUNS=1 pnpm test:crash packages/cli/src/crash- Keep
--maxWorkers=2on a laptop that others share. One test command at a time; never two Vitest runs side by side. - A crash pass prints its runs per kill point, its kill points, its estimated time and its
results file in
reports/crash/, which gets each run's result as the run ends: read it while a long pass runs, or after one was stopped. A part estimated over 120 minutes is refused. After a change to a kill point's speed or a new kill point, refresh the times: run the changed file atBINFERENCE_CRASH_RUNS=1, thenpnpm crash:times reports/crash/<file>.jsonl. - The fork and crash suites need
anvilon thePATH. The fork suite also reads public BSC nodes, which refuse bursts for a while: a 403 there is the network, not your code. - A test command that runs past a minute is a finding. Stop it and find out why before running it
again (see
speed-up-tests).
4. After a merge
The merger runs the after-merge set on master after each merge:
pnpm test:after-merge # what the last merge brought, ORIG_HEAD..HEAD
pnpm test:after-merge master@{1}..master
pnpm test:after-merge <base>..<head> --listIt runs the tests of every package the range changed and of every package that depends on one, the
table tests that read every notice key, card key and reason code (a key added without its rows in
another package's table fails only here), the repo checks two merged branches can break together, on
half the cores, and check:gates when a gate's script or config changed. --list prints what it
chose and why without running it. A new test that reads a whole catalog of another package joins its
list in scripts/after-merge/after-merge-plan.mts.
5. When a test fails
- Read the assertion and the first stack frame in our code. Run that one test alone.
- Decide which side is wrong: the code, the test, a fake that drifted from its contract, or the machine. A test that passes alone and fails in the full run leaves state behind: files share their worker's modules, so a stub or a global must come back after each test.
- Fix the cause. Never add a retry, a longer timeout, a sleep or a looser assertion to get green.
- Run the failing test, then its folder, then
pnpm checkonce at the end.
6. Rules every test keeps
- Names are sentences in lowercase with no period:
rejects a swap above the daily cap. - No network (a refusing dispatcher is installed), no real timers, no sleeps, no polling. Time
comes from a fake
Clock. - No conditional tests or expects, no
.onlyor.skip, everyexpectawaited. - The 30-second test timeout catches a hang. Never raise it for a slow test; make the test faster.
7. Report
Name the tests you added or changed, the commands you ran and what they showed.
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.

