(as of the latest versions of openclaw this is somewhat broken, you can instruct your crustacean to fix it once you install it - I can't keep up, y'all! LOL)
Your personal Last.fm musical commentator that finds the hidden threads connecting your listening and makes you actually hear them differently.
Every 30 minutes during waking hours (configurable), ScrobbleClaw:
- Monitors your Last.fm recent tracks
- Analyzes the last 5-10 songs for hidden connections
- Researches deeper context via Wikipedia and MusicBrainz
- Discovers overlaps: producers, directors, session musicians, sample sources
- Comments with one sharp, reference-dense insight that makes you pause mid-track
- Archives the best insights for future reference
Goal: Make you say "wait, what?!" and hear familiar music in a completely new way.
"Sledgehammer—the quintessential Peter Gabriel track. Do you remember the music video with the crazy claymation? Stephen R. Johnson, the director, was also behind the first season of Pee-Wee's Playhouse... who knew?!"
That connection between an iconic music video and a surreal children's TV show is exactly the kind of thread ScrobbleClaw lives to find.
- Python 3.7+
- Last.fm account with API access
- OpenClaw workspace (optional but recommended)
# Clone into your OpenClaw skills directory
cd ~/.openclaw/workspace/skills/
git clone https://github.com/yourusername/scrobble-claw.git scrobble-claw
# Configure your Last.fm credentials
cd scrobble-claw
cp config.json.example config.json
# Edit config.json with your Last.fm username
# Install dependencies
pip install requests
# Add your API key to secrets
echo "LASTFM_API_KEY=your_api_key_here" >> ~/.openclaw/secrets.env- Sign in to Last.fm
- Create an API account at https://www.last.fm/api/account/create
- Copy your API key
{
"lastfm": {
"username": "YOUR_LAST_FM_USERNAME"
},
"settings": {
"waking_hours_start": 6,
"waking_hours_end": 23,
"check_interval_minutes": 30,
"tracks_to_analyze": 5
}
}# ~/.openclaw/secrets.env
LASTFM_API_KEY=your_actual_api_key_hereTest with sample data (no API calls):
python3 scripts/scrobbleclaw.py --test-commentCheck Last.fm and generate a comment if patterns are found:
python3 scripts/scrobbleclaw.py --checkScrobbleClaw looks for connections like:
- Producer overlaps: Same producer across different artists/genres
- Session musicians: Musicians appearing across multiple tracks
- Director connections: Music video directors with surprising other works
- Sample sources: Tracks sampling the same original recording
- Studio links: Same recording studios across different eras
- Cross-disciplinary work: Musicians who also worked in TV, film, etc.
- Genre bridge: Artists who connect seemingly unrelated genres
When a pattern is found:
- Identifies the shared connection
- Researches deeper context via MusicBrainz and Wikipedia
- Crafts a punchy, reference-dense comment
- Outputs:
COMMENT_READY: <comment text> - Archives best insights to
data/insights.md
No complex database - just simple, auditable files:
data/listening_history.tsv- Track timestamps (auto-rotates to last 50 entries)data/insights.md- Curated best comments (grows indefinitely)data/scrobbleclaw-notifications.log- Comment delivery logdata/scrobbleclaw.log- Debug log (not tracked by git)
scrobble-claw/
├── README.md # This file
├── SKILL.md # OpenClaw integration docs
├── QUICKSTART.md # Quick setup guide
├── PROJECT_SUMMARY.md # Technical architecture notes
├── config.json.example # Configuration template
├── .gitignore # Excludes logs and cache
├── data/ # Runtime data (git-tracked except logs)
│ ├── insights.md # Archive of best comments
│ ├── listening_history.tsv # Recent track history
│ └── scrobbleclaw-notifications.log
└── scripts/
├── scrobbleclaw.py # Main script
├── musicbrainz_utils.py # MusicBrainz API helpers
├── debug_comments.py # Debug and test utilities
└── test_*.py # Various test scripts
Add to HEARTBEAT.md:
scrobbleclaw-check: Run ScrobbleClaw check for Last.fm patterns and comment if found
Or configure a cron job:
*/30 6-23 * * * cd /path/to/scrobble-claw && python3 scripts/scrobbleclaw.py --checkFrom OpenClaw CLI:
openclaw gateway wake "scrobbleclaw-check"ScrobbleClaw is intentionally minimal. We're not building a data warehouse of your listening habits—we're building a delightful music nerd that occasionally makes you go "holy shit" mid-song.
Less is more. But when it hits, it hits.
No comments generated: Not every check finds a pattern. That's normal and intentional.
API rate limits: ScrobbleClaw includes delays to be polite. If you hit limits, wait an hour or adjust check frequency.
Want more verbose logging: Check data/scrobbleclaw.log (created at runtime)
Need to reset history: Delete or archive data/listening_history.tsv to start fresh
- Never commit secrets.env or keys
- All API keys belong in
~/.openclaw/secrets.env(outside workspace) - Log files are intentionally not tracked by git
- Review
.gitignorebefore adding sensitive data
Contributions welcome:
- Fork and create a feature branch
- Add tests for new pattern detection logic
- Update documentation
- Submit pull request
MIT License - feel free to adapt for your own crustacean.
- Discord/Slack channel integration options
- More sophisticated pattern detection algorithms
- Configurable comment persona (music critic, music nerd, etc.)
- Async processing for faster response
- Historical analysis mode (not just recent tracks)
- Multi-user support
Built with Python, curiosity, and the joy of discovering that the bassist from your favorite 90s alt-rock band also played on a Motown track you've heard 1000 times.