Help us improve
Share bugs, ideas, or general feedback.
From spotify-mood
Create a Spotify playlist dynamically tuned to your current health/mood state, neurochemical optimization priorities, and work tempo.
npx claudepluginhub fredzannarbor/spotify-mood-pluginHow this skill is triggered — by the user, by Claude, or both
Slash command
/spotify-mood:spotify-moodThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a Spotify playlist dynamically tuned to your current health/mood state, neurochemical optimization priorities, and work tempo.
Generates personalized music playlists by scanning Apple Music play data and Spotify exports, using mmx CLI for AI songs and album covers. Handles multilingual user prompts.
Issues daily personalized workout prescriptions based on health metrics (recovery, sleep, cycle, labs) and emotional state. Tracks progressive overload, programs deloads, and drops plans into Google Calendar.
Designs a systematic sleep protocol to optimize sleep quality, duration, and circadian rhythm alignment.
Share bugs, ideas, or general feedback.
Create a Spotify playlist dynamically tuned to your current health/mood state, neurochemical optimization priorities, and work tempo.
Usage: /spotify-mood [optional override]
Examples:
$ARGUMENTS - Optional mood/mode override. If empty, auto-detect from data sources.
Database: Read healthDatabase path from ~/.spotify-mood/config.json. If not configured, prompt the user to run /spotify-mood-setup.
The plugin expects a SQLite database with these tables:
health_metrics table (quantitative data):
| Column | Type | Description |
|---|---|---|
| date | TEXT | ISO date |
| metric_type | TEXT | sleep_hours, hrv, caffeine, exercise_mins, steps, daylight_mins |
| value | REAL | Numeric value |
| unit | TEXT | hours, ms, mg, minutes, steps |
daily_logs table (subjective data):
| Column | Type | Description |
|---|---|---|
| date | TEXT | ISO date |
| mood_score | INTEGER | 1-10 scale |
| energy_level | INTEGER | 1-10 scale |
Query current state:
-- Last night's sleep
SELECT value as sleep_hours FROM health_metrics
WHERE metric_type = 'sleep_hours' AND date >= date('now', '-1 day')
ORDER BY date DESC LIMIT 1;
-- Today's mood and energy
SELECT mood_score, energy_level FROM daily_logs
WHERE date = date('now') ORDER BY time DESC LIMIT 1;
-- Today's HRV (stress indicator)
SELECT AVG(value) as avg_hrv FROM health_metrics
WHERE metric_type = 'hrv' AND date = date('now');
-- Today's caffeine
SELECT value as caffeine_mg FROM health_metrics
WHERE metric_type = 'caffeine' AND date = date('now') LIMIT 1;
-- Today's exercise
SELECT value as exercise_mins FROM health_metrics
WHERE metric_type = 'exercise_mins' AND date = date('now') LIMIT 1;
Read from ~/.spotify-mood/preferences.json (created by /feed-prefs):
learning_weight (Acetylcholine) — focused, educationalengagement_weight (Dopamine) — social, rewardingbreakthrough_weight (Norepinephrine) — novel, surprisingmood_weight (Serotonin/Endorphins) — uplifting, warmRun /work-tempo logic inline to determine current work context:
sleep_factor = clamp(sleep_hours / 7.0, 0, 1.5)
energy_factor = clamp(energy_level / 10.0, 0, 1)
mood_factor = clamp(mood_score / 10.0, 0, 1)
stress_factor = 1.0 - clamp(avg_hrv / 60.0, 0, 1) # Low HRV = high stress
caffeine_factor = clamp(caffeine_mg / 300.0, 0, 1)
| Composite State | Profile | BPM Range | Energy | Valence |
|---|---|---|---|---|
| Low sleep + low mood | Recovery | 60-90 | Low | Warm |
| Low sleep + OK mood | Gentle Focus | 70-100 | Low-Med | Neutral |
| Good sleep + high energy | Power Mode | 110-140 | High | High |
| Good sleep + low energy | Activation | 90-120 | Med-High | Positive |
| High stress (low HRV) | Calm Down | 50-80 | Low | Warm |
| High caffeine + high energy | Channel It | 120-150 | High | Varied |
| Evening + any | Wind Down | 50-85 | Low | Warm |
| Weekend + good mood | Groove | 100-130 | Med | High |
| Weight Priority | Music Characteristics |
|---|---|
| High Learning (Acetylcholine) | Instrumental, ambient, minimal lyrics |
| High Engagement (Dopamine) | Familiar favorites, sing-along, rhythmic |
| High Breakthrough (Norepinephrine) | Eclectic, genre-crossing, unexpected |
| High Mood (Serotonin) | Warm, uplifting, major key, feel-good |
Use genre pools from data/genre-pools.json to build 20-30 Spotify searches. Mix:
Read credentials from the user's .env file (path configured in ~/.spotify-mood/config.json):
SPOTIFY_CLIENT_ID → set as SPOTIPY_CLIENT_IDSPOTIFY_CLIENT_SECRET → set as SPOTIPY_CLIENT_SECRETSPOTIFY_REDIRECT_URI → set as SPOTIPY_REDIRECT_URIToken cache: ~/.spotify-mood/.spotify_cache
Requires Python package spotipy. If not available, install via:
uv pip install spotipy
Include detected state and date:
MOOD-AWARE PLAYLIST GENERATOR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HEALTH STATE
Sleep: 6.2 hrs
Mood: 7/10
Energy: 6/10
HRV: 42 ms (moderate stress)
Caffeine: 100 mg
NEUROCHEMICAL WEIGHTS
Learning: 0.25 | Engagement: 0.30
Breakthrough: 0.25 | Mood: 0.20
WORK TEMPO
Time: 2:30 PM (afternoon)
Day: Monday (work day)
MUSIC PROFILE: Gentle Focus + Mood Boost
BPM: 70-100 | Energy: Low-Med | Valence: Warm-Positive
Creating playlist...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Created: "Gentle Focus Monday PM — Feb 17" — 22 tracks
URL: https://open.spotify.com/playlist/...
Then open the playlist URL.
If sleep < 5 hours, automatically switch to Recovery profile regardless of other factors and display a gentle notice:
Note: Sleep was below 5 hours. Switching to Recovery mode.
Recovery playlists prioritize calm, restorative music.
If health database is not configured or empty: