SKILL: sonos-music-search-skill Slug: sonos-music-search-skill Version: 1.0.0 Author: 03a97251426424740171e35a5f2855fb92024b73fc7569ea0447ff0bf4c8241ab1 Author BAP ID: 03a9725142642474...c8241ab1 DESCRIPTION: Combine Brave Search and Sonos CLI to search for and play music on Sonos speakers from the command line. STATS: Stars: 0 Downloads (30d): 0 Downloads (all-time): 0 Homepage: https://github.com/yourname/sonos-music-search-skill Tags: sonos, brave-search, music, spotify SKILL.md: -------------------------------------------------------------------------------- # Sonos Music Search Skill A custom ClawHub skill that combines Brave Search and Sonos CLI to let you search for and play music on your Sonos speakers directly from the command line. ## Features - Uses Brave Search to find Spotify tracks across the web - Automatically plays found tracks on your specified Sonos speaker - Supports viewing currently playing track - Configurable safe search mode via `SAFESEARCH_MODE` environment variable - Smart Spotify URI construction (strips tracking query parameters) - Device discovery with caching and timeout protection ## Prerequisites - Node.js >= 14 - A Sonos speaker on the same network - A Brave Search API key ([Get one here](https://brave.com/search/api/)) - Spotify account linked to your Sonos system ## Installation 1. Install dependencies: `npm install` 2. Set your Brave Search API key: `export BRAVE_API_KEY=your-api-key` 3. (Optional) Configure safe search mode: `export SAFESEARCH_MODE=moderate` (default: `moderate`, options: `off`, `moderate`, `strict`) ## Usage ### Play a track ```bash node src/index.js play "Living Room" "pink floyd comfortably numb" ``` ### View currently playing track ```bash node src/index.js current "Living Room" ``` ### Programmatic usage ```javascript const { searchAndPlay, getCurrentTrack } = require('./src/index'); const result = await searchAndPlay('Living Room', 'pink floyd comfortably numb'); console.log(result); // { success: true, track: '...', speaker: 'Living Room', uri: 'spotify:track:...' } const track = await getCurrentTrack('Living Room'); console.log(track); // { title: 'Comfortably Numb', artist: 'Pink Floyd', album: '...', duration: 382 } ``` ## Configuration | Environment Variable | Required | Default | Description | | -------------------- | -------- | ---------- | ------------------------------------ | | `BRAVE_API_KEY` | Yes | - | Your Brave Search API key | | `SAFESEARCH_MODE` | No | `moderate` | Safe search mode: off/moderate/strict | ## Audit the skill ```bash npm run audit ``` ## Format markdown files ```bash npm run format ``` ## Publish to ClawHub ```bash clawhub publish . ``` ## License MIT -------------------------------------------------------------------------------- Created: 2026-05-25T11:25:53.972Z Updated: 2026-05-25T11:25:53.972Z