api-check
Skill1 starsChanged 2 months agoMITView on GitHub
Diagnose and adapt to changes in the Spotify, Deezer or Last.fm APIs that Lineupify depends on: which endpoints are used, how to probe them live, what has already been removed, and where to record a new snapshot. Use when a build fails with SPOTIFY_HTTP_ERROR/403/404, seeds return nothing, or before trusting a new endpoint.
- Reads credentials
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-featureSkill
- dependabot-triageSkill
- releaseSkill
- verify-liveSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
If Spotify removed something: drop the call, route through Deezer or Last.fm, update the header comment and SPOTIFY_API_SNAPSHOT, add a …
- Very specific: line 48
If a response shape changed: fix the parser, add a canned-JSON unit test (see test/unit/lastfm.test.ts and playlist-read.test.ts for the …
- Very specific: line 49
If a new scope is needed: add it to SCOPES.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API check
Lineupify survives on a shrinking Spotify surface plus keyless Deezer. When something breaks, find out which side moved before touching code.
What is used, and what is already gone
Spotify (Development Mode app, PKCE, src/sources/spotify.ts; the file header lists the verified set and SPOTIFY_API_SNAPSHOT the month):
- Used:
/search(limit ≤ 10,market=from_tokenneedsuser-read-private),/artists/{id}/albums,/albums/{id}/tracks,/tracks/{id},/me,/me/top/artists,/me/following,/me/playlists,/me/tracks,/playlists/{id},/playlists/{id}/items(items are underitem, 50 per page),/me/playlistsPOST,/playlists/{id}/itemsPOST/PUT,/playlists/{id}PUT. - Removed for new apps and never to be reintroduced: recommendations, related artists, artist top tracks, audio features/analysis, popularity, genres on artist objects, batch
?ids=, browse/featured/category endpoints, Spotify-made playlists (404). POST /users/{user_id}/playlistsreturns 403 for a Development Mode app;POST /me/playlistsis the one that works and is what Lineupify uses. Verified 2026-09-09 while probing cover upload. Do not hand-write the/users/form from memory.PUT /playlists/{id}/imagesworks for Development Mode apps (verified 2026-09-09): needs theugc-image-uploadscope, body is the base64 text of a JPEG withContent-Type: image/jpeg, response is 202 with an empty body, cap is 256 KB on the base64 payload.- Scopes are granted per app+user, not per token: approving a new scope through any grant on the same app means an existing refresh token receives the union on its next refresh, with
authorizedAtunchanged. So after adding a scope, a user who re-approves once is fixed everywhere; a user who never approves it keeps the old set andstatuskeeps asking them to reconnect.
Deezer (src/sources/deezer.ts, keyless, errors as HTTP 200 bodies with error.code: 4 = quota → backoff, 800 = no data):
- Used:
/search/artist,/artist/{id}/top,/artist/{id}/related,/artist/{id}/albums(genre_id),/track/{id},/track/isrc:{isrc}(bpm, rank, release_date),/search/track(not rank-ordered; sort yourself),/search/playlist,/playlist/{id},/playlist/{id}/tracks,/chart/0/artists,/genre. - Known wrong:
/genre/{id}/artistsand/chart/{genre}return the global chart for any genre; do not use them. - Search syntax broke silently (2026-09). On
/search/track, any query containing theartist:field returns{data: [], total: 0}with HTTP 200 and no error.track:"..."alone still works, and plain text works.findTrackuses plain text because of this. When a lookup starts finding nothing, probe the raw query before touching the parsing: an empty result set is indistinguishable from a legitimate miss, which is exactly how this reached a release. - Writes: impossible (app registration closed since 2025).
Last.fm (src/sources/lastfm.ts, optional key): artist.gettoptracks, tag.gettopartists, artist.getsimilar, geo.gettopartists, chart.gettopartists, artist.gettoptags, artist.getinfo (key validation). Non-commercial use only.
Probe
Deezer, no auth:
curl -s "https://api.deezer.com/artist/27/related?limit=3"
curl -s "https://api.deezer.com/track/isrc:GBAYE0601498"
curl -s "https://api.deezer.com/search/playlist?q=shoegaze&limit=3"Spotify, with the saved login (runs inside the project so the token store is used):
npx tsx -e "import('./src/sources/spotify.js').then(async s => console.log(JSON.stringify(await s.api('/playlists/<id>', { query: { fields: 'id,name,owner(id)' } }))))"
npm run smoke:spotifyLast.fm: npx tsx -e "import('./src/sources/lastfm.js').then(async l => console.log(await l.tagTopArtists(process.env.LASTFM_API_KEY, 'shoegaze', 5)))" with the key exported.
Adapt
- Reproduce with a probe, not from the error text alone. A 403 can be scope, user-management, or a removed endpoint;
mapError()inspotify.tsdistinguishes quota, rate limit and scope. - If Spotify removed something: drop the call, route through Deezer or Last.fm, update the header comment and
SPOTIFY_API_SNAPSHOT, add a bullet to README Limits andCHANGELOG.md. - If a response shape changed: fix the parser, add a canned-JSON unit test (see
test/unit/lastfm.test.tsandplaylist-read.test.tsfor thesetFetchpattern), rerun the live suite. - If a new scope is needed: add it to
SCOPES;statusanddoctorwill tell existing users to reconnect. Document the scope in the README privacy table. - Rate limits live in
LIMITSinsrc/infra/http.ts(Spotify 4/s, Deezer 8/s, Last.fm 4/s); raise concurrency only with a probe showing headroom.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

