Discover music, get personalized recommendations, and download high-fidelity audio files. Use when user wants to find new music based on their taste, search for songs/albums/artists, get recommendations similar to artists they like, or download lossless audio (FLAC/Hi-Res) from Qobuz or TIDAL. Trigger phrases include "find music like", "recommend songs", "download album", "lossless", "Hi-Res", "FLAC", "music discovery", "similar artists", "setup music".
Add this skill
npx mdskills install psylch/hifi-downloadComprehensive music discovery and Hi-Res download skill with async workflows and clear error handling
1---2name: hifi-download3description: Discover music, get personalized recommendations, and download high-fidelity audio files. Use when user wants to find new music based on their taste, search for songs/albums/artists, get recommendations similar to artists they like, or download lossless audio (FLAC/Hi-Res) from Qobuz or TIDAL. Trigger phrases include "find music like", "recommend songs", "download album", "lossless", "Hi-Res", "FLAC", "music discovery", "similar artists", "setup music".4---56# MusicMaster78Music discovery (Spotify, Last.fm) and Hi-Res audio downloads (Qobuz, TIDAL) through a unified CLI.910All commands use `bash ${SKILL_PATH}/run.sh <script> [args...]`, which activates the venv and runs the corresponding Python script. All scripts output structured JSON to stdout by default. Use `--format text` for human-readable output. Errors are JSON on stderr with exit code 1 (recoverable) or 2 (unrecoverable).1112## First-Time Setup1314### Step 1: Check Dependencies1516```bash17bash ${SKILL_PATH}/scripts/setup.sh check18```1920Output is key=value pairs (this is a shell script, not a Python script). If `VENV=missing`, run install first.2122### Step 2: Install2324```bash25bash ${SKILL_PATH}/scripts/setup.sh install [--with-qobuz] [--with-tidal]26```2728Creates `.venv`, installs core dependencies (`spotipy`, `pylast`, `requests`, `python-dotenv`), and optionally installs download backends.2930### Step 3: Configure Credentials3132**IMPORTANT**: Do NOT ask the user for credentials in chat. Instead:331. Create `.env` from template if not exists: `cp ${SKILL_PATH}/.env.example ${SKILL_PATH}/.env`342. Tell user to edit `${SKILL_PATH}/.env` with their credentials353. Wait for confirmation, then verify3637Alternatively, use the config script:3839```bash40bash ${SKILL_PATH}/run.sh setup_config --lastfm-key=KEY [--spotify-id=ID --spotify-secret=SECRET] [--qobuz-email=EMAIL --qobuz-password=PASS]41```4243**Where to get credentials:**44- Spotify: https://developer.spotify.com/dashboard (free)45- Last.fm: https://www.last.fm/api/account/create (free)46- Qobuz: Requires Studio/Sublime subscription47- TIDAL: Run `tiddl auth login` in venv for OAuth4849### Step 4: Verify5051```bash52bash ${SKILL_PATH}/run.sh status53```5455Returns JSON with `discovery` and `downloads` sections showing service status (`ready`, `disabled`, `not_configured`, `error`). **Only use services with `"available": true`.**5657## Service Types5859| Type | Services | Purpose |60|------|----------|---------|61| Discovery | Spotify, Last.fm | Search, recommendations, similar artists |62| Downloads | Qobuz, TIDAL | High-quality audio (FLAC, Hi-Res) |6364## Discovery Commands6566### Last.fm — Similar Artists6768```bash69bash ${SKILL_PATH}/run.sh lastfm_artists "Radiohead"70```7172Returns JSON with `results` array of similar artists (name, match score, URL).7374### Last.fm — Similar Tracks7576```bash77bash ${SKILL_PATH}/run.sh lastfm_tracks "Karma Police" "Radiohead"78```7980Arguments: track name, then artist name.8182### Last.fm — Taste Profile8384```bash85bash ${SKILL_PATH}/run.sh lastfm_taste86```8788Analyzes Spotify listening history and returns JSON with `similar_artists` and `similar_tracks` discovered via Last.fm.8990### Spotify — Search9192```bash93bash ${SKILL_PATH}/run.sh spotify_search "OK Computer"94```9596Searches Spotify catalog. Returns JSON with `results` array containing track/album/artist details.9798### Spotify — User Library99100```bash101bash ${SKILL_PATH}/run.sh spotify_user tracks|artists102```103104Gets the user's top tracks or artists from Spotify (requires OAuth). Returns JSON with `results` array.105106### Spotify — Track/Album Info107108```bash109bash ${SKILL_PATH}/run.sh spotify_info SPOTIFY_URI_OR_ID110```111112## Download Commands113114### Search Platform Catalog115116```bash117bash ${SKILL_PATH}/run.sh platform_search "Album Name" -p qobuz|tidal118```119120Searches the download platform's catalog. Returns JSON with `results` array containing IDs for use with download command.121122### Download (async — returns immediately)123124```bash125bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz|tidal -t album|track126```127128Queues the download in a background process and returns JSON with `download_id` immediately. The agent is free to continue other work. Use `download_status` to poll progress.129130To block until the download completes (legacy behavior):131132```bash133bash ${SKILL_PATH}/run.sh platform_download ID -p qobuz -t album --sync134```135136### Check Download Status137138```bash139bash ${SKILL_PATH}/run.sh download_status DOWNLOAD_ID140bash ${SKILL_PATH}/run.sh download_status --all141bash ${SKILL_PATH}/run.sh download_status --active142```143144Poll the status of a specific download or list all downloads. Use `--active` to show only pending/in_progress tasks. Output is JSON by default; use `--format text` for human-readable output.145146### Open Download Dashboard147148```bash149bash ${SKILL_PATH}/run.sh download_ui150```151152Opens a web dashboard at `http://localhost:8765` showing real-time download status with progress bars. Auto-refreshes every 3 seconds.153154## Service Management155156### Disable a Service157158```bash159bash ${SKILL_PATH}/run.sh disable_service spotify --reason "No account"160```161162### Enable a Service163164```bash165bash ${SKILL_PATH}/run.sh enable_service spotify166```167168## Workflow — Music Discovery1691701. Run `status` to check available services1712. Use `lastfm_artists` or `lastfm_tracks` to find similar music1723. Use `spotify_search` to look up specific tracks/albums1734. Present results to user in a clear table format1745. If user wants to download, use `platform_search` → `platform_download`175176## Workflow — Download Hi-Res Audio1771781. Run `status` to confirm download service is READY1792. Search: `platform_search "Album Name" -p qobuz`1803. Present results with quality info1814. Download: `platform_download ID -p qobuz -t album` (returns download_id immediately)1825. **Immediately** open the download dashboard with `download_ui` so the user can see real-time progress — **run this command in the background** (use `run_in_background: true` in Bash) since the dashboard is a long-running server process that will block otherwise1836. Tell user the files will appear in the default download directory (`~/Music/Qobuz` or `~/Music/TIDAL`)1847. **Do NOT poll `download_status` in a loop.** The dashboard handles progress visualization — move on immediately after opening it. Only poll on behalf of the user if they explicitly ask you to check for them.185186## Error Handling187188| Error | Detection | Resolution |189|-------|-----------|------------|190| Venv missing | `run.sh` exits with `venv_missing` | Run `bash ${SKILL_PATH}/scripts/setup.sh install` |191| Service not configured | `status` JSON shows `"status": "not_configured"` | Guide user to edit `.env` or run `setup_config` |192| Spotify OAuth expired | stderr JSON with auth error (exit 1) | Run `bash ${SKILL_PATH}/run.sh spotify_auth` to re-authorize |193| TIDAL token expired | `status` JSON shows `"status": "error"` for tidal | Run `tiddl auth refresh` or `tiddl auth login` in venv |194| Service disabled by user | `status` JSON shows `"status": "disabled"` | Run `enable_service` if user wants to re-enable |195| No results | JSON `"results": []` with `"total": 0` | Try different keywords or check service availability |196| Unrecoverable error | stderr JSON with `"recoverable": false` (exit 2) | Fix root cause (missing credentials, broken install) |197198## Important Notes199200- Spotify requires OAuth browser flow on first use (`spotify_auth` script handles this)201- TIDAL auth is managed by `tiddl` CLI tool, not stored in `.env`202- Qobuz credentials are stored in `.env` (sensitive — ensure file is in `.gitignore`)203- Download paths default to `~/Music/Qobuz` and `~/Music/TIDAL`204- Quality settings: Qobuz 27=Hi-Res 24-bit (highest), TIDAL HiFi=lossless205
Full transparency — inspect the skill content before installing.