What problem does it solve?
It solves the problem of brittle, environment-specific code caused by using Node.js/Bun globals (like fs, path, child_process, fetch, console) instead of a consistent abstraction layer, so your code runs reliably across Node.js and Bun.
Core Features & Use Cases
- Cross-platform file I/O using Effect services (FileSystem) rather than direct fs/fs/promises calls.
- Safe, correct path handling using the Path service instead of manual string concatenation or Node’s path module.
- Portable process spawning, terminal I/O, HTTP, and caching via Effect platform services like ChildProcessSpawner, Terminal, HttpClient, and KeyValueStore.
- Type-safe errors and resource safety through Effect’s service and Scope-based design.
- Use case: When building a CLI or small server that reads config files, calls an HTTP endpoint, and runs subprocesses, apply this skill to keep all I/O code portable and testable.
Quick Start
Apply the effect-platform-abstraction skill while implementing cross-platform code that reads/writes files, spawns processes, makes HTTP requests, or performs terminal I/O in TypeScript with Effect.