effect-path

Implements platform-abstract file path operations using the Effect Path service.

1|Updated Aug 24, 2026
One-click install
npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-path-lambdasolver2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-path
Source: https://github.com/lambdasolver2/opencode-effect-harness/tree/main/packages/module-typescript/assets/skills/effect-path
Command: npx skills add https://github.com/lambdasolver2/opencode-effect-harness --skill effect-path-lambdasolver2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires effect.

What problem does it solve? Hardcoding path separators or importing node:path directly breaks portability across platforms. This Skill shows how to use the Effect Path service for joining, resolving, normalizing, and converting file paths in a platform-abstract, testable way. ## Core Features & Use Cases - Path Operations: Join, resolve, normalize, parse, and format paths through the injected Path service instead of string concatenation. - URL Conversions: Convert between file URLs and paths with fromFileUrl and toFileUrl, with typed BadArgument error handling. - Use Case: When building a cross-platform CLI that constructs output file paths, inject Path.Path, join segments, resolve to absolute paths, and normalize results so the same code works on POSIX and Windows. ## Quick Start Show me how to build and normalize an output file path in Effect using the Path service instead of node:path.

Frequently Asked Questions about effect-path

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

FAQPage Schema
How do I join file paths in Effect TypeScript?

Inject the Path service with yield* Path.Path inside Effect.gen, then call path.join with your segments. This produces correct separators on both POSIX and Windows without string concatenation.

How to convert a file URL to a path in Effect?

Use path.fromFileUrl with a URL object, not a string. The operation is effectful and can fail with a BadArgument error, so handle it with Effect error handling.

Does Effect Path work in the browser?

@effect/platform-browser does not provide a BrowserPath layer in beta.74. Browser code should provide Path.layer from effect, which supplies POSIX semantics, or a custom layer explicitly.

Why avoid importing node:path directly in Effect projects?

Importing node:path directly breaks portability and testability. The Effect Path service abstracts platform differences, lets you swap layers per environment, and keeps path logic injectable and mockable in tests.

What is the difference between path.resolve and path.normalize in Effect?

path.resolve converts relative segments into an absolute path based on the working directory, while path.normalize cleans up an existing path by removing redundant separators and resolving dot segments without making it absolute.