writing-data

Write JSON or byte data to durable streams with exactly-once guarantees.

1.7k|64|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/durable-streams/durable-streams --skill writing-data-durable-streams
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-data
Source: https://github.com/durable-streams/durable-streams/tree/main/packages/client/skills/writing-data
Command: npx skills add https://github.com/durable-streams/durable-streams --skill writing-data-durable-streams

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing data to durable streams can be error-prone when aiming for reliability, throughput, and proper lifecycle management across applications.

Core Features & Use Cases

  • Write data to durable streams with simple appends via DurableStream.append().
  • Achieve high-throughput, exactly-once delivery using IdempotentProducer, with autoClaim and batching.
  • Manage stream lifecycles including flush and close, and support for JSON mode vs byte streams in production pipelines.

Quick Start

Create a DurableStream handle, configure an IdempotentProducer, then append events and flush before shutdown.

Frequently Asked Questions about writing-data

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

FAQPage Schema
How do I write data to durable streams with exactly-once guarantees?

You can write data to durable streams with exactly-once guarantees using the IdempotentProducer, which supports high-throughput batching and autoClaim-based epoch management for resilient production workloads.

What is the difference between simple appends and high-throughput batching for data ingestion?

Simple appends use DurableStream.append() for direct writes, while high-throughput batching uses IdempotentProducer to group events, enabling exactly-once delivery and better throughput in real-time pipelines.

How do I manage the lifecycle of a durable stream during production shutdown?

You manage durable stream lifecycles by calling flush() to ensure all buffered data is written and close() to safely release the stream handle before application shutdown.

Can I write JSON data to durable streams or are they limited to byte streams?

Durable streams support both JSON mode and byte streams, allowing you to safely append structured JSON events or raw bytes depending on your production pipeline requirements.

Why do I need idempotent producers for streaming data ingestion?

Idempotent producers are needed for streaming data ingestion to ensure exactly-once delivery guarantees, preventing duplicate events during network retries or failures in real-time pipelines.

Does autoClaim-based epoch management work for high-throughput real-time pipelines?

Yes, autoClaim-based epoch management integrates with IdempotentProducer to ensure safe, resilient writes and exactly-once guarantees specifically for high-throughput real-time data pipelines.