# Send Last.fm (OpenClaw) to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "lastfm-openclaw",
    "name": "Last.fm (OpenClaw)",
    "source": "tencent",
    "type": "skill",
    "category": "数据分析",
    "sourceUrl": "https://clawhub.ai/dennisooki/lastfm-openclaw",
    "canonicalUrl": "https://clawhub.ai/dennisooki/lastfm-openclaw",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/lastfm-openclaw",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lastfm-openclaw",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md",
      "references/api-endpoints.md",
      "references/auth-guide.md",
      "scripts/lastfm-api.sh"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "lastfm-openclaw",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T17:30:19.805Z",
      "expiresAt": "2026-05-06T17:30:19.805Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lastfm-openclaw",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=lastfm-openclaw",
        "contentDisposition": "attachment; filename=\"lastfm-openclaw-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "lastfm-openclaw"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/lastfm-openclaw"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/lastfm-openclaw",
    "downloadUrl": "https://openagent3.xyz/downloads/lastfm-openclaw",
    "agentUrl": "https://openagent3.xyz/skills/lastfm-openclaw/agent",
    "manifestUrl": "https://openagent3.xyz/skills/lastfm-openclaw/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/lastfm-openclaw/agent.md"
  }
}
```
## Documentation

### Last.fm Profile Skill

Retrieves Last.fm user listening data including now playing, top tracks/artists/albums by time period, and loved tracks. Optionally supports write operations (love/unlove tracks, scrobble) when LASTFM_SESSION_KEY is configured.

### Required Environment Variables

LASTFM_API_KEY: Your Last.fm API key (get one at https://www.last.fm/api/account/create)
LASTFM_USERNAME: Your Last.fm username

### Optional Environment Variables

LASTFM_SESSION_KEY: Required for write operations (love/unlove, scrobble)
LASTFM_API_SECRET: Required to sign write operations (love/unlove, scrobble)

### Workflow

Validate required environment variables are present
Ensure dependencies (jq, curl) are available
Determine which command the user is requesting
Determine which command the user is requesting
Construct API request to ws.audioscrobbler.com/2.0/
Execute HTTP GET request with appropriate method and parameters
Parse JSON response and format for user

### Read Operations (No Auth Required)

CommandDescriptionExamplenow-playing, npCurrent or most recent track/lastfm nptop-tracks [period]Top tracks by period/lastfm top-tracks 7daytop-artists [period]Top artists by period/lastfm top-artists 1monthtop-albums [period]Top albums by period/lastfm top-albums overalllovedLoved tracks/lastfm lovedrecent [limit]Recent tracks (default 10)/lastfm recent 20profileUser profile info/lastfm profile

### Time Periods

7day - Last 7 days
1month - Last 30 days
3month - Last 90 days
6month - Last 180 days
12month - Last year
overall - All time (default if not specified)

### Write Operations (Auth Required)

CommandDescriptionExamplelove <artist> <track>Love a track/lastfm love "Radiohead" "Creep"unlove <artist> <track>Unlove a track/lastfm unlove "Radiohead" "Creep"

### API Request Construction

Base URL: https://ws.audioscrobbler.com/2.0/

Required parameters for all requests:

api_key: Value from LASTFM_API_KEY
format: json
method: API method name

User-specific requests also require:

user: Value from LASTFM_USERNAME

### Method Parameters

MethodAdditional Parametersuser.getInfouseruser.getRecentTracksuser, limit (optional)user.getTopTracksuser, period (optional)user.getTopArtistsuser, period (optional)user.getTopAlbumsuser, period (optional)user.getLovedTracksusertrack.loveartist, track, sk (session key)track.unloveartist, track, sk (session key)

### Now Playing Response

Extract from recenttracks.track[0]:

If @attr.nowplaying === "true": currently playing
artist.#text - Artist name
name - Track name
album.#text - Album name

### Top Items Response

Extract array from:

toptracks.track[] for top tracks
topartists.artist[] for top artists
topalbums.album[] for top albums

Each item includes:

name - Item name
playcount - Play count
artist.name - Artist (for tracks/albums)
@attr.rank - Position in chart

### Profile Response

Extract from user:

name - Username
realname - Real name (if set)
playcount - Total scrobbles
country - Country
registered - Account creation date
url - Profile URL

### Guardrails

Never log or expose API keys or session keys in output
Rate limit: respect Last.fm's 5 requests/second limit
Write operations must fail gracefully if LASTFM_SESSION_KEY not set
All user inputs must be URL-encoded before API calls
Only connect to ws.audioscrobbler.com - no external endpoints
Handle missing data gracefully (e.g., no now playing, empty loved tracks)
Validate period parameter is one of: 7day, 1month, 3month, 6month, 12month, overall
Validate recent limit is numeric and within 1–200

### Error Handling

Error CodeMeaningAction10Invalid API keyTell user to check LASTFM_API_KEY6Invalid parametersCheck required params are present29Rate limit exceededWait and retry, inform user26Suspended API keyDirect user to Last.fm support4Authentication failedCheck session key for write ops

### Now Playing

🎵 Now Playing:
"Track Name" by Artist Name
from Album Name

Or if not currently playing:

🎵 Last Played:
"Track Name" by Artist Name
Listened: [timestamp]

### Top Tracks

🎵 Top Tracks (7 days):

1. "Track One" by Artist One (42 plays)
2. "Track Two" by Artist Two (38 plays)
3. "Track Three" by Artist Three (31 plays)
...

### Profile

🎵 Last.fm Profile: username

📊 15,432 total scrobbles
🌍 United Kingdom
📅 Member since: Nov 2002
🔗 last.fm/user/username

### Setup Instructions

Get a Last.fm API key at https://www.last.fm/api/account/create
Add to ~/.openclaw/openclaw.json:

{
  skills: {
    entries: {
      lastfm: {
        enabled: true,
        env: {
          LASTFM_API_KEY: "your_api_key_here",
          LASTFM_USERNAME: "your_username"
        }
      }
    }
  }
}

For write operations, see {baseDir}/references/auth-guide.md
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: dennisooki
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T17:30:19.805Z
- Expires at: 2026-05-06T17:30:19.805Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/lastfm-openclaw)
- [Send to Agent page](https://openagent3.xyz/skills/lastfm-openclaw/agent)
- [JSON manifest](https://openagent3.xyz/skills/lastfm-openclaw/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/lastfm-openclaw/agent.md)
- [Download page](https://openagent3.xyz/downloads/lastfm-openclaw)