909★by poiley
whatisxlistening-to – OpenClaw Skill
whatisxlistening-to is an OpenClaw Skills integration for data analytics workflows. Query Last.fm listening data, show now playing, sync scrobble history to local DB, and deploy a personal "now playing" web dashboard. Use when user asks about current music, listening stats, scrobble history, or wants to set up a Last.fm dashboard.
Skill Snapshot
| name | whatisxlistening-to |
| description | Query Last.fm listening data, show now playing, sync scrobble history to local DB, and deploy a personal "now playing" web dashboard. Use when user asks about current music, listening stats, scrobble history, or wants to set up a Last.fm dashboard. OpenClaw Skills integration. |
| owner | poiley |
| repository | poiley/whatisxlistening-topath: skills/whatisxlistening-to |
| language | Markdown |
| license | MIT |
| topics | |
| security | L1 |
| install | openclaw add @poiley/whatisxlistening-to:skills/whatisxlistening-to |
| last updated | Feb 7, 2026 |
Maintainer

name: whatisxlistening-to description: Query Last.fm listening data, show now playing, sync scrobble history to local DB, and deploy a personal "now playing" web dashboard. Use when user asks about current music, listening stats, scrobble history, or wants to set up a Last.fm dashboard.
whatisxlistening.to
Last.fm CLI + real-time "now playing" web dashboard.
Live demo: https://whatisbenlistening.to
Quick Start
CLI
# 1. Initialize config
./lastfm init
# Edit ~/.config/lastfm/config.json with your API key
# 2. Test
./lastfm now
./lastfm stats
./lastfm recent
Dashboard
# Docker
docker run -d -p 8765:8765 \
-e LASTFM_API_KEY=your_key \
-e LASTFM_USERNAME=your_user \
-e TZ=America/Los_Angeles \
ghcr.io/poiley/whatisxlistening.to:latest
# → http://localhost:8765
CLI Commands
| Command | Description |
|---|---|
lastfm init | Create config file template |
lastfm now | Show current/last played track |
lastfm stats | Show listening statistics |
lastfm recent [N] | Show N recent tracks (default 10) |
lastfm backfill | Download full listening history to local DB |
lastfm sync | Sync new scrobbles (incremental) |
lastfm search <query> | Search local DB by artist/track/album |
lastfm db | Show local database statistics |
Setup
1. Get Last.fm API Key
- Go to https://www.last.fm/api/account/create
- Create an application (any name)
- Copy your API Key
2. Create Config
./lastfm init
# Then edit ~/.config/lastfm/config.json:
{
"api_key": "YOUR_API_KEY",
"username": "YOUR_LASTFM_USERNAME"
}
Clawdbot Usage
| User Says | Action |
|---|---|
| "What am I listening to?" | lastfm now |
| "My listening stats" | lastfm stats |
| "What did I listen to recently?" | lastfm recent |
| "Search for Radiohead" | lastfm search "Radiohead" |
Dashboard Deployment
Docker
docker run -d -p 8765:8765 \
-e LASTFM_API_KEY=your_key \
-e LASTFM_USERNAME=your_user \
-e DISPLAY_NAME="Your Name" \
-e TZ=America/Los_Angeles \
ghcr.io/poiley/whatisxlistening.to:latest
Kubernetes
See k8s/ directory and README.md for full deployment guide with Kustomize.
kubectl create namespace listening-dashboard
kubectl create secret generic lastfm-credentials \
-n listening-dashboard \
--from-literal=api_key=YOUR_KEY \
--from-literal=username=YOUR_USER
kubectl apply -k k8s/
Environment Variables
| Variable | Required | Description |
|---|---|---|
LASTFM_API_KEY | ✅ | Last.fm API key |
LASTFM_USERNAME | ✅ | Last.fm username |
DISPLAY_NAME | ❌ | Name in header (defaults to username) |
TZ | ❌ | Timezone for "today" stats (e.g., America/Los_Angeles) |
PORT | ❌ | Server port (default: 8765) |
API Endpoints
| Endpoint | Description |
|---|---|
GET / | Now playing dashboard |
GET /history | Listening history page |
GET /healthz | Health check |
GET /api/config | {username, display_name} |
GET /api/now | Current/last track |
GET /api/stats | Listening statistics (total, artists, today, streak) |
GET /api/recent?limit=N&page=N | Recent tracks with album art |
Files
whatisxlistening.to/
├── SKILL.md # Clawdbot skill config
├── lastfm # CLI symlink
├── lastfm_cli.py # CLI source
├── config.example.json # Config template
├── server.py # Dashboard server
├── schema.sql # SQLite schema
├── Dockerfile
├── README.md
├── web/
│ ├── index.html # Now playing page
│ └── history.html # History browser
├── k8s/ # Kubernetes manifests
└── tests/ # 100% coverage
License
MIT
Listening Dashboard
A real-time Last.fm "now playing" dashboard with local SQLite sync. Fork and deploy your own.
Features
- Now Playing — Live track with album art and spinning vinyl effect
- Quick Stats — Total scrobbles, unique artists, today's plays (from local DB)
- History — Paginated listening history at
/history - Auto-refresh — Updates every 5 seconds
- Local SQLite Sync — Background sync to local database for fast stats/history
- Health Endpoint —
/healthzfor Kubernetes probes - Error Handling — Graceful error UI when Last.fm is unavailable
Architecture
The server uses a hybrid approach:
/api/now— Real-time from Last.fm API (always fresh)/api/stats— From local SQLite DB (fast, with API fallback)/api/recent— From local SQLite DB (fast, with API fallback)- Background sync — Periodically syncs scrobbles to local DB
Quick Start
Local Development
# 1. Create config
mkdir -p ~/.config/lastfm
echo '{"api_key": "YOUR_KEY", "username": "YOUR_USER", "display_name": "Your Name"}' > ~/.config/lastfm/config.json
# 2. Run
python3 server.py
# → http://localhost:8765
Docker
docker run -d -p 8765:8765 \
-e LASTFM_API_KEY=your_key \
-e LASTFM_USERNAME=your_lastfm_user \
-e DISPLAY_NAME="Your Name" \
-e TZ=America/Los_Angeles \
ghcr.io/your-username/listening-dashboard:latest
Kubernetes
Uses Kustomize for configuration. See k8s/ directory.
# 1. Create namespace
kubectl create namespace listening-dashboard
# 2. Create secret
kubectl create secret generic lastfm-credentials \
--namespace=listening-dashboard \
--from-literal=api_key=YOUR_KEY \
--from-literal=username=YOUR_USER \
--from-literal=display_name="Your Name"
# 3. Create overlay for your domain
mkdir -p k8s/overlays/prod
cat > k8s/overlays/prod/kustomization.yaml << EOF
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../
images:
- name: listening-dashboard
newName: ghcr.io/your-username/listening-dashboard
newTag: v1.0.0
patches:
- target:
kind: Ingress
name: listening-dashboard
patch: |
- op: replace
path: /spec/rules/0/host
value: listening.your-domain.com
- op: replace
path: /spec/tls/0/hosts/0
value: listening.your-domain.com
EOF
# 4. Apply
kustomize build k8s/overlays/prod | kubectl apply -f -
Configuration
| Env Var | Description |
|---|---|
LASTFM_API_KEY | Your Last.fm API key (get one) |
LASTFM_USERNAME | Your Last.fm username |
DISPLAY_NAME | Name shown in header (defaults to username) |
PORT | Server port (default: 8765) |
DB_PATH | SQLite database path (default: ./scrobbles.db) |
SYNC_INTERVAL | Sync interval in seconds (default: 300) |
TZ | Timezone for "today" stats (e.g., America/Los_Angeles) |
API Endpoints
| Endpoint | Description | Source |
|---|---|---|
/api/config | Get display config (username, display_name) | Config |
/api/now | Current/last played track | Last.fm API |
/api/stats | Listening statistics | Local DB (API fallback) |
/api/recent?limit=N&page=N | Recent tracks | Local DB (API fallback) |
/healthz | Health check (200 OK) | N/A |
/history | History page | Static |
Customization
- Colors: Edit CSS variables in
web/index.html - Fonts: Change Google Fonts imports
- Layout: Modify the HTML structure
Development
# Install test dependencies
pip install -r requirements-test.txt
# Run tests with coverage
pytest --cov=server --cov-report=term-missing
# Run server locally
python server.py
License
MIT License - see LICENSE
Permissions & Security
Security level L1: Low-risk skills with minimal permissions. Review inputs and outputs before running in production.
Requirements
- OpenClaw CLI installed and configured.
- Language: Markdown
- License: MIT
- Topics:
FAQ
How do I install whatisxlistening-to?
Run openclaw add @poiley/whatisxlistening-to:skills/whatisxlistening-to in your terminal. This installs whatisxlistening-to into your OpenClaw Skills catalog.
Does this skill run locally or in the cloud?
OpenClaw Skills execute locally by default. Review the SKILL.md and permissions before running any skill.
Where can I verify the source code?
The source repository is available at https://github.com/openclaw/skills/tree/main/skills/poiley/whatisxlistening-to. Review commits and README documentation before installing.
