How this skill is triggered — by the user, by Claude, or both
Slash command
/go-studio:build-sseThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Adds server-sent events for real-time updates (job status, notifications, live data).
Adds server-sent events for real-time updates (job status, notifications, live data).
Confirm with user:
streamName — what is being streamed? (e.g. job-status, notifications, analytics)Read go-stack: pattern://sse-streaming.md
Write internal/services/broker.go — event broker:
type Broker struct {
clients map[string][]chan Event // userID → channels
subscribe chan subscription
unsubscribe chan subscription
publish chan Event
}
Start() — goroutine that manages client channelsSubscribe(userID) → chan EventUnsubscribe(userID, ch)Publish(userID, event) or Broadcast(event)Write SSE handler in internal/handlers/sse.go:
func (h *Handler) Events(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/event-stream")
w.Header().Set("Cache-Control", "no-cache")
w.Header().Set("Connection", "keep-alive")
// subscribe, stream events, handle disconnect
}
Write internal/ui/components/sse_listener.templ:
<div hx-ext="sse" hx-sse="connect:/api/sse"><div hx-sse="swap:{event-name}">Register GET /api/sse in cmd/server/main.go (behind RequireAuth)
Initialize broker in main.go and inject into relevant services that need to emit events
Add heartbeat tick (every 30s) to keep connection alive through proxies
Run go build ./... + templ generate
go build ./... passesGET /api/sse returns Content-Type: text/event-streamnpx claudepluginhub dvrd/ui-studio --plugin dvrdImplements Server-Sent Events (SSE) to stream one-way real-time updates from Express servers to browsers, with client registration and typed event helpers.
Builds event-driven APIs with webhooks, Server-Sent Events, message brokers, event schemas, subscribers, retries, and dead-letter queues.
Builds backend-driven interactive web UIs using Datastar attributes with gomponents-datastar in Go apps. For adding reactivity to server-rendered HTML via signals, bindings, and SSE.