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 skills add davidteren/hotwire-codex-skills --skill turbo-streams-patternsgit clone --depth 1 https://github.com/davidteren/hotwire-codex-skillsWrote 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/skills/davidteren/hotwire-codex-skills/turbo-streams-patterns)<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/turbo-streams-patterns"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/turbo-streams-patterns/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.
<a href="https://agentmods.dev/skills/davidteren/hotwire-codex-skills/turbo-streams-patterns"><img src="https://agentmods.dev/badge/skills/davidteren/hotwire-codex-skills/turbo-streams-patterns.svg" alt="Reviewed on agentmods" width="80" 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.00105 | $0.00788 |
| Opus 5 | $0.00053 | $0.00394 |
| Sonnet 5 | $0.00021 | $0.00158 |
| Haiku 4.5 | $0.00011 | $0.00079 |
Grade A, and why
turbo-streams-patterns 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 10d 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 — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Targeted Turbo Streams
Surgical DOM updates: broadcast/render specific <turbo-stream> actions against
specific ids. Use this when you need precision (append a chat message, replace one
card, move a class); use turbo-morphing when a whole-page refresh-with-morph is
simpler. Full patterns: references/turbo-streams-guide.md.
When to use
- Live updates: model change → broadcast a partial to subscribers.
- A custom stream action Turbo doesn't ship (e.g.
switch_class). - A record's broadcasts are private — only authorized users may subscribe.
- Debugging: a stream that does nothing, a custom action the client ignores, or broadcasts arriving for the wrong user.
Patterns (and their footguns)
-
Model broadcast:
after_create -> { broadcast_append_later_to parent, target:, partial: }. The_latervariants enqueue a job — need an Active Job backend. View subscribes withturbo_stream_from parent, channel: "FooChannel". -
Authorize the stream (security):
turbo_stream_fromonly signs the stream name — it does NOT prove this user may receive that record's broadcasts. Use a custom channel that authorizes andrejects otherwise (templates/authorized_channel.rb.tmpl). The defaultTurbo::StreamsChannelstreams from any signed name with no per-record check → eavesdropping risk. -
Custom stream action = two halves that MUST match: a JS
StreamActions.Xand a Ruby helper registered viaTurbo::Streams::TagBuilder.prepend(templates/custom_stream_action*.tmpl). One side alone fails silently. -
Stream tags inside a frame response: to patch an element outside the frame you're rendering into, embed
turbo_stream.*tags in the frame's HTML — no separate*.turbo_stream.erbneeded. -
Kredis presence: a
kredis_setof online users (maintained in the channel'ssubscribed/unsubscribed) decides live-append vs also notifying/emailing.
Lint an app
What ships with it
5 files 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.
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.
- 10d ago First seen · 59 lines · 105 tokens per session scan A 88deb23b7ea2
turbo-streams-patterns is a skill published in the GitHub repository davidteren/hotwire-codex-skills (3 stars, last pushed 2mo ago), licensed MIT. It adds 105 tokens to every session and 788 once invoked, about $0.0005 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-08-31.
Other skills, from other repositories
liveview-patterns
Build LiveView: async data (assignasync), PubSub (check connected?), phx-change events, form components/modals/uploads, streams for lists, livepatch. Use when handling interactions, debugging events, or tracking Presence.
cesiumjs-core-utilities
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility functions like defined, clone, or…
fec-data-fetching
A frontend guide for handling data that comes from a server, including typed requests, caching, refreshing, pagination, and updates. Server state means data owned by an API rather than by a page’s local controls.
litestar-inertia
Auto-activate for litestarvite.inertia, InertiaConfig, component=, @inertia, @inertiajs/, createInertiaApp, useForm, usePage, Link, router, or pages/. Not for HTMX.
litestar-vite
Auto-activate for litestarvite, VitePlugin, ViteConfig, PathConfig, RuntimeConfig, TypeGenConfig, InertiaConfig, vite.config.ts, HMR, typegen, assets, or modes. Not for plain Vite.
litestar-htmx
Auto-activate for litestarhtmx, HTMXPlugin, HTMXConfig, HTMXRequest, HTMXTemplate, HXLocation, ReplaceUrl, TriggerEvent, HX- headers, or Litestar partial HTML. Not for generic browser-side HTMX or Litestar Vite JSON templating — those are client concerns.