claude-code-stream-json

Exchange structured JSON messages with the Claude Code CLI in stream-json mode.

2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/tankygranny05/agent-box --skill claude-code-stream-json
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-code-stream-json
Source: https://github.com/tankygranny05/agent-box/tree/main/agent-box/seed/claude-skills/claude-code-stream-json
Command: npx skills add https://github.com/tankygranny05/agent-box --skill claude-code-stream-json

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables seamless, real-time, bidirectional JSON communication with Claude Code CLI, allowing for structured data exchange and enhanced observability of AI interactions.

Core Features & Use Cases

  • Stream JSON Input/Output: Process messages and receive responses as newline-delimited JSON.
  • Full Session Observability: Track tool calls, message deltas, and results in real-time.
  • Use Case: Integrate Claude Code into an agentic workflow where structured JSON messages are exchanged for task execution and status updates, with all intermediate steps logged for debugging.

Quick Start

Pipe a user prompt requesting project analysis to Claude Code CLI in stream-json mode and view the output.

Frequently Asked Questions about claude-code-stream-json

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

FAQPage Schema
How do I get structured JSON output from Claude Code CLI for agentic workflows?

You can get structured JSON output from Claude Code CLI by enabling stream-json input and output formats, which allows you to process messages and receive responses as newline-delimited JSON for deterministic task execution.

What is stream-json communication and when do I need it for Claude agents?

Stream-json communication is real-time, bidirectional JSON message exchange with Claude Code CLI. You need it when integrating Claude into agentic workflows requiring structured data exchange and full session observability for debugging.

Can I track tool calls and message deltas in real-time with Claude Code CLI?

Yes, you can track tool calls, message deltas, and results in real-time by piping prompts to Claude Code CLI in stream-json mode, which provides full session observability for all intermediate steps.

Does Claude Code CLI support bidirectional JSON streaming for automated pipelines?

Yes, Claude Code CLI supports bidirectional JSON streaming when stream-json input and output formats are enabled, allowing structured message exchange and real-time feedback for automated agentic task pipelines.

Why do I need stream-json mode for Claude Code instead of plain text output?

You need stream-json mode when your agentic workflow requires structured data exchange, deterministic task execution, and full session observability including tool calls and deltas, which plain text output cannot provide.

What are the limitations of streaming JSON with Claude Code CLI?

The primary limitation is that streaming JSON with Claude Code CLI strictly requires the CLI environment with stream-json input and output formats explicitly enabled to function, meaning it cannot operate outside this specific configuration.