Recovering Deleted Apple Music Playlists with Claude Cowork

A detailed use case shows how Claude Cowork helped recover 20+ years of deleted Apple Music playlists after a user accidentally wiped their entire library while troubleshooting an iCloud sync issue. The recovery involved reconstructing 75 playlists and slotting 8,185 tracks back into them.
The Problem
The user deleted every playlist in their Apple Music library and the entire Apple Music cloud library in June 2025 while trying to fix an iCloud sync issue. This included roughly 20 years of curation, imports from Spotify, and 7 years of Apple Music preference building. The only remaining data was a damaged Favorites list and some Discovery playlists.
What Claude Cowork Did
After the user described the problem and pointed to an Apple data export folder, Claude Cowork:
- Found and parsed the
Apple Music Library Playlists.jsonandTracks.jsonfiles inside the export - Cross-referenced a 256,617-row Play Activity CSV to reconstruct deleted playlist contents (modification dates showed all deletions occurred on 2025-06-01)
- Recovered 31 of 34 deleted playlists from play history alone with full track lists
- Wrote Python scripts to generate a formatted Excel report with 4 sheets: Summary, Active Playlists, Deleted/Recovered, and Full Library sorted by play count
- Generated 14 AppleScript shell scripts split across active and deleted playlists that searched the Music.app library and automatically slotted tracks into recreated playlists
- Debugged multiple rounds of AppleScript syntax errors, encoding issues (em dashes and special characters causing Script Editor to misidentify files as Chinese), and iCloud permission errors
- Built a master
RUN_ALL.shscript to run all 14 restore scripts sequentially
The Tools Built On the Fly
After the AppleScript restore pass, 1,254 tracks remained unfound (either from Apple-curated playlists or with artist names stripped during ASCII conversion). Claude built three custom HTML tools:
- Apple Music Quick-Add.html – Looked up each NOT FOUND track against the iTunes Search API using JSONP (to bypass CORS from a local file), showed confidence badges (exact/close/title/partial), and created
music://deep links to open tracks directly in the desktop Music app - Apple Music Album Add List.html – Pivoted from individual tracks to whole albums once adding albums proved faster. Grouped the 1,254 missing tracks into 437 unique albums, looked up each via the iTunes API, and generated 'Open in Music' deep links that jumped straight to albums in the desktop app. Sorted by track count so the most impactful albums came first
- Both tools used localStorage for checkbox persistence so the user could work across multiple sessions without losing progress
The album tool was particularly effective – instead of clicking through 1,254 individual tracks, the user added whole albums in seconds each, completing 437 albums in a fraction of the time.
📖 Read the full source: r/ClaudeAI
👀 See Also

Automating Business Vetting with OpenClaw: A Case Study
A developer automated their business verification process using OpenClaw, creating a system that analyzes submitted profiles, checks them against policies, and outputs decisions with reasoning and confidence scores.

Using yavy.dev to query OpenClaw docs via AI for configuration help
A user reports success configuring OpenClaw by using yavy.dev to index the documentation and query it through Claude AI, moving from confusion to a working setup in an afternoon.

Autonomous 5-Agent Claude System Replaces $3K/Month API Costs with Single Subscription
A developer built a 5-agent autonomous swarm using Claude Opus 4.6 running as Discord bots on WSL2, powered by a single Claude Max subscription instead of API credits, replacing what would cost $3,000+ monthly with $100-200.

SkiTomorrow.ai: A Ski Trip Decision Engine Built with Claude Code
SkiTomorrow.ai is a free web tool that scores 234 ski resorts worldwide based on live snow forecasts, travel distance, and cost, then provides personalized rankings. The developer built it entirely using Claude Code and shared specific workflow insights.