effect-ts

Guide writing, refactoring, and analyzing TypeScript code with Effect-TS.

567|82|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/pedronauck/skills --skill effect-ts-pedronauck
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-ts
Source: https://github.com/pedronauck/skills/tree/main/skills/effect-ts
Command: npx skills add https://github.com/pedronauck/skills --skill effect-ts-pedronauck

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write more robust, scalable, and maintainable TypeScript code by leveraging the Effect-TS library's powerful functional programming patterns and type safety.

Core Features & Use Cases

  • Error Handling: Implement structured, type-safe error handling using Effect.fail, Effect.catchTag, and Cause.
  • Resource Management: Safely acquire and release resources using Effect.acquireRelease and Effect.scoped.
  • Concurrency: Manage concurrent operations effectively with Effect.all, Stream.mapEffect, and Fiber primitives.
  • Use Case: Refactor a complex asynchronous service with multiple potential failure points into a clear, testable Effect-TS program that guarantees resource cleanup and provides detailed error context.

Quick Start

Use the effect-ts skill to generate a basic Effect-TS program structure with proper imports and a simple Effect.gen block.

Frequently Asked Questions about effect-ts

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

FAQPage Schema
How do I handle structured errors in TypeScript using Effect-TS?

Effect-TS handles structured errors using `Effect.fail`, `Effect.catchTag`, and `Cause` to provide type-safe, detailed error context for complex asynchronous services. This allows you to tag failures and catch specific errors predictably during refactoring.

What is the best way to manage resources and concurrency in TypeScript?

Resource management and concurrency in TypeScript are managed safely using `Effect.acquireRelease`, `Effect.scoped`, and `Effect.all`. These primitives guarantee resource cleanup and control concurrent operations effectively within your program.

How do I model data with Schema in Effect-TS?

Schema in Effect-TS is used for robust data modeling within your TypeScript project. It integrates directly with the Effect library to enforce type safety and validate structured data before processing it through your functional pipelines.

Can I refactor an existing asynchronous TypeScript service into an Effect-TS program?

Yes, you can refactor complex asynchronous TypeScript services into testable Effect-TS programs. This process leverages functional programming patterns and the Context.Tag service pattern to guarantee resource cleanup and clarify multiple failure points.

Do I need advanced TypeScript knowledge to use Effect-TS for functional programming?

Effect-TS requires understanding functional programming concepts and TypeScript type safety. The Skill provides expert guidance on core principles, but developers should be comfortable with advanced TypeScript concepts to fully leverage Effect's structured concurrency and error handling.

When should I use the Context.Tag service pattern in Effect-TS?

The Context.Tag service pattern in Effect-TS is used when you need to structure dependencies and services in a scalable, testable way. It allows you to cleanly separate service implementation from your core business logic using the Effect generator block.