skills$openclaw/whatisxlistening-to
poiley909

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.

909 stars8.0k forksSecurity L1
Updated Feb 7, 2026Created Feb 7, 2026data analytics

Skill Snapshot

namewhatisxlistening-to
descriptionQuery 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.
ownerpoiley
repositorypoiley/whatisxlistening-topath: skills/whatisxlistening-to
languageMarkdown
licenseMIT
topics
securityL1
installopenclaw add @poiley/whatisxlistening-to:skills/whatisxlistening-to
last updatedFeb 7, 2026

Maintainer

poiley

poiley

Maintains whatisxlistening-to in the OpenClaw Skills directory.

View GitHub profile
File Explorer
23 files
whatisxlistening-to
k8s
overlays
example
kustomization.yaml
767 B
deployment.yaml
1.6 KB
ingress.yaml
704 B
kustomization.yaml
1.0 KB
namespace.yaml
69 B
service.yaml
194 B
tests
__init__.py
test_server.py
43.8 KB
web
history.html
9.8 KB
index.html
12.5 KB
config.example.json
77 B
lastfm_cli.py
13.7 KB
pyproject.toml
230 B
README.md
3.9 KB
requirements-test.txt
18 B
schema.sql
892 B
server.py
18.2 KB
SKILL.md
3.8 KB
SKILL.md

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

CommandDescription
lastfm initCreate config file template
lastfm nowShow current/last played track
lastfm statsShow listening statistics
lastfm recent [N]Show N recent tracks (default 10)
lastfm backfillDownload full listening history to local DB
lastfm syncSync new scrobbles (incremental)
lastfm search <query>Search local DB by artist/track/album
lastfm dbShow local database statistics

Setup

1. Get Last.fm API Key

  1. Go to https://www.last.fm/api/account/create
  2. Create an application (any name)
  3. 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 SaysAction
"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

VariableRequiredDescription
LASTFM_API_KEYLast.fm API key
LASTFM_USERNAMELast.fm username
DISPLAY_NAMEName in header (defaults to username)
TZTimezone for "today" stats (e.g., America/Los_Angeles)
PORTServer port (default: 8765)

API Endpoints

EndpointDescription
GET /Now playing dashboard
GET /historyListening history page
GET /healthzHealth check
GET /api/config{username, display_name}
GET /api/nowCurrent/last track
GET /api/statsListening statistics (total, artists, today, streak)
GET /api/recent?limit=N&page=NRecent 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

README.md

Listening Dashboard

A real-time Last.fm "now playing" dashboard with local SQLite sync. Fork and deploy your own.

Dashboard Preview License

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/healthz for 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 VarDescription
LASTFM_API_KEYYour Last.fm API key (get one)
LASTFM_USERNAMEYour Last.fm username
DISPLAY_NAMEName shown in header (defaults to username)
PORTServer port (default: 8765)
DB_PATHSQLite database path (default: ./scrobbles.db)
SYNC_INTERVALSync interval in seconds (default: 300)
TZTimezone for "today" stats (e.g., America/Los_Angeles)

API Endpoints

EndpointDescriptionSource
/api/configGet display config (username, display_name)Config
/api/nowCurrent/last played trackLast.fm API
/api/statsListening statisticsLocal DB (API fallback)
/api/recent?limit=N&page=NRecent tracksLocal DB (API fallback)
/healthzHealth check (200 OK)N/A
/historyHistory pageStatic

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.