effect-platform-layers
CommunityBuild portable Effect apps across runtimes.
Authormpsuesser
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill solves the confusion and brittleness that happens when an Effect application accidentally hard-codes platform-specific imports (Node vs Bun) inside business logic, making the codebase harder to reuse and test.
Core Features & Use Cases
- Clear platform boundary (“Golden Rule”): application code depends on abstract Effect services, while platform-specific wiring happens at entry points or adapter modules via
defaultLayer. - Node vs Bun runtime integration guidance: shows the correct
provide(NodeServices.layer | BunServices.layer)pattern with the matching runtime runner. - Layer composition and overriding: demonstrates how to merge multiple layers, add custom services, and override platform services in a predictable order for tests and applications.
- Mocking strategy for tests: emphasizes using mock abstract services (e.g.,
Layer.succeed/FileSystem.makeNoop) instead of importing platform modules during unit tests.
Quick Start
Use effect-platform-layers to restructure your app so domain/services import abstract services from effect, then wire NodeServices.layer or BunServices.layer only in your entry point with NodeRuntime.runMain or BunRuntime.runMain.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: effect-platform-layers Download link: https://github.com/mpsuesser/pi-effect-harness/archive/main.zip#effect-platform-layers Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.