Coding

Workday Music Greeting

Try it

Auto-switch music scenes by workday time slot and send matching greeting emails with scene-specific GIFs. Combines home-music scene control with IMAP/SMTP em...

What it does

Auto-switch music scenes by workday time slot, and send a greeting email with a matching GIF — all in one command or cron job.

The skill document

🎶 Workday Music Greeting

Auto-switch music scenes by workday time slot, and send a greeting email with a matching GIF — all in one command or cron job.

    🌅 ──► ☕ ──► 💻 ──► 😌 ──► 🌙
   morning  focus  working  chill   off

What It Does

Time SlotMusic SceneGreeting ThemeExample GIF
🌅 Morning (6–9)morningRise & shine☀️ sunrise GIF
☕ Focus (9–12)focusDeep work time🔥 laser-focus GIF
💻 Working (12–14)workingKeep going!💪 hustle GIF
😌 Chill (14–18)chillWind down🍵 tea-time GIF
🌙 Off (18+)offGood night🌙 moon GIF

Quick Start

# Run the current time-slot scene + send greeting email
node scripts/workday-greeting.js

That's it. The script:

  1. Detects the current time slot
  2. Switches to the matching music scene (via home-music)
  3. Sends a greeting email with an embedded GIF matching the scene

Configuration

Environment Variables

Copy .env.example to .env and fill in:

# Email (SMTP) — required for sending greetings
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=you@gmail.com
SMTP_PASS=your_app_password
GREETING_TO=recipient@example.com
GREETING_FROM=you@gmail.com

# Music scene command (default: home-music)
MUSIC_CMD=home-music

GIF Configuration

GIF URLs are defined in scripts/gifs.json. Replace with your own:

{
  "morning":  "https://media.giphy.com/media/l0MYt5jPR6QX5APm0/giphy.gif",
  "focus":    "https://media.giphy.com/media/3o7btNa0RUYa5E7iiQ/giphy.gif",
  "working":  "https://media.giphy.com/media/3o7qDEq2bMbcbPRQ2c/giphy.gif",
  "chill":    "https://media.giphy.com/media/l2JIdnF6aCnBRSgQU/giphy.gif",
  "off":      "https://media.giphy.com/media/l1J9u3TZfp1DLh2Wk/giphy.gif"
}

Time Slot Overrides

Edit scripts/slots.json to customize time boundaries:

{
  "morning": { "start": 6, "end": 9 },
  "focus":   { "start": 9, "end": 12 },
  "working": { "start": 12, "end": 14 },
  "chill":   { "start": 14, "end": 18 },
  "off":     { "start": 18, "end": 6 }
}

CLI Usage

# Auto-detect slot and run
node scripts/workday-greeting.js

# Force a specific slot
node scripts/workday-greeting.js --slot morning

# Music only (no email)
node scripts/workday-greeting.js --music-only

# Email only (no music scene switch)
node scripts/workday-greeting.js --email-only

# Dry run (show what would happen)
node scripts/workday-greeting.js --dry-run

Cron / Scheduled Automation

Set up as an OpenClaw cron job for fully automatic daily operation:

# Every weekday at 8:00 AM — morning scene + greeting
0 8 * * 1-5  node scripts/workday-greeting.js --slot morning

# Every weekday at 9:00 AM — focus scene
0 9 * * 1-5  node scripts/workday-greeting.js --slot focus

# Every weekday at 6:00 PM — wind down + good evening
0 18 * * 1-5  node scripts/workday-greeting.js --slot off

Or use OpenClaw's cron tool:

{
  "schedule": { "kind": "cron", "expr": "0 8 * * 1-5", "tz": "Asia/Shanghai" },
  "payload": { "kind": "agentTurn", "message": "Run workday-music-greeting for morning slot" }
}

Greeting Email Format

The email is sent as HTML with an inline GIF:

Subject: 🌅 Good Morning! Time to rise and shine

Body:
  ☀️ Good Morning!
  Switching to morning music scene.
  Have a wonderful day! 🎶
  
  — Sent by Workday Music Greeting 🎶

File Structure

workday-music-greeting/
├── SKILL.md              # This file
├── scripts/
│   ├── workday-greeting.js   # Main orchestration script
│   ├── send-greeting.js      # Email sending logic
│   ├── gifs.json             # GIF URL config per slot
│   └── slots.json            # Time slot definitions
├── assets/
│   └── (optional local GIFs)
├── .env.example          # Environment template
└── package.json

Dependencies

  • home-music skill — for music scene switching
  • imap-smtp-email skill — for SMTP email sending (uses nodemailer)
  • Node.js 18+

Install

cd skills/workday-music-greeting
npm install

Troubleshooting

IssueFix
Music not switchingVerify home-music is installed and MUSIC_CMD is correct
Email not sendingCheck .env SMTP credentials; test with node scripts/send-greeting.js --test
Wrong time slotCheck slots.json boundaries; use --slot to override
GIF not loadingReplace URLs in gifs.json; some Giphy links expire

License

MIT

Related skills

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván854 installs69 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Post videos, photos, text, and documents to 10 social platforms through a single REST API call.

by victorcavero14375 installs50 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván555 installs18 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai21 installs8 stars

Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.

by byungkyu800 installs42 stars

More from terrycarter1985

Browse all skills

Grade English homework for Chinese primary students in grades 3–6 with consistent, age-appropriate feedback.

by terrycarter198517 installs

Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management (create, add, remove assets), crypto analysis (Top 20 by market c...

by terrycarter198524 installs

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

by terrycarter198519 installs

Generate reusable, policy-aligned customer service replies for e-commerce aftersales scenarios. Use when support staff need fast, compliant Chinese responses...

by terrycarter198518 installs

Control whole-house music scenes combining Spotify playback with Airfoil speaker routing. Quick presets for morning, party, chill modes.

by terrycarter198516 installs

Comprehensive developer cheatsheets and quick references for Git, Docker, Kubernetes, jq, curl, and common Linux commands. Use when needing quick lookups for...

by terrycarter198516 installs