effect-filesystem

Provides cross-platform file and directory I/O for Node.js, Bun, and browsers via Effect's FileSystem abstraction.

22|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-filesystem-mpsuesser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-filesystem
Source: https://github.com/mpsuesser/pi-effect-harness/tree/main/harnesses/effect/skills/effect-filesystem
Command: npx skills add https://github.com/mpsuesser/pi-effect-harness --skill effect-filesystem-mpsuesser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes platform-specific file handling by providing one consistent, safe API for reading, writing, streaming, and managing files and directories across Node.js, Bun, and browser environments.

Core Features & Use Cases

  • Cross-platform File Operations: Read and write files as strings or binary, copy, rename/move, and remove files or directories.
  • Streaming for Large Files: Stream large inputs and write via sinks to avoid loading everything into memory.
  • Robust Metadata & Permissions: Stat, check access/exists, resolve real paths, and perform common permission operations like chmod/chown/utimes.

Use case: Build a single code path that reads a large log file as a stream, transforms it, and writes results—regardless of whether you run in Node.js, Bun, or a browser.

Quick Start

Use the effect-filesystem skill to read a file string from a path inside your Effect program and return the content.

Frequently Asked Questions about effect-filesystem

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I do cross-platform file I/O with Effect in Node.js and Bun?

Cross-platform file I/O with Effect uses a single FileSystem abstraction for consistent reads, writes, and directory management across Node.js, Bun, and browsers. You yield the FileSystem service, use PlatformError-safe error handling, and rely on platform layers at the entry point.

Can I stream large files in Effect without loading everything into memory?

Yes, streaming large files in Effect avoids memory overload by streaming inputs and writing via sinks. This approach allows you to process large data streams safely across Node.js, Bun, and browser environments.

Does this approach support file metadata and permission operations like chmod and chown?

Yes, the Effect FileSystem abstraction supports robust metadata and permission operations. You can stat files, check access or existence, resolve real paths, and perform chmod, chown, and utimes operations.

What is the best way to handle platform-specific file errors in Effect?

The best way to handle platform-specific file errors in Effect is using PlatformError-safe error handling. This mechanism wraps platform-specific failures into a consistent error type across Node.js, Bun, and browser scenarios.

How do I manage temporary or scoped file resources in Effect?

You manage temporary or scoped file resources in Effect by yielding the FileSystem service within a scoped workflow. This ensures temporary files and directories are safely acquired and automatically cleaned up.

Do I need platform layers to read a file string in Effect?

Yes, you need platform layers at your application entry point to provide the concrete FileSystem implementation. Once provided, you can yield the FileSystem service to read file strings or binary data consistently.