reclaim-space
Reclaim local disk by offloading cloud-backed Apple Music downloads. Audit iCloud status, build an offload playlist that protects your DJ crates and lossless files, then Remove Download. Use when the Mac is low on disk.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- reclaim-space
- description
- Reclaim local disk by offloading cloud-backed Apple Music downloads. Audit iCloud status, build an offload playlist that protects your DJ crates and lossless files, then Remove Download. Use when the Mac is low on disk.
- allowed-tools
- Bash Read
02 资源文件 5
- 参考文档evals/eval_queries.json1.3 KB
- 参考文档evals/evals.json4.7 KB
- 参考文档references/smart-playlist-recipe.md1.9 KB
- 脚本scripts/audit-library.sh5.4 KB
- 脚本scripts/build-offload-playlist.sh7.2 KB
03 SKILL.md 正文
Setup
This skill talks to the Apple Music app via AppleScript, so it requires macOS with Music scriptable (the terminal must have Automation permission for Music — macOS prompts once on first run).
There are no path environment variables to resolve; everything operates on the Music library, not the filesystem.
Scripts are in scripts/ relative to this skill directory.
Scripts
audit-library.sh [--keep-folder <name>]— Read-only. Reports the iCloud status histogram (how many tracks are cloud-backed vs Ineligible) and the playlists inside the keep folder. Run--helpfor details.build-offload-playlist.sh [options]— Creates a playlist of tracks that are safe to offload. Non-destructive (never removes downloads). Run--help.
Concept
Apple Music can re-download any track whose iCloud status is Matched,
Uploaded, Purchased, or Subscription — so removing its local
download is reversible and frees disk. Tracks that are Ineligible (often
WAV/large lossless) have no cloud copy; removing those is permanent data
loss, so they must be excluded (those belong on the NAS — see archive-media).
Apple's Smart Playlist editor has no "is downloaded" condition, and its automation cannot author Smart Playlist rules. The workaround: build a playlist of everything safe to offload, then run Remove Download on the whole list (a no-op on anything not currently downloaded, so it is always safe to run).
Workflow
Step 1: Audit — confirm Sync Library is on and see what's offloadable
bash scripts/audit-library.sh --keep-folder "Crates"
Present the JSON: the cloud-status histogram, the cloud_safe total, and the
keep-folder playlists. Then:
- If
sync_library_likely_onisfalse(orcloud_safeis 0), STOP: do not build a playlist. Sync Library is off or nothing is in iCloud, so removing downloads would lose that music for good. Tell the user to turn on Sync Library (and let it finish) or archive to the NAS first. - If
cloud_status.ineligibleis high, warn that those are local-only; they are never added to the playlist (it takes only cloud-backed tracks) but are worth archiving to the NAS. - Otherwise go on to Step 2.
Step 2: Build the offload playlist
Building the playlist is safe: it only collects tracks and removes nothing. If the user has named their protections (the keep folder, a Grouping prefix), build it straight away with those; if not, ask for them first. Then build it:
bash scripts/build-offload-playlist.sh \
--playlist "Offload — Cloud Safe" \
--keep-folder "Crates" \
--exclude-grouping "DJ" \
--exclude-kind "WAV" \
--replace
--keep-folderprotects every playlist inside that folder (e.g. recency crates and genre crates that feed Rekordbox).--exclude-groupingprotects tracks tagged for active use (e.g. Grouping startingDJ).--exclude-kindprotects local-only formats (defaultWAV).
This can take a few minutes on a large library — it adds tracks one at a time.
Report in_playlist and the excluded breakdown.
Step 3: Free the space — MANDATORY user step, never automate
Tell the user to:
- Open the playlist in Apple Music and sanity-check the count matches
in_playlist. - Test on a small batch first: select ~50 tracks → right-click → Remove Download → confirm they show the cloud icon and still stream.
- Once trusted: ⌘A → right-click → Remove Download.
DO NOT run Remove Download for the user via automation. Surface the count and the magnitude (it can be most of the library) and let them pull the trigger.
Auto-updating alternative
The built playlist is a snapshot — re-run Step 2 (with --replace) to refresh
it. For a hands-off, always-current version, build the Smart Playlist by hand
once using references/smart-playlist-recipe.md.
04 同仓库更多 Skills
doctor
暂无简介
add-seat
Add a named seat to a Wheelhouse - a crew member, a standing role (such as a dispatcher) or a worker - as a ynh harness with its charter, standing orders and only the tools its job needs, named from the Wheelhouse's roster. Use when asked to add, create or set up a seat, role, worker or agent in a Wheelhouse (a release manager, a PR watcher, a dispatcher, a designer, more workers), or to give a role a name, or to start on a Wheelhouse's team (its starter team), one role at a time. Also use to trial, make official or drop a seat.
voice
How voices work - what a voice skill contains, how to write a new one, and how several voices compose into one reply. Use whenever drafting a reply in a named voice, or when asked to create or change a voice.
voice-warm
A friendly voice that acknowledges the person and their effort. Compose with direct for friendly but brief.
voice-formal
A careful, complete voice for people outside the team - customers, partners, senior stakeholders.
voice-direct
A plain, brief voice that leads with the answer. The default when no voice is named.