---
name: "turbo-hotwire-html-streaming"
description: "Stream HTML fragment updates over WebSockets and accelerate page navigation with Hotwire Turbo."
metadata:
  author: "Basecamp"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure turbo frames"
  - "turbo stream append html"
  - "hotwire turbo drive"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Hotwire Turbo Drive, Frames & Streams Architecture

Implements Hotwire Turbo: Turbo Drive for accelerated link clicks, Turbo Frames for scoped partial page updates (<turbo-frame>), and Turbo Streams (<turbo-stream action='append'>) over WebSockets/SSE.

## When to Invoke
Invoke this skill whenever you need to:
- configure turbo frames
- turbo stream append html
- hotwire turbo drive

## Execution SOP & Rules
1. Include @hotwired/turbo in application bundle.
2. Wrap independent widgets: <turbo-frame id='comments_list'><a href='...'>Next</a></turbo-frame>.
3. Return stream responses with Content-Type: text/vnd.turbo-stream.html.
4. Emit stream actions: <turbo-stream action='append' target='messages'><template><div .../></template></turbo-stream>.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
