mralexsaavedra/spotiarr/spotiarr-sse

Claude Code and agent skill by mralexsaavedra/spotiarr

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Trigger: SSE, server-sent events, real-time, useServerEvents, live updates, EventSource. spotiarr SSE pattern: frontend EventSource hook, backend AppEventBus, 4 event types.

Install

npx vskill@latest install mralexsaavedra/spotiarr/spotiarr-sse

SKILL.md

Activation Contract

Load when adding real-time updates, emitting new SSE events, or extending useServerEvents.

Hard Rules

  • Frontend: one SSE connection only — via useServerEvents (hooks/useServerEvents.ts). Never open additional EventSource instances.
  • useServerEvents reacts to events by invalidating TanStack Query caches — NOT by writing to Zustand stores.
  • No reconnection logic exists — if needed, add it inside useServerEvents, nowhere else.
  • Backend: emit SSE events via infrastructure/messaging/app-event-bus.ts only. Never emit from controllers directly.
  • useServerEvents must stay mounted inside the authenticated subtree under <TokenGate> (currently AuthenticatedApp in App.tsx). The /api/events SSE endpoint is gated by require-token; mounting SSE before unlock produces 401s. Never hoist useServerEvents above <TokenGate>.

Event Contracts

Event nameFrontend reaction
playlists-updatedinvalidate playlists, downloadStatus, all tracks[*]
download-history-updatedinvalidate downloadHistory
library-updatedinvalidate libraryStats, libraryArtists, all libraryArtist[*]
feed-updatedinvalidate releases, followedArtists

Adding a New SSE Event

  1. Backend: emit via app-event-bus.ts with a new event name string
  2. Frontend: add a listener in useServerEvents.ts, invalidate the relevant query keys from queryKeys.ts
  3. Shared: if the event payload needs a typed shape, add it to packages/shared/src/index.ts

References

  • Frontend hook: apps/frontend/src/hooks/useServerEvents.ts
  • Query keys: apps/frontend/src/hooks/queryKeys.ts
  • Backend bus: apps/backend/src/infrastructure/messaging/app-event-bus.ts
  • Backend controller: apps/backend/src/presentation/controllers/events.controller.ts
  • Backend route: apps/backend/src/presentation/routes/events.routes.ts

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
35
Repository forks
6
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/mralexsaavedra/spotiarr/spotiarr-sse/badge)](https://verified-skill.com/skills/mralexsaavedra/spotiarr/spotiarr-sse)

Something wrong with this skill or its page? Tell us.