Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/matt-dionis/claude-code-configs/ai-streaming-setupgit clone --depth 1 https://github.com/Matt-Dionis/claude-code-configsWrote 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.
[](https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-streaming-setup)<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/ai-streaming-setup"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/ai-streaming-setup.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00009 | $0.00657 |
| Opus 5 | $0.00005 | $0.00329 |
| Sonnet 5 | $0.00002 | $0.00131 |
| Haiku 4.5 | $0.00001 | $0.00066 |
Grade A, and why
ai-streaming-setup scanned grade A with 0 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Set up AI Streaming Implementation
Create a robust streaming AI implementation with the Vercel AI SDK for: $ARGUMENTS
Current Project Analysis
Project structure: !find . -type f -name "*.ts" -o -name "*.tsx" | grep -E "(api|components|lib)" | head -10
Existing AI SDK setup: !grep -r "from 'ai'" . --include="*.ts" --include="*.tsx" | head -5
Package dependencies: !cat package.json | jq '.dependencies | to_entries[] | select(.key | contains("ai")) | "\(.key): \(.value)"' -r 2>/dev/null || echo "No AI dependencies found"
Streaming Type Analysis
Text Streaming: Real-time text generation with token-by-token updates
Object Streaming: Structured data streaming with partial object updates
Chat Streaming: Conversational interfaces with message history
Completion Streaming: Single-turn completions with progressive updates
Your Task
- Assess current streaming setup and identify gaps
- Implement the appropriate streaming pattern based on the specified type
- Create robust error handling for stream interruptions and failures
- Add proper loading states and user feedback
- Implement stream cancellation for better UX
- Set up proper TypeScript types for streaming responses
- Add performance optimizations (chunking, backpressure handling)
- Include comprehensive testing for edge cases
Implementation Requirements
Server-Side Streaming
- Proper route handler setup with
maxDuration - Model configuration with appropriate parameters
- Stream response formatting with
toUIMessageStreamResponse()ortoTextStreamResponse() - Abort signal handling for stream cancellation
- Error boundaries and fallback responses
Client-Side Streaming
- React hooks for stream management (
useChat,useCompletion,useObject) - Progressive UI updates with optimistic rendering
- Loading states and stream status indicators
- Error handling with retry mechanisms
- Stream interruption and cancellation
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.
- 2d ago First seen · 83 lines · 9 tokens per session scan A 4a838f814fc8
ai-streaming-setup is a command published in the GitHub repository Matt-Dionis/claude-code-configs (625 stars, last pushed 1y ago), licensed MIT. It adds 9 tokens to every session and 657 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
gaia-serena-sync
Detect and, on explicit consent, additively append the languages Serena is not indexing to the languages: list in .serena/project.yml, then prompt a Serena restart. Never mutates without a yes; inert without Serena.
gaia-spec
Author an immutable SPEC artifact through Socratic discovery (spec-kit wrapper), then STOP. Terminal, never runs /gaia-plan; it prints a /gaia-plan prompt the human pastes into a fresh session. Pass auto for non-interactive mode that answers its own questions.
web-add
Ingest a single URL into the knowledge base.
vlm-ocr-evaluation
Run the vlm-ocr skill in its evaluate phase: compare candidate OCR systems against a stratified human-transcribed ground-truth sample and pick a model on measured CER/WER before committing to a bulk run.
a
Intercept Mode - Auto-improve and execute immediately.
flow-nexus-neural
Train and deploy neural networks in distributed sandboxes.