搜索

PythonReactSEOPDF
OpenClaw

lastfm

Access Last.fm user profile, now playing, top tracks/artists/albums by period, loved tracks, and optionally love/unlove tracks.

dennisooki0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install dennisooki/lastfm-openclaw

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

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

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

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

Supported Commands

Read Operations (No Auth Required)
Command Description Example
now-playing, np Current or most recent track /lastfm np
top-tracks [period] Top tracks by period /lastfm top-tracks 7day
top-artists [period] Top artists by period /lastfm top-artists 1month
top-albums [period] Top albums by period /lastfm top-albums overall
loved Loved tracks /lastfm loved
recent [limit] Recent tracks (default 10) /lastfm recent 20
profile User 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)
Command Description Example
love <artist> <track> Love a track `/lastfm love "Radiohead"...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/dennisooki/lastfm-openclaw
Version
—
Commit
683dd52115cc89e11e48754c2ddc888a199ded0d
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

Last.fm OpenClaw Skill

A secure, configurable OpenClaw skill for accessing Last.fm user profile data.

Features

  • Now Playing: Get current or most recently played track
  • Top Tracks: View top tracks by time period (7day, 1month, 3month, 6month, 12month, overall)
  • Top Artists: View top artists by time period
  • Top Albums: View top albums by time period
  • Loved Tracks: See your loved tracks collection
  • Recent Tracks: View recent listening history
  • Profile Info: Get user profile statistics
  • Love/Unlove: Mark tracks as loved (requires auth)

Installation

Prerequisites
  • jq (for JSON parsing)
  • curl

Install on Ubuntu/Debian:

sudo apt-get update && sudo apt-get install -y jq curl
1. Get a Last.fm API Key
  1. Visit https://www.last.fm/api/account/create
  2. Fill in the application details:
    • Name: Your preferred name (e.g., "OpenClaw Integration")
    • Description: "Personal OpenClaw skill for Last.fm"
    • Application URL: Leave blank or use your site
  3. Save the API Key shown after creation
2. Configure OpenClaw

Add to ~/.openclaw/openclaw.json:

{
  skills: {
    entries: {
      lastfm: {
        enabled: true,
        apiKey: "YOUR_API_KEY_HERE", // convenience for LASTFM_API_KEY
        env: {
          LASTFM_API_KEY: "YOUR_API_KEY_HERE",
          LASTFM_USERNAME: "YOUR_USERNAME"
        }
      }
    }
  }
}

Note: OpenClaw injects these env vars at runtime (not globally). Never commit secrets to git. If you run the agent in a sandboxed session, set the env vars under agents.defaults.sandbox.docker.env (or per-agent) because sandboxed skills do not inherit host env.

3. Install the Skill

From ClawHub:

clawhub install lastfm

From local directory:

# Copy skill to your workspace
cp -r lastfm ~/.openclaw/skills/

# Or place in workspace skills folder
cp -r lastfm ./skills/
4. Verify Installation
/lastfm pro...

来源内容

SKILL.md
# 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

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

## Supported Commands

### Read Operations (No Auth Required)

| Command | Description | Example |
|---------|-------------|---------|
| `now-playing`, `np` | Current or most recent track | `/lastfm np` |
| `top-tracks [period]` | Top tracks by period | `/lastfm top-tracks 7day` |
| `top-artists [period]` | Top artists by period | `/lastfm top-artists 1month` |
| `top-albums [period]` | Top albums by period | `/lastfm top-albums overall` |
| `loved` | Loved tracks | `/lastfm loved` |
| `recent [limit]` | Recent tracks (default 10) | `/lastfm recent 20` |
| `profile` | User 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)

| Command | Description | Example |
|---------|-------------|---------|
| `love <artist> <track>` | Love a track | `/lastfm love "Radiohead"...
README
# Last.fm OpenClaw Skill

A secure, configurable OpenClaw skill for accessing Last.fm user profile data.

## Features

- **Now Playing**: Get current or most recently played track
- **Top Tracks**: View top tracks by time period (7day, 1month, 3month, 6month, 12month, overall)
- **Top Artists**: View top artists by time period
- **Top Albums**: View top albums by time period
- **Loved Tracks**: See your loved tracks collection
- **Recent Tracks**: View recent listening history
- **Profile Info**: Get user profile statistics
- **Love/Unlove**: Mark tracks as loved (requires auth)

## Installation

### Prerequisites

- `jq` (for JSON parsing)
- `curl`

Install on Ubuntu/Debian:

```
sudo apt-get update && sudo apt-get install -y jq curl
```

### 1. Get a Last.fm API Key

1. Visit https://www.last.fm/api/account/create
2. Fill in the application details:
   - **Name**: Your preferred name (e.g., "OpenClaw Integration")
   - **Description**: "Personal OpenClaw skill for Last.fm"
   - **Application URL**: Leave blank or use your site
3. Save the **API Key** shown after creation

### 2. Configure OpenClaw

Add to `~/.openclaw/openclaw.json`:

```json5
{
  skills: {
    entries: {
      lastfm: {
        enabled: true,
        apiKey: "YOUR_API_KEY_HERE", // convenience for LASTFM_API_KEY
        env: {
          LASTFM_API_KEY: "YOUR_API_KEY_HERE",
          LASTFM_USERNAME: "YOUR_USERNAME"
        }
      }
    }
  }
}
```

**Note:** OpenClaw injects these env vars at runtime (not globally). Never commit secrets to git. If you run the agent in a sandboxed session, set the env vars under `agents.defaults.sandbox.docker.env` (or per-agent) because sandboxed skills do not inherit host env.

### 3. Install the Skill

**From ClawHub:**
```bash
clawhub install lastfm
```

**From local directory:**
```bash
# Copy skill to your workspace
cp -r lastfm ~/.openclaw/skills/

# Or place in workspace skills folder
cp -r lastfm ./skills/
```

### 4. Verify Installation

```
/lastfm pro...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.