effect-testing-runtime
Skill1 starsChanged 6 months agoMITView on GitHub
Use when testing or verifying Effect code in Theseus, including Effect.runPromise boundaries, test layers, fake services, deterministic time, config providers, stream/fiber tests, and runtime edge behavior.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-self-checkSkill
- biome-grit-rulesSkill
- biome-toolingSkill
- bun-testSkill
- bun-workspaceSkill
- cleanup-auditSkill
- code-reviewSkill
- dispatch-satelliteSkill
- docs-managementSkill
- docs-readingSkill
- effect-concurrency-lifecycleSkill
- effect-errors-schemaSkill
- effect-observability-timeSkill
- effect-services-layersSkill
- effect-v4Skill
- jsx-md-authoringSkill
- monorepo-maintenanceSkill
- refactoring-disciplineSkill
- roadmap-managementSkill
- runtime-engineSkill
- server-runtimeSkill
- testing-patternsSkill
- theseus-designSkill
- tool-authoringSkill
- typescript-strictSkill
- ui-layout-disciplineSkill
- theseus-designSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
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
- Distinctive: line 8
Use this skill for testing Effect programs and deciding where effects are run.
- Very specific: line 10
Use the bun-test skill for Bun test runner APIs and the testing-patterns skill for repo-level test placement.
- Distinctive: line 14
Run effects at process, test, or script edges.
- Very specific: line 15
Do not call Effect.runPromise or Effect.runSync inside services or domain functions.
- Distinctive: line 33
Prefer test layers and fake services over global mutation.
- Distinctive: line 34
Use deterministic services for time, randomness, IDs, storage, language models, and config.
- Very specific: line 35
Use ConfigProvider when config should come from a map/object rather than the process environment.
- Distinctive: line 36
Keep typed expected failures in the error channel when that is the contract being tested.
- Distinctive: line 37
Test defects separately from expected domain failures.
- Very specific: line 43
Do not hide timing problems with sleeps.
- Distinctive: line 44
When testing time-based behavior, verify local Effect test-clock APIs before using them.
- Distinctive: line 52
Should the package-local test run be enough, or did public signatures require root typecheck?
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Effect Testing And Runtime
Use this skill for testing Effect programs and deciding where effects are run.
Use the bun-test skill for Bun test runner APIs and the testing-patterns skill for repo-level test placement.
Runtime Boundary
- Run effects at process, test, or script edges.
- Do not call
Effect.runPromiseorEffect.runSyncinside services or domain functions. - In tests, build the program, provide test layers, then run it at the test boundary.
import { Effect } from "effect"
import { expect, test } from "bun:test"
test("returns user", async () => {
const result = await Effect.runPromise(
Users.find("user-1").pipe(Effect.provide(UsersTestLive)),
)
expect(result.id).toBe("user-1")
})Test Services
- Prefer test layers and fake services over global mutation.
- Use deterministic services for time, randomness, IDs, storage, language models, and config.
- Use
ConfigProviderwhen config should come from a map/object rather than the process environment. - Keep typed expected failures in the error channel when that is the contract being tested.
- Test defects separately from expected domain failures.
Concurrent And Streaming Tests
- For streams, test completion semantics as well as emitted values.
- For background fibers, test interruption or shutdown behavior.
- Do not hide timing problems with sleeps; use deterministic signals such as
Deferred, queue events, or test clocks when available. - When testing time-based behavior, verify local Effect test-clock APIs before using them.
Checks
- Is the effect run only at the test boundary?
- Are all required services provided intentionally?
- Does the test assert typed failures rather than stringified defects?
- Does the test prove shutdown/completion for fibers, queues, and streams?
- Should the package-local test run be enough, or did public signatures require root typecheck?
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.

