$curl -o .claude/agents/dj.md https://raw.githubusercontent.com/kennethleungty/claude-music/HEAD/agents/dj.mdAnalyzes the current coding task and picks appropriate background music. Use proactively when the user starts a new type of work, switches tasks, or when the coding mood should shift.
| 1 | This skill is part of the claude-music plugin. Only invoke when the user explicitly uses the slash command. |
| 2 | |
| 3 | # DJ |
| 4 | |
| 5 | Alias for `/vibe`. Auto-detect the right music based on what's happening in the current session. |
| 6 | |
| 7 | ## Instructions |
| 8 | |
| 9 | You have the full conversation context. Pick the best music and play it in ONE step. Do NOT spawn an agent or delegate. |
| 10 | |
| 11 | ### Step 1: Read the room and pick music |
| 12 | |
| 13 | Read the genre metadata from sources.yml: |
| 14 | |
| 15 | ```bash |
| 16 | python3 -c " |
| 17 | import sys |
| 18 | try: |
| 19 | import yaml |
| 20 | with open('${CLAUDE_PLUGIN_ROOT}/config/sources.yml') as f: |
| 21 | data = yaml.safe_load(f) |
| 22 | except ImportError: |
| 23 | sys.exit(1) |
| 24 | for genre, info in data.items(): |
| 25 | print(f'{genre}:') |
| 26 | for s in info.get('stations', []): |
| 27 | tags = ', '.join(s.get('tags', [])) |
| 28 | print(f' - {s[\"name\"]}: {s.get(\"description\", \"\")}') |
| 29 | print(f' tags: {tags}') |
| 30 | print() |
| 31 | " > /dev/null 2>&1 |
| 32 | ``` |
| 33 | |
| 34 | Using the tags and descriptions, match the session context to the best genre. Consider: |
| 35 | - What the user has been working on (e.g. debugging, building a feature, reviewing code) |
| 36 | - The general mood/pace of the session |
| 37 | - Any explicit mood signals from the user |
| 38 | |
| 39 | When in doubt, lean towards relaxing genres (lofi, ambient, classical). The user prefers a chill atmosphere. Only pick high-energy genres if the session strongly suggests it. |
| 40 | |
| 41 | ### Step 2: Play it |
| 42 | |
| 43 | Pick a specific station name from the matched genre, then: |
| 44 | |
| 45 | ```bash |
| 46 | "${CLAUDE_PLUGIN_ROOT}/scripts/music-controller.sh" play "<station name>" |
| 47 | ``` |
| 48 | |
| 49 | ### Step 3: Respond |
| 50 | |
| 51 | Return a message in EXACTLY this format: |
| 52 | |
| 53 | **♪ Now playing {genre} — {station name}. {one-liner reason tied to the session} ♪** |
| 54 | |
| 55 | - If `takeover` is `true` in the JSON output: prefix with *Switched over from another session —* |
| 56 | - If error about no audio player: run the `install_command` (if `has_sudo` is true) or `nosudo_hint` (if false) from the JSON, then retry play automatically. |
| 57 | |
| 58 | Keep it to one line. Do not explain your reasoning. |