Sinks

Implement and compose Effect-TS sinks to consume streams and produce results.

8|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill sinks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Sinks
Source: https://github.com/andrueandersoncs/claude-skill-effect-ts/tree/main/skills/sinks
Command: npx skills add https://github.com/andrueandersoncs/claude-skill-effect-ts --skill sinks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Sinks skill helps developers efficiently consume streams by providing idiomatic patterns for Effect-TS sinks, enabling reliable aggregation and side-effect processing without leaking resources.

Core Features & Use Cases

  • Collect and aggregate: use common sinks to gather all results or compute metrics from streams.
  • Transform and compose: combine sinks with map, dimap, and zip to build complex data pipelines.
  • Real-world scenarios: use sinks for logging, counters, file writes, and batch processing in streaming apps.

Quick Start

  • Install and import { Stream, Sink } from "effect" and try a simple example: Stream.make(1, 2, 3).pipe(Stream.run(Sink.sum))

Frequently Asked Questions about Sinks

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

FAQPage Schema
How do I aggregate stream data in Effect-TS?

You aggregate stream data in Effect-TS by running streams through sinks like collectAll, sum, or fold to consume emissions and produce a single aggregated result.

What is a sink in Effect-TS stream processing?

A sink in Effect-TS stream processing is a consumer that takes a stream of values and reduces them into a single result, enabling reliable aggregation and side-effect processing without leaking resources.

How do I compose multiple sinks for complex data pipelines in TypeScript?

You compose multiple sinks for complex data pipelines in TypeScript by combining them with operators like map, dimap, and zip to transform and pair sink outputs within the Effect-TS ecosystem.

Can I use Effect-TS sinks for logging and batch processing?

Yes, you can use Effect-TS sinks for logging and batch processing by applying real-world sink patterns such as foreach and fold to handle side-effects and process stream chunks efficiently.

How do I run a simple Effect-TS stream with a sink?

To run a simple Effect-TS stream with a sink, you pipe a stream into Stream.run and pass a sink, such as Stream.make(1, 2, 3).pipe(Stream.run(Sink.sum)) to consume the values.

Does Effect-TS provide built-in sinks for folding stream values?

Yes, Effect-TS provides built-in sinks for folding stream values, allowing you to apply fold patterns to accumulate stream emissions into a computed result while managing resources safely.