effect-uai-streaming-structured-output

Decode and stream schema-validated JSON objects from model output as JSONL.

30|4|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/betalyra/effect-uai --skill effect-uai-streaming-structured-output
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: effect-uai-streaming-structured-output
Source: https://github.com/betalyra/effect-uai/tree/main/skills/effect-uai-streaming-structured-output
Command: npx skills add https://github.com/betalyra/effect-uai --skill effect-uai-streaming-structured-output

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This capability enables you to receive and work with structured data delivered progressively from a model, instead of waiting for a complete response.

Core Features & Use Cases

  • Streaming JSONL: emit one validated object per line as the model writes it.
  • Schema-driven validation: verify each line against a defined Effect.Schema.
  • Use Case: display live search results or incremental data feeds with strong typing.

Quick Start

Run a streaming turn that emits JSONL lines and decodes them against a Recipe schema as they arrive.

Frequently Asked Questions about effect-uai-streaming-structured-output

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

FAQPage Schema
How do I stream structured JSON objects from a model as they arrive?

To stream structured JSON objects incrementally, this Skill decodes model output line by line as JSONL, validating each line against a defined Effect.Schema before emitting typed data. It uses a multi-stage pipeline with Effect primitives for live result scenarios.

What is the best way to validate typed data in a streaming JSONL pipeline?

Validating typed data in a streaming JSONL pipeline is handled through schema-driven validation, verifying each incoming line against an Effect.Schema. This ensures every incrementally delivered JSON object conforms to your defined structure before it is processed.

Can I use Effect Stream primitives to handle incremental search results?

Yes, you can use Effect Stream primitives to handle incremental search results by decoding and emitting typed JSON objects progressively. The Skill implements a pipeline using Stream and Lines to process live data feeds as they arrive.

How does per-line decoding work for live streaming recipes?

Per-line decoding for live streaming recipes works by processing each line of model output individually through StructuredFormat and Effect primitives. This allows the pipeline to validate and emit typed JSONL objects progressively without waiting for the complete response.

Do I need to wait for a complete model response before parsing structured output?

No, you do not need to wait for a complete model response to parse structured output. This Skill decodes and streams typed JSON objects as they arrive, enabling you to display live search results or incremental data feeds immediately.

How does error handling work when streaming JSONL with Effect?

Error handling when streaming JSONL with Effect is integrated into the multi-stage pipeline, catching validation or decoding failures per line. This ensures that malformed lines do not crash the stream while valid typed data continues to emit.