关于 classical-887
通过 NPR Composer API 查询 WRHV 88.7 FM 播放列表,并提供曲目收听链接的命令行技能。可选的 Spotify 功能支持创建、审计、清理和导出播放列表,并记录操作历史。
主要功能
- 01查看当前及近期曲目
- 02搜索和筛选播放记录
- 03生成 Markdown 和 JSON 报告
- 04创建和重命名 Spotify 播放列表
- 05审计、导出和清理播放列表
- 06记录 Spotify 播放列表操作
适用场景
- 01查找电台近期播放的曲目
- 02生成包含收听链接的播放列表报告
- 03根据电台曲目创建 Spotify 播放列表
- 04检查或清理自有 Spotify 播放列表
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ tdimino/ claude-code-minoan --skill classical-887安装后在 Claude Code 中输入/classical-887确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
README.mdreferences/api-reference.mdspotify-setup.mdscripts/classical_887.py详细介绍
Classical 887
查看 WRHV 88.7 FM(Classical WMHT)正在播放的内容——哈德逊河谷的古典音乐电台。查询 NPR Composer API,获取实时播放列表数据,并提供可点击的链接,可在 YouTube、Spotify、Apple Music、IMSLP、IDAGIO、Internet Archive 和 Musopen 上收听。
适用场景
- 查看 88.7 当前正在播放的内容
- 获取最近播放的曲目及重听链接
- 生成 Markdown 播放列表报告
- 查找在广播中听到的特定作品
- 根据电台曲目创建 Spotify 播放列表
- 重命名 Spotify 播放列表
- 审核自有 Spotify 播放列表(列出、搜索、排序)
- 清理累积的 Spotify 播放列表(安全批量移除)
- 清理前将播放列表曲目数据导出为 JSON
- 查看播放列表操作历史
前提条件
requestsPython 包(uv pip install --system requests)- 无需 API 密钥——使用 NPR 的公开 Composer API
- Spotify 集成(可选):
spotipy包(uv pip install --system spotipy)+ Spotify Developer App 凭据
用法
# What's playing right now (default)
python3 ~/.claude/skills/classical-887/scripts/classical_887.py
# Last 10 tracks
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --recent 10
# Today's full playlist (pages through all tracks for today)
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period today
# Last week as Markdown report
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period week --markdown ~/Desktop/classical-week.md
# Last month as Markdown report
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period month --markdown ~/Desktop/classical-month.md
# Specific date (Valentine's Day)
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --date 2026-02-14
# Search for a composer across a date range
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period week --search bach
# Full performer details (album, label, catalog number)
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --recent 5 --verbose
# Raw JSON output
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --now --json
# Create Spotify playlist from today's tracks
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period today --spotify-playlist
# Add yesterday's tracks to the persistent playlist
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period yesterday --spotify-playlist
# Custom playlist name from a specific date
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --date 2026-02-14 --spotify-playlist "Valentine's Classical"
# Last week's Bach on Spotify
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --period week --search bach --spotify-playlist "Bach on 88.7"
# Rename the default playlist
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-rename "Hudson Valley Classical"
# Rename a specific playlist with a new description
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-playlist "Bach on 88.7" --spotify-rename "Bach Collection" --spotify-description "Curated Bach from WRHV 88.7 FM"
# View playlist operation log as Markdown
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-log-report
# Audit all owned Spotify playlists
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-audit
# Audit with search filter and sort by track count
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-audit --search "Rediscover*" --sort tracks
# Dry run cleanup (preview only, no deletion)
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-cleanup "Rediscover*"
# Execute cleanup with safety cap
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-cleanup "Rediscover*" --confirm --max 10
# Export playlist tracks to JSON before cleanup
python3 ~/.claude/skills/classical-887/scripts/classical_887.py --spotify-export ~/Desktop/exports --search "Rediscover*"
参数
| 标志 | 说明 | 默认值 |
|---|---|---|
--now | 显示当前正在播放的内容 | 开启(如果未指定其他模式) |
--recent N | 显示最近播放的 N 首曲目(1–100) | 关闭 |
--date YYYY-MM-DD | 获取指定日期的所有曲目 | 关闭 |
--period PERIOD | 获取指定时间段的曲目:today、yesterday、week、month | 关闭 |
--search QUERY | 按作曲家、作品或演奏者筛选结果 | 关闭 |
--verbose | 显示完整详情(专辑、厂牌、目录号、所有演奏者) | 关闭 |
--json | 输出原始 JSON | 关闭 |
--markdown [FILE] | 写入包含可点击链接的 Markdown 报告 | classical-playlist.md |
--sort FIELD | 排序方式:time(最新优先)、duration(时长最长优先)、composer(按字母顺序) | time |
--spotify-playlist [NAME] | 创建 Spotify 播放列表或向其中追加曲目 | Classical 88.7 FM |
--spotify-rename NEW_NAME | 重命名现有 Spotify 播放列表(除非 --spotify-playlist 指定当前名称,否则默认重命名 Classical 88.7 FM) | 关闭 |
--spotify-description DESC | 重命名时设置新描述(与 --spotify-rename 搭配使用) | 关闭 |
--spotify-log-report | 将播放列表操作日志显示为 Markdown 报告 | 关闭 |
--spotify-audit | 列出所有自有 Spotify 播放列表(可与 --search 和 --sort 搭配使用) | 关闭 |
--spotify-cleanup PATTERN | 移除符合 glob 模式的播放列表(除非指定 --confirm,否则仅预览) | 关闭 |
--spotify-export [DIR] | 将符合条件的播放列表曲目导出到 JSON 文件 | . |
--confirm | 执行清理(不指定此项时,--spotify-cleanup 仅显示预览) | 关闭 |
--max N | 安全上限:每次调用最多移除的播放列表数 | 不限 |
--spotify-client-id ID | Spotify 应用客户端 ID(或 SPOTIFY_CLIENT_ID 环境变量) | — |
--spotify-client-secret SECRET | Spotify 应用客户端密钥(或 SPOTIFY_CLIENT_SECRET 环境变量) | — |
输出
默认显示:作曲家、作品、演奏者、时长和收听链接(YouTube、Spotify、Apple Music、IMSLP、IDAGIO、Internet Archive、Musopen)。
Markdown 报告包含:正在播放的曲目标题、带有 7 个平台链接的最近曲目表,以及作曲家索引。
播放列表日志
每次 --spotify-playlist 操作都会自动向 ~/.claude/skills/classical-887/playlist-log.jsonl 追加一条 JSONL 记录。每条记录包含:
- 日期和操作(创建/追加)
- 播放列表名称和 Spotify URL
- 已添加的曲目(作曲家、作品、演奏者、时长、Spotify URI)
- 在 Spotify 上未找到的曲目
- 总数(匹配/未匹配)
使用 --spotify-log-report 将日志显示为 Markdown 报告。日志文件仅支持追加,可使用标准 jq 命令查询:
# Count total operations
wc -l ~/.claude/skills/classical-887/playlist-log.jsonl
# Show all playlist names used
cat ~/.claude/skills/classical-887/playlist-log.jsonl | jq -r '.playlist_name' | sort -u
# Total tracks matched across all operations
cat ~/.claude/skills/classical-887/playlist-log.jsonl | jq '.matched_count' | paste -sd+ | bc
数据来源
NPR Composer API(api.composer.nprstations.org/v1/widget/),为 classicalwmht.org/playlist 上的 WMHT 播放列表小组件提供支持。
完整 API 文档:references/api-reference.md
电台信息
WRHV 88.7 FM(纽约州波基普西),与 WMHT-FM 89.1(斯克内克塔迪)同步播出。完整电台详情请参阅 references/api-reference.md。
备用方案
如果 NPR Composer API 不可用:
# Check the playlist page directly
firecrawl scrape "https://classicalwmht.org/playlist" --only-main-content
参考文档
| 文件 | 内容 |
|---|---|
references/api-reference.md | NPR Composer API:端点、请求/响应架构、字段参考 |
references/spotify-setup.md | Spotify Developer App 设置、OAuth、环境变量、Dev Mode 说明 |