$npx -y skills add kennethleungty/claude-music --skill sourcesSources — add, edit, or remove streams and genres
| 1 | This skill is part of the claude-music plugin. Only invoke when the user explicitly uses the slash command. |
| 2 | |
| 3 | # Sources Manager |
| 4 | |
| 5 | Manage the music streams and genres available in the claude-music plugin. This is a conversational editor — the user tells you what they want to change and you handle the YAML. |
| 6 | |
| 7 | ## Critical Rules |
| 8 | |
| 9 | - You are editing the **claude-music plugin's** stream configuration and NOTHING else. |
| 10 | - The ONLY file you may modify is: `${CLAUDE_PLUGIN_ROOT}/config/sources.yml` |
| 11 | - NEVER edit, create, or modify any other file on the user's system. |
| 12 | - NEVER touch the user's project files, code, or configuration outside the plugin. |
| 13 | |
| 14 | ## On Launch |
| 15 | |
| 16 | First, read the current sources file: |
| 17 | |
| 18 | ```bash |
| 19 | cat "${CLAUDE_PLUGIN_ROOT}/config/sources.yml" |
| 20 | ``` |
| 21 | |
| 22 | Then display a clean summary for the user: |
| 23 | |
| 24 | **Your music sources:** |
| 25 | |
| 26 | For each genre, show: |
| 27 | - Genre name (bold) |
| 28 | - Each stream: name and URL |
| 29 | |
| 30 | At the end, tell the user what they can do: |
| 31 | |
| 32 | > You can ask me to: |
| 33 | > - **Add a stream** — e.g. "add a stream to jazz called KCSM with url http://..." |
| 34 | > - **Add a genre** — e.g. "add a new genre called rock" |
| 35 | > - **Remove a stream** — e.g. "remove Nightwave Plaza from lofi" |
| 36 | > - **Remove a genre** — e.g. "remove the electronic genre" |
| 37 | > - **Enable a genre** — uncomment a commented-out genre (like electronic) |
| 38 | |
| 39 | ## Handling Edits |
| 40 | |
| 41 | When the user asks to make a change: |
| 42 | |
| 43 | 1. **Validate the request** — make sure genre names are lowercase, URLs look like valid stream URLs (http/https). |
| 44 | 2. **Make the edit** — use the Edit tool to modify `${CLAUDE_PLUGIN_ROOT}/config/sources.yml`. Preserve the existing YAML structure: top-level genre keys, 2-space indent for `- name:` list items, 4-space indent for `url:` properties. |
| 45 | 3. **Confirm** — show what changed in a brief, clear message. |
| 46 | 4. **Stay available** — ask if they want to make more changes. |
| 47 | |
| 48 | ### Adding a stream to an existing genre |
| 49 | |
| 50 | Append a new `- name: / url:` entry under that genre's list. Use 2-space indent for list items, 4-space indent for properties: |
| 51 | ```yaml |
| 52 | genre: |
| 53 | - name: Station Name |
| 54 | url: http://stream.url/path |
| 55 | ``` |
| 56 | |
| 57 | ### Adding a new genre |
| 58 | |
| 59 | Add a new top-level key with the same structure as above. |
| 60 | |
| 61 | ### Removing a stream |
| 62 | |
| 63 | Remove the `- name:` and `url:` lines for that stream. |
| 64 | |
| 65 | ### Removing a genre |
| 66 | |
| 67 | Remove the entire genre block. |
| 68 | |
| 69 | ### Enabling a commented-out genre |
| 70 | |
| 71 | Uncomment all lines in the block (remove `# ` prefix). |
| 72 | |
| 73 | ## Style |
| 74 | |
| 75 | - Keep responses short and friendly. |
| 76 | - Use the stream/station names when confirming changes, not raw URLs. |
| 77 | - If the user gives a URL without a name, ask for a name — every stream needs one. |
| 78 | - If the user's request is ambiguous, ask for clarification rather than guessing. |