<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
nmnmcc/effect-skills/effect-platform
──Details
PublishedOctober 21, 2026 at 08:35 AM
Content Hashsha256:368494fe5500b5cb...
Git SHA365ff1f4a539
──Files
Files (1 file, 2.8 KB)
SKILL.md2.8 KBactive
SKILL.md · 71 lines · 2.8 KB

version: "1.0.0" name: effect-platform compatibility: "Examples target effect@4.0.0; align @effect/* packages. Effect v3 requires migration." description: "Use when choosing a Node, Bun, Deno, or browser adapter for filesystem, process, network, worker, or runtime lifecycle services."


Effect platform integration

Use this skill when application code needs a runtime adapter. It covers @effect/platform-browser, @effect/platform-bun, @effect/platform-deno, @effect/platform-node-shared, @effect/platform-node, plus FileSystem, Path, PlatformError, Stdio, Terminal, process, net, socket, and workers modules.

Choose the runtime package first

Inspect the project's runtime and lockfile before choosing a package:

  • Browser applications normally use platform-browser and Fetch-backed

services.

  • Node applications use platform-node and, where appropriate,

platform-node-shared.

  • Bun and Deno need their own adapters; do not import Node implementations

just because the TypeScript types happen to line up.

Keep domain code dependent on Context services. Install a runtime-specific Layer at the composition root.

ts
import { Effect } from "effect"
import { NodeRuntime, NodeServices } from "@effect/platform-node"
const program = Effect.logInfo("service started").pipe(
Effect.provide(NodeServices.layer)
)
NodeRuntime.runMain(program)

Verify the exact exported Layer for the package version before using this shape. The point is to let the platform own process signals, filesystem resources, and shutdown instead of sprinkling Node globals through a domain module.

Files, processes, and sockets

Use FileSystem and Path services for file access, and classify failures with PlatformError. Use ChildProcess through the process skill boundary and Socket or HTTP services for network I/O. All listeners, file handles, subprocesses, and worker ports must be scoped and closed on interruption.

Workers are a message boundary: define a serializable protocol with Schema, bound the queue, and make worker termination observable. Do not pass a live Effect service graph across a worker boundary.

Review checklist

  • Is the selected adapter compatible with the deployed runtime and bundler?
  • Are filesystem paths and permissions tested on the target OS?
  • Are signals and exit codes handled by the runtime entry point?
  • Does a failed startup close partially acquired resources?
  • Are platform errors mapped to domain errors at one boundary?

References

All versions