← 返回 Skills 市场
asteinberger

Home Music

作者 Andy Steinberger · GitHub ↗ · v1.0.0
darwin ✓ 安全检测通过
2108
总下载
1
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install home-music
功能描述
Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.
使用说明 (SKILL.md)
    ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫
    
    🏠  H O M E   M U S I C  🎵
    
    ╔══════════════════════════════════════════╗
    ║   Whole-House Music Scenes               ║
    ║   One command. All speakers. Perfect.    ║
    ╚══════════════════════════════════════════╝
    
    ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫ ♪ ♫

"Why click 17 times when one command does the job?" – Owen 🐸


🎯 What Does This Skill Do?

Home Music combines Spotify + Airfoil into magical music scenes. One command – and the right playlist plays on the right speakers at the perfect volume.

Imagine:

  • You wake up → home-music morning → Gentle tunes in the bathroom
  • Friends arrive → home-music party → All speakers blasting rock
  • Time to relax → home-music chill → Lounge vibes everywhere
  • Done for the day → home-music off → Silence. Peace. Serenity.

📋 Dependencies

What Why Link
🍏 macOS This skill uses AppleScript
🟢 Spotify Desktop App The music source! Must be running. spotify.com
📡 Airfoil Routes audio to AirPlay speakers rogueamoeba.com
🎵 spotify-applescript Clawdbot skill for Spotify control skills/spotify-applescript/

⚠️ Important: Both Spotify and Airfoil must be running before you start any scenes!


🎬 Scenes

🌅 Morning

A gentle start to your day

home-music morning
  • Speaker: Sonos Move
  • Volume: 40%
  • Playlist: Morning Playlist
  • Vibe: ☕ Coffee + good vibes

🎉 Party

Time to celebrate!

home-music party
  • Speaker: ALL (Computer, MacBook, Sonos Move, Living Room TV)
  • Volume: 70%
  • Playlist: Rock Party Mix
  • Vibe: 🤘 Neighbors hate this one trick

😌 Chill

Pure relaxation

home-music chill
  • Speaker: Sonos Move
  • Volume: 30%
  • Playlist: Chill Lounge
  • Vibe: 🧘 Om...

🔇 Off

Silence

home-music off
  • Pauses Spotify
  • Disconnects all speakers
  • Vibe: 🤫 Finally, peace and quiet

📊 Status

What's playing right now?

home-music status

Shows:

  • Current Spotify track
  • Connected speakers

🔧 Installation

# Make the script executable
chmod +x ~/clawd/skills/home-music/home-music.sh

# Symlink for global access
sudo ln -sf ~/clawd/skills/home-music/home-music.sh /usr/local/bin/home-music

Now home-music works from anywhere in your terminal! 🎉


🎨 Custom Playlists & Scenes

Changing Playlists

Open home-music.sh and find the playlist configuration:

# === PLAYLIST CONFIGURATION ===
PLAYLIST_MORNING="spotify:playlist:19n65kQ5NEKgkvSAla5IF6"
PLAYLIST_PARTY="spotify:playlist:37i9dQZF1DXaXB8fQg7xif"
PLAYLIST_CHILL="spotify:playlist:37i9dQZF1DWTwnEm1IYyoj"

How to find Playlist URIs:

  1. Right-click on a playlist in Spotify
  2. "Share" → "Copy Spotify URI"
  3. Or copy the URL and extract the /playlist/ part

Adding a New Scene

Add a new case in the main block:

# In home-music.sh after the "scene_chill" function:

scene_workout() {
    echo "💪 Starting Workout scene..."
    airfoil_set_source_spotify
    airfoil_connect "Sonos Move"
    sleep 0.5
    airfoil_volume "Sonos Move" 0.8
    "$SPOTIFY_CMD" play "spotify:playlist:YOUR_WORKOUT_PLAYLIST"
    "$SPOTIFY_CMD" volume 100
    echo "✅ Workout: Sonos Move @ 80%, Pump it up!"
}

# And in the case block:
    workout)
        scene_workout
        ;;

Available Speakers

ALL_SPEAKERS=("Computer" "Andy's M5 Macbook" "Sonos Move" "Living Room TV")

You can add any AirPlay speaker – they just need to be visible in Airfoil.


🐛 Troubleshooting

❌ "Speaker won't connect"

Check 1: Is Airfoil running?

pgrep -x Airfoil || echo "Airfoil is not running!"

Check 2: Is the speaker on the network?

  • Open the Airfoil app
  • Check if the speaker appears in the list
  • Try connecting manually

Check 3: Is the name exactly correct?

  • Speaker names are case-sensitive!
  • Open Airfoil and copy the exact name

❌ "No sound"

Check 1: Is Spotify playing?

~/clawd/skills/spotify-applescript/spotify.sh status

Check 2: Is the Airfoil source correct?

  • Open Airfoil
  • Check if "Spotify" is selected as the audio source
  • If not: Click "Source" → Select Spotify

Check 3: Speaker volume?

# Manually check volume
osascript -e 'tell application "Airfoil" to get volume of (first speaker whose name is "Sonos Move")'

❌ "Spotify won't start"

Is Spotify open?

pgrep -x Spotify || open -a Spotify

Is spotify-applescript installed?

ls ~/clawd/skills/spotify-applescript/spotify.sh

❌ "Permission denied"

chmod +x ~/clawd/skills/home-music/home-music.sh

🔊 Direct Airfoil Commands

If you want to control Airfoil manually:

# Connect a speaker
osascript -e 'tell application "Airfoil" to connect to (first speaker whose name is "Sonos Move")'

# Set speaker volume (0.0 - 1.0)
osascript -e 'tell application "Airfoil" to set (volume of (first speaker whose name is "Sonos Move")) to 0.5'

# Disconnect a speaker
osascript -e 'tell application "Airfoil" to disconnect from (first speaker whose name is "Sonos Move")'

# List connected speakers
osascript -e 'tell application "Airfoil" to get name of every speaker whose connected is true'

# Set audio source
osascript -e 'tell application "Airfoil"
    set theSource to (first application source whose name contains "Spotify")
    set current audio source to theSource
end tell'

📁 Files

skills/home-music/
├── SKILL.md        # This documentation
└── home-music.sh   # The main script

💡 Pro Tips

  1. Set aliases for even faster access:

    alias mm="home-music morning"
    alias mp="home-music party"
    alias mc="home-music chill"
    alias mo="home-music off"
    
  2. Use with Clawdbot:

    "Hey, start party mode" "Put on some chill music" "Stop the music"

  3. Combine scenes: Create a dinner scene with a jazz playlist at 25% – perfect for guests!


🐸 Credits

╭─────────────────────────────────────────────╮
│                                             │
│   Crafted with 💚 by Owen the Frog 🐸      │
│                                             │
│   "Ribbit. Music makes everything better."  │
│                                             │
╰─────────────────────────────────────────────╯

Author: Andy Steinberger (with help from his Clawdbot Owen the Frog 🐸)
Version: 1.0.0
License: MIT
Pond: The one with the water lilies 🪷


Did this skill improve your life? Owen appreciates flies. 🪰

安全使用建议
This skill appears to be what it claims: a macOS script that uses AppleScript to control Airfoil and a local spotify-applescript helper to control Spotify. Before installing: (1) open home-music.sh and change SPOTIFY_CMD to the correct path for your machine (the provided path is hardcoded to another user's home), (2) inspect the contents of the spotify-applescript/spotify.sh helper to ensure it does only the actions you expect, (3) confirm Airfoil and Spotify are installed and running and that your speaker names match exactly, (4) be aware the install instructions ask you to create a symlink in /usr/local/bin (requires sudo), and (5) grant any required macOS accessibility/AppleScript permissions when prompted. If you want lower risk, run the script manually from its folder before creating the global symlink.
功能分析
Type: OpenClaw Skill Name: home-music Version: 1.0.0 This skill is designed to control whole-house music scenes using Spotify and Airfoil on macOS. It uses AppleScript (`osascript`) to interact with the Airfoil application and relies on a local `spotify-applescript` skill for Spotify control. The `SKILL.md` provides clear installation instructions, including a `sudo ln -sf` command to create a symlink for global access, which is a common practice for CLI tools and not indicative of malicious intent. There is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts against the agent. All actions are aligned with the stated purpose.
能力评估
Purpose & Capability
Name/description match the code and instructions: the script uses osascript to control Airfoil and calls a local spotify-applescript helper to drive Spotify, which is exactly what's needed for whole-house scenes. Minor inconsistency: the script hardcodes SPOTIFY_CMD to /Users/asteinberger/..., while the README suggests ~/clawd/skills/spotify-applescript/spotify.sh — you will likely need to edit that path for your environment.
Instruction Scope
SKILL.md and the script stay within the stated domain (controlling Airfoil and Spotify). Instructions ask you to chmod and symlink the script (writes /usr/local/bin) and to run AppleScript commands; nothing in the instructions asks the agent to read unrelated system secrets or external endpoints. You should confirm speaker names and the spotify-applescript helper before use.
Install Mechanism
No automated install spec or remote downloads—this is instruction-only plus a local script. The only write action the guide instructs is a user-run sudo ln -sf into /usr/local/bin (normal for making a CLI available). No third-party packages or remote archives are fetched by the skill itself.
Credentials
The skill requests no environment variables or external credentials, which fits its purpose. Caveat: the script references a hardcoded absolute path to a spotify-applescript helper under a specific user home; that is not a credential leak but will break unless adjusted to your environment. Also inspect the spotify-applescript script (a required dependency) since it actually performs Spotify actions.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or global agent configuration. The only persistent change the install guide recommends is creating a symlink in /usr/local/bin (requires sudo).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install home-music
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /home-music 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release - Whole-house music scenes with Spotify + Airfoil
元数据
Slug home-music
版本 1.0.0
许可证
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Home Music 是什么?

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 2108 次。

如何安装 Home Music?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install home-music」即可一键安装,无需额外配置。

Home Music 是免费的吗?

是的,Home Music 完全免费(开源免费),可自由下载、安装和使用。

Home Music 支持哪些平台?

Home Music 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin)。

谁开发了 Home Music?

由 Andy Steinberger(@asteinberger)开发并维护,当前版本 v1.0.0。

💬 留言讨论