implement-service-stream

Implement event streaming support for Sonos services in the sonos-stream crate with polling fallback.

1|1|Updated Dec 6, 2025
One-click install
npx skills add https://github.com/tatimblin/sonos-sdk --skill implement-service-stream
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implement-service-stream
Source: https://github.com/tatimblin/sonos-sdk/tree/main/.claude/skills/implement-service-stream
Command: npx skills add https://github.com/tatimblin/sonos-sdk --skill implement-service-stream

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of adding event streaming capabilities to new Sonos services within the sonos-stream crate, ensuring real-time state updates and providing a fallback polling mechanism.

Core Features & Use Cases

  • Event Type Definition: Define Rust structs for service-specific events.
  • Event Processor Integration: Map incoming API events to the stream's event data structure.
  • Polling Fallback: Implement a polling strategy to detect state changes when event subscriptions fail.
  • Use Case: After implementing a new Sonos service in sonos-api, use this Skill to quickly integrate its event notifications into the sonos-stream component, enabling live state tracking for that service.

Quick Start

Use the implement-service-stream skill to add event streaming support for the NewService.

Frequently Asked Questions about implement-service-stream

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add event streaming to a custom Sonos service in Rust?

Event streaming for Sonos services enables real-time state synchronization and resilience against network interruptions by mapping incoming API events to a stream's data structure and using polling to detect changes when subscriptions fail.

What is the best way to handle state synchronization failures for Sonos event subscriptions?

Implementing a polling fallback strategy detects state changes when event subscriptions fail, ensuring your custom service integrations maintain resilience against network interruptions and continue tracking live state.

Do I need to implement a Sonos service API before adding event streaming support?

Yes, this process requires prior implementation of the new Sonos service within the sonos-api, because the event processor needs existing API event definitions to map incoming data to the stream's event data structure.

How does an event processor map incoming API events for Sonos streaming?

An event processor maps incoming API events for Sonos streaming by translating service-specific API notifications into the stream's standardized event data structure, enabling live state tracking for the custom service.

When should I use polling instead of event-driven streaming for Sonos services?

You should use polling as a fallback mechanism when event subscriptions fail or network interruptions occur, allowing the system to actively detect state changes rather than waiting for missed event-driven notifications.