streaming

Process large JSON inputs incrementally with jq streaming mode.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/theslashdojo/dojo --skill streaming-theslashdojo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming
Source: https://github.com/theslashdojo/dojo/tree/main/nodes/jq/streaming
Command: npx skills add https://github.com/theslashdojo/dojo --skill streaming-theslashdojo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, and includes scripts (resource) components.

What problem does it solve?

Load this skill when the input is large enough that whole-document jq filters are awkward or memory-heavy, or when the source is a stream of JSON texts.

Core Features & Use Cases

  • Stream shape handling with --stream to produce path/value events for incremental processing.
  • Incremental reductions using reduce and foreach to summarize data without materializing entire documents.
  • Reconstructing and manipulating streamed data with tostream, truncate_stream, and fromstream to preserve or rebuild values.
  • Sequenced inputs and errors support via --seq and --stream-errors for long-running pipelines.

Quick Start

Run a streaming jq command against a large JSON source to observe incremental path-based events.

Frequently Asked Questions about streaming

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

FAQPage Schema
How do I process huge JSON files without running out of memory?

You can process huge JSON files efficiently by using jq's streaming mode to produce incremental path/value events, preventing memory overload. This approach allows agents to summarize data through incremental reductions without materializing entire documents.

What's the best way to parse a continuous stream of JSON texts for real-time analytics?

Parsing a continuous stream of JSON texts is best handled using jq's --seq and --stream options to generate incremental path-based events. This method supports long-running pipelines by processing sequenced inputs and capturing streaming errors efficiently.

How does jq streaming mode handle incremental data processing?

jq streaming mode handles incremental data processing by breaking large JSON inputs into path/value pairs using the --stream flag. You can then apply reduce and foreach operations to summarize data or use tostream and fromstream to reconstruct values incrementally.

Do I need the jq CLI installed to use streaming data processing scripts?

Yes, you need the jq CLI installed because the streaming skill relies on jq's native --stream, --seq, and --stream-errors options. The processing logic executes through a Bash wrapper script that pipes input directly to jq.

Can I reconstruct partial JSON structures from an incremental stream?

Yes, you can reconstruct partial JSON structures from an incremental stream by utilizing jq's truncate_stream and fromstream functions. These functions allow you to manipulate and rebuild specific values from streamed path events without loading the full document.

Why does my whole-document jq filter fail on large JSON inputs?

Whole-document jq filters fail on large JSON inputs because they attempt to load the entire file into memory at once. Switching to jq's streaming mode produces path-based events for incremental processing, resolving memory limitations during log processing or real-time analytics.