untether: Skill for Claude Code

.claude/skills/claude-stream-json/SKILL.md

claude-stream-json is a skill for Claude Code from littlebearapps/untether. It costs 65 tokens per session (3,778 once invoked), scanned C, original, MIT.

A reference for reading the JSONL messages produced by the Claude Code command-line tool. JSONL is a text format where each line contains one JSON message, and Untether is the program that starts Claude Code and reads those messages.

In plain words
What is it for?
Use it when building or maintaining Untether's Claude Code runner, subprocess handling, input and control messages, permission modes, or event mappings.
Why use it?
It explains how to interpret Claude Code output, send input, handle permissions, and translate events without guessing the protocol.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; names the ExitPlanMode tool; mentions Claude Code.

This is littlebearapps/untether's own configuration. It tells Claude Code how to work on untether itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything untether configures →

Reuse

Borrowing it

Nothing to install: this file belongs to littlebearapps/untether. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/littlebearapps/untether/master/.claude/skills/claude-stream-json/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/littlebearapps/untether

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-stream-json

README.md
[![agentmods](https://agentmods.dev/badge/skills/littlebearapps/untether/claude-stream-json/github.svg)](https://agentmods.dev/skills/littlebearapps/untether/claude-stream-json)
Your own site
<a href="https://agentmods.dev/skills/littlebearapps/untether/claude-stream-json"><img src="https://agentmods.dev/badge/skills/littlebearapps/untether/claude-stream-json/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for claude-stream-json

Your own site · 80×15
<a href="https://agentmods.dev/skills/littlebearapps/untether/claude-stream-json"><img src="https://agentmods.dev/badge/skills/littlebearapps/untether/claude-stream-json.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,778 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.03778
Opus 5.5 $0.00026 $0.01511
Sonnet 5.5 $0.00013 $0.00756
Haiku 4.5 $0.00006 $0.00378

Measured 18d ago against content hash c6a12d9b1c98, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

claude-stream-json scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 18d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"tool_name":"Bash","input":{"command":"rm -rf /"},"permission_suggestions":[...]}}

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

ClaudeRunner uses `pty.openpty()` instead of `subprocess.PIPE` for stdin:
.claude/skills/claude-stream-json/SKILL.md · 308 lines

How it starts

The opening of the file, as written. The whole thing — 308 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Code stream-json Protocol (Consumer)

Untether spawns Claude Code CLI as a subprocess and consumes its JSONL output. This skill covers the protocol from Untether's perspective.

Key files

File Purpose
src/untether/runners/claude.py ClaudeRunner — subprocess management, PTY, control channel, event translation
src/untether/schemas/claude.py msgspec structs for Claude JSONL events
src/untether/runners/tool_actions.py tool_kind_and_title() — tool name to ActionKind mapping
src/untether/loop_scheduler.py Loop mode: Untether-run /loop schedules, wake-up timers, cancel and cron-suppression records (#925, #926)
docs/reference/runners/claude/runner.md Full runner specification
docs/reference/runners/claude/stream-json-cheatsheet.md JSONL event shapes with examples
docs/reference/runners/claude/untether-events.md Claude JSONL to Untether event mapping
.claude/skills/claude-stream-json/control-channel-internals.md Control-channel mechanism detail: registries, claims, live-session stdin writers, async-hook hold, scheduling hooks, plan re-arm, parent-initiated requests

CLI invocation

Non-interactive mode (-p)

claude -p --output-format stream-json --input-format stream-json --verbose -- <prompt>
  • -p / --print: non-interactive, prompt as positional arg after --
  • --verbose: required for full stream-json output
  • --input-format stream-json: enables JSON input on stdin
  • Prompt passed after -- to protect prompts starting with -

Interactive permission mode

claude --output-format stream-json --input-format stream-json --verbose \
  --permission-mode plan --permission-prompt-tool stdio
  • No -p flag — prompt sent via stdin as JSON user message
  • --permission-prompt-tool stdio: enables bidirectional control channel
  • --permission-mode <mode>: the configured mode verbatim (plan, auto, default, acceptEdits, …); only Untether's plan-auto is translated (to plan, #741)
  • --include-hook-events when the cached claude --help probe lists it (#812)
  • The stdin initialize request carries hooks: exact-name PreToolUse matchers for CronCreate / CronDelete (callback ids ut_loop_cron_create / ut_loop_cron_delete, #925) unless [loop] own_schedule = false
  • A session that may still hold a native CLI cron job is resumed with CLAUDE_CODE_DISABLE_CRON=1 (#926)

Read the full file on GitHub · 308 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 18d ago Changed · +67 lines c6a12d9b1c98
  2. 1mo ago First seen · 241 lines · 65 tokens per session scan C 1bdef80013d8

Subscribe to this mod's changes

claude-stream-json is a skill published in the GitHub repository littlebearapps/untether (74 stars, last pushed today), licensed MIT. It adds 65 tokens to every session and 3,778 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.