Boiler82

Lastfm Agent — Data skill for Claude Code

Data community

AI agent that answers questions about the Last.fm global Top 50 in plain English: writes its own SQL on Snowflake (read-only user), makes charts and remembers follow-ups.

How to install Lastfm Agent

This entry records only its repository, not the path inside it, so there is no exact command to give. Open Boiler82/lastfm-agent and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Lastfm Agent does

AI agent that answers questions about the Last.fm global Top 50 in plain English: writes its own SQL on Snowflake (read-only user), makes charts and remembers follow-ups. Built on my lastfm-pipeline; tested on 14 questions with live SQL answer keys (Claude Sonnet and Haiku 14/14).

Alternatives in Data

  • MCP Server Chart — 🤖 A visualization mcp & skills contains 25+ visual charts using @antvis 4k ★
  • Azure Cosmos DB .net — Cosmos DB NoSQL with global distribution 1.8k ★
  • Global Stock Data — US stock market data for AI coding assistants — zero-auth, official sources 1.5k ★

README

Last.fm Music Agent

An AI agent that answers questions about the Last.fm global Top 50 in plain English. It writes its own SQL, runs it on Snowflake, answers in text or with a chart, and remembers the conversation for follow-up questions.

It runs on top of my own data pipeline, [lastfm-pipeline](https://github.com/Boiler82/lastfm-pipeline), which loads the chart into Snowflake every day:

Last.fm API → Python → Snowflake → dbt → Data Studio dashboard
                           ↓
                   Last.fm Music Agent (this project)

Built with Python, the Claude API and Snowflake.

![SUNGLASSES by Tinashe jumped 20 places on 2 Oct](images/sunglasses_climb.png)


What it does

A real conversation (SQL shortened):

You: Which track climbed the most positions in a single day? Show its chart position over time.
  [step 1] run_sql: with snaps as (select distinct DATE(LOADED_AT) d ...), prev as (... lag(d) over (order by d) ...) ...
  [step 2] make_chart: select DATE(LOADED_AT)::string as day, CHART_POSITION ... where TRACK_NAME = 'SUNGLASSES' ...

Agent: "SUNGLASSES" by Tinashe had the biggest one-day climb. It rose 20 places, from #43 on
2026-10-01 to #23 on 2026-10-02.

I compared each track with the previous day's snapshot. Tracks that weren't on the chart the day
before count as new entries, so I left them out. The data covers 2026-10-01 to 2026-10-22.

The next biggest climbs were also Tinashe tracks from the same day: "Too Easy" (+18) and
"Crash Out" (+15). [...]

You: Which track has spent the most days at #1?
  [step 1] run_sql: select TRACK_NAME, ARTIST_NAME, count(distinct DATE(LOADED_AT)) days_at_1 ...

Agent: "NICOLE KIDMAN" by ADÉLA has spent the most days at #1. It was #1 on all 24 daily
snapshots, from 2026-09-28 to 2026-10-21. No other track reached #1 in that period.

I need to correct my last answer. I said the data ran to 2026-10-22, but it actually covers
2026-09-28 to 2026-10-21. The 10-22 date was only in the chart's filename.