Xpersona
S

statsfm

CLAWHUB · Unverified

Comprehensive Music data tool for Spotify and Apple Music, powered by the stats.fm API. Look up album tracklists, artist discographies, and global charts wit...

62
Rank
84
Safety
1.4k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s178bpy50as8r8xjs0699xf5rn83xsen:statsfm
  1. Install using `clawhub skill install s178bpy50as8r8xjs0699xf5rn83xsen:statsfm` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/space0mel/statsfm before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-space0mel-statsfm/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

145,807 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: statsfm
description: Comprehensive Music data tool for Spotify and Apple Music, powered by the stats.fm API. Look up album tracklists, artist discographies, and global charts without an account. With a stats.fm username, query personal Spotify listening history, play counts, top artists/tracks/albums, monthly breakdowns, and currently playing.
---

# stats.fm Skill

Query Spotify listening data through the stats.fm API. Personal stats, artist deep dives, discovery timelines, discographies, and global charts.

**Script:** `scripts/statsfm.py` (Python 3.6+, stdlib only)

## Setup

Check memory for a stats.fm username. If you don't have one, ask — all personal commands need `--user USERNAME` (`-u`). Public commands (search, album, artist-albums, charts) work without a username.

## How to Be Good at This

This skill is worthless if you call one command and dump the output. Music is personal. Your job is to investigate, find the story in the data, and tell it back. You're a music analyst with unlimited API calls — act like it.

### Core principles

**1. Never stop at one call.** ALWAYS check recent first (7d or 4w). Lifetime alone is accumulation, not what's happening now. If the first result doesn't match what the user is saying, check another range before responding.

**2. `artist-history` first for any single-artist question.** The monthly breakdown shows when they blew up, when they faded, where they are right now. `top artists` gives you a rank. `artist-history` gives you the arc. Never answer a single-artist question with only `top artists` output.

**3. Always check total streams as context.** Raw play counts mean nothing without the denominator. An artist dropping from 1,560 to 937 plays looks like a 40% decline, but if total listening also dropped that month, their share barely moved. Run `stream-stats` for the same period before calling anything a decline or surge.

**4. Go wide, then narrow.** Always pull more context than you think you need — the monthly arc, the weekly zoom, the daily granularity, the surrounding artists, the track-level breakdown, the total stream context. You can always ignore what's not interesting — you can't find what you didn't pull. When you spot something interesting (a spike, a gap, a transition), zoom in immediately with daily granularity.

**5. First play ≠ fandom.** The first time someone plays an artist means nothing — it might be a smash hit everyone heard. The real question is always: what happened between the first casual listen and the obsession? Investigate the gap. Find the bridge song. Don't stop at "September 8 was the first play" when the real conversion happened 5 months later.

> **Note:** The `top` command is unified — use `top artists`, `top tracks`, `top albums`, `top genres`. For drill-downs, use `top tracks --from-artist ID` or `top tracks --from-album ID`. Charts are also unified: `charts tracks`, `charts artists`, `charts albums`.

### How to inves

_meta.json

{
  "ownerId": "kn74w18t61nsbngvjgbptt67gd81sbsh",
  "slug": "statsfm",
  "version": "2.6.1",
  "publishedAt": 1774889996425
}

references/api.md

# stats.fm API Reference

Base URL: `https://api.stats.fm/api/v1`

All responses wrap data in `{"item": ...}` (single) or `{"items": [...]}` (list).

## Query Parameters

### Ranges (`range=`)
`today` | `days` | `weeks` | `months` | `lifetime`

### Date Filtering
- `before` — Unix timestamp (ms)
- `after` — Unix timestamp (ms)

### Pagination
- `limit` — max items to return
- `offset` — skip N items

### Order
- `order` — `asc` or `desc`

### Timezone
- `timeZone` — IANA timezone (e.g., `America/Toronto`)

---

## Users

### GET `/users/{userId}`
Profile info: id, customId, displayName, image, isPlus, bio, pronouns, privacySettings.

### GET `/users/{userId}/privacy`
Privacy settings object.

### GET `/users/{userId}/profile`
Profile details (bio, pronouns, theme).

### GET `/users/{userId}/streams/current`
Currently playing track. Returns: date, isPlaying, progressMs, deviceName, track object.

### GET `/users/{userId}/streams/recent`
Recently played tracks. Params: `limit`, `offset`.

### GET `/users/{userId}/streams`
Full stream history. Params: `before`, `after`, `limit`, `offset`.

### GET `/users/{userId}/streams/stats`
Aggregate stats. Params: `range` or `before`/`after`.
Returns: playedMs, count, etc.

### GET `/users/{userId}/streams/stats/dates`
Stats broken down by date. Params: `range` or `before`/`after`, `timeZone`.

### GET `/users/{userId}/top/tracks`
Top tracks. Params: `range`, `limit`, `offset`, `orderBy`.
Response items: position, streams, playedMs, track {id, name, artists[], albums[], durationMs, explicit}.

### GET `/users/{userId}/top/artists`
Top artists. Params: `range`, `limit`, `offset`, `orderBy`.
Response items: position, streams, playedMs, artist {id, name, image, genres[], followers}.

### GET `/users/{userId}/top/albums`
Top albums. Params: `range`, `limit`, `offset`, `orderBy`.
Response items: position, streams, playedMs, album {id, name, image}.

### GET `/users/{userId}/top/genres`
Top genres. Params: `range`, `limit`, `offset`, `orderBy`.
Response items: position, streams, playedMs, genre {tag}.

### GET `/users/{userId}/streams/tracks/{trackId}`
Streams of a specific track. Params: `range` or `before`/`after`, `limit`, `offset`.

### GET `/users/{userId}/streams/tracks/{trackId}/stats`
Stats for a specific track.

### GET `/users/{userId}/streams/tracks/{trackId}/stats/dates`
Per-date stats for a track. Params: `timeZone`.

### GET `/users/{userId}/streams/tracks/{trackId}/stats/per-day`
Per-day breakdown for a track.

### GET `/users/{userId}/streams/artists/{artistId}`
Streams of a specific artist.

### GET `/users/{userId}/streams/artists/{artistId}/stats`
Stats for a specific artist.

### GET `/users/{userId}/streams/artists/{artistId}/stats/dates`
Per-date stats for an artist.

### GET `/users/{userId}/streams/artists/{artistId}/stats/per-day`
Per-day breakdown for an artist.

### GET `/users/{userId}/streams/al

skill-card.md

## Description:

statsfm helps agents query stats.fm data for public Spotify and Apple Music catalog information, global charts, and, with a stats.fm username, personal listening history, play counts, top items, monthly breakdowns, and currently playing tracks.

This skill is ready for commercial/non-commercial use.

## Publisher:

[space0mel](https://clawhub.ai/user/space0mel)

### License/Terms of Use:

MIT-0

## Use Case:

External users and developers use this skill to ask an agent for music listening analysis, artist and album deep dives, discovery timelines, personal stats.fm history, and public chart or catalog lookups.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill can send a stats.fm username, listening-history query parameters, and detected timezone to stats.fm.

Mitigation: Use it only when that disclosure is acceptable, avoid saving the username in shared environments, and request narrow queries when broad history analysis is not wanted.

Risk: The skill may make many stats.fm API queries during deep music-history analysis.

Mitigation: Constrain the requested date range, artist, album, or chart scope when minimizing data exposure or request volume matters.

## Reference(s):

- [stats.fm API Reference](references/api.md)
- [stats.fm API](https://api.stats.fm/api/v1)
- [ClawHub skill page](https://clawhub.ai/space0mel/skills/statsfm)

## Skill Output:

**Output Type(s):** [text, markdown, shell commands, guidance]

**Output Format:** [Markdown narrative with CLI command references and summarized stats.fm results]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [May include personal listening-history statistics when a stats.fm username is supplied.]

## Skill Version(s):

2.6.1 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.

Sponsored

Ads related to statsfm and adjacent AI workflows.