
iii-channels
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
- Installs
- 193
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/iii-hq/iii --skill iii-channels- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads iii-channels automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Channels
Comparable to: Unix pipes, gRPC streaming, WebSocket data streams
Key Concepts
Use the concepts below when they fit the task. Not every worker needs channels.
- A Channel is a WebSocket-backed binary stream between two endpoints (writer and reader)
createChannel()returns a writer/reader pair plus serializable refs that can be passed to other workers- StreamChannelRef is a serializable reference (channel_id, access_key, direction) that can be included in function payloads
- Writers send binary data (chunked into 64KB frames) and text messages
- Readers consume binary chunks via
readAll()or receive text messages via callbacks - Consumers must construct a reader from a serializable
StreamChannelRef(e.g.,ChannelReader::new(...)) rather than using the producer-side reader object returned bycreateChannel() - Channels work cross-worker and cross-language — a Python writer can stream to a Rust reader
Architecture
A function creates a channel via createChannel(), receiving a writer and reader pair. The writer ref or reader ref is passed to another function (potentially in a different worker/language) via a trigger payload. The engine brokers the WebSocket connection between the two endpoints. Binary data flows directly between workers through the engine's channel endpoint.
iii Primitives Used
| Primitive | Purpose |
|---|---|
createChannel(bufferSize?) | Create a channel, returns writer + reader pair |
ChannelWriter.write(data) | Send binary data (chunked into 64KB frames) |
ChannelWriter.sendMessage(msg) | Send a text message through the channel |
ChannelWriter.close() | Close the writer end |
ChannelReader.readAll() | Read entire stream into a single buffer |
ChannelReader.onMessage(callback) | Register callback for text messages |
StreamChannelRef | Serializable reference to pass between workers |
Reference Implementation
- TypeScript: ../references/channels.js
- Python: ../references/channels.py
- Rust: ../references/channels.rs
Each reference shows the same patterns (channel creation, binary streaming, text messages, cross-function handoff) in its respective language.
Common Patterns
Code using this pattern commonly includes, when relevant:
const channel = await iii.createChannel()— create a channel pair (producer access)channel.writer.stream.write(buffer)/channel.writer.write(data)— send binary datachannel.writer.sendMessage(JSON.stringify({ type: 'metadata', ... }))— send text metadatachannel.writer.close()— signal end of stream- Pass
channel.readerReforchannel.writerRefin trigger payloads for cross-worker streaming - Consumer must reconstruct the reader from the ref: e.g.,
new ChannelReader(iii.address, readerRef) const data = await reader.readAll()— read entire stream (consumer behavior)reader.onMessage(msg => { ... })— handle text messages (consumer behavior)
Adapting This Pattern
Use the adaptations below when they apply to the task.
- Use channels for large data transfers that shouldn't be serialized into JSON payloads
- Pass
readerRefto a processing function andwriterRefto a producing function for pipeline patterns - Use text messages for metadata/signaling alongside binary data streams
- Set
bufferSizewhen the reader may be slower than the writer to apply backpressure - Channels work cross-language — a TypeScript producer can stream to a Rust consumer
Pattern Boundaries
- For key-value state persistence, prefer
iii-state-management. - For stream CRUD (named streams with groups/keys), prefer
iii-realtime-streams. - For pub/sub messaging, prefer triggers with
subscribetype. - Stay with
iii-channelswhen the primary problem is binary data streaming between workers.
When to Use
- Use this skill when the task is primarily about
iii-channelsin the iii engine. - Triggers when the request directly asks for this pattern or an equivalent implementation.
Boundaries
- Never use this skill as a generic fallback for unrelated tasks.
- You must not apply this skill when a more specific iii skill is a better fit.
- Always verify environment and safety constraints before applying examples from this skill.
FAQ
What does the iii-channels skill do?
Binary streaming between workers via channels. Use when building data pipelines, file transfers, streaming responses, or any pattern requiring binary data transfer between functions.
How do I install iii-channels?
Run npx skills add https://github.com/iii-hq/iii --skill iii-channels in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/iii-channels/ (personal) or .claude/skills/iii-channels/ (project).
Which AI agents can use iii-channels?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is iii-channels safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains iii-channels?
It is published by iii-hq/iii in iii-hq/iii. It has 193 recorded installs.
More from iii-hq/iii
iii-engine-config
iii-hq/iii
Configure a managed iii engine through worker-compose.yaml or a directly supervised engine through config.yaml. Use for engine ports, RBAC via the rbac-proxy worker, observer limits, streams, sandboxes, and configuration storage.
iii-getting-started
iii-hq/iii
Install the iii engine, set up your first worker, and get a working backend running. Use when a user wants to start a new iii project, install the SDK, or needs help with initial setup and configuration.
iii-error-handling
iii-hq/iii
Handle iii engine and SDK errors across Node, Python, Rust, and browser workers. Use when interpreting error codes, retryability, RBAC denial, timeouts, handler failures, or SDK-specific exception surfaces.
iii-architecture-patterns
iii-hq/iii
Use when composing iii primitives into backend architectures: durable workflows, reactive backends, observer side effects, agentic pipelines, event-driven CQRS, effect pipelines, and trigger-transform-action automation.
iii-sdk-reference
iii-hq/iii
Use when working with iii SDK APIs across Node.js, browser, Python, Rust, or Go: package installation, worker initialization, function/trigger registration, observers, invocation, local dispatch, channels, logging, OpenTelemetry, and language-specific caveats.
iii-core-primitives
iii-hq/iii
Use when registering iii functions, binding triggers, observing functions, selecting sync/void/enqueue invocation, creating workers, inspecting the live worker registry, installing registry workers, authoring event sources, moving channel data, or adapting external HTTP functions across TypeScript, Python, and Rust.
Popular other skills
hyperframes-cli
heygen-com/hyperframes
The HyperFrames CLI by job - scaffold, check, look at frames, edit the timeline, preview, render locally or in the cloud, publish, project history - plus reading its JSON and recovering from build or render failures.
triage
mattpocock/skills
Move issues and external PRs through a state machine of triage roles, categorise, verify, grill if needed, and write agent-ready briefs.
ask-matt
mattpocock/skills
Ask which skill or flow fits your situation. A router over the skills in this repo.
to-questionnaire
mattpocock/skills
Turn a decision you can't fully answer into a questionnaire for someone else to fill in.
loop-me
mattpocock/skills
Grill me about specs for the workflows I want to build, within this workspace.