Skip to content
Agentmart
Submit a tool

reclaim-space

Reclaim local disk by offloading cloud-backed Apple Music downloads.

Skill by eyelock

IndexedMIT★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/eyelock-reclaim-space

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

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.

Use cases: security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Shell scripts

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/reclaim-space

Tools it pre-approves 2

From allowed-tools in SKILL.md: the agent may use these without asking you each time.

  • Bash
  • Read

What's inside

Skill 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.
License
MIT
Allowed tools
Bash, Read
Instructions
95 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Pre-approves any shell command

Files (6)

  • SKILL.md
  • eval_queries.json · evals/
  • evals.json · evals/
  • smart-playlist-recipe.md · references/
  • audit-library.sh · scripts/
  • build-offload-playlist.sh · scripts/

SKILL.md (first lines)

## 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 `--help` for 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
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_on` is `false` (or `cloud_safe` is 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.ineligible` is 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
bash scripts/build-offload-playlist.sh \
  --playlist "Offload — Cloud Safe" \
  --keep-folder "Crates" \
  --exclude-grouping "DJ" \
  --exclude-kind "WAV" \
  --replace
```

- `--keep-folder` protects every playlist inside that folder (e.g. recency
  crates and genre crates that feed Rekordbox).
- `--exclude-grouping` protects tracks tagged for active use (e.g. Grouping
  starting `DJ`).
- `--exclude-kind` protects local-only formats (default `WAV`).

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:
1. Open the playlist in Apple Music and **sanity-check the count** matches
   `in_playlist`.
2. **Test on a small batch first**: select ~50 tracks → right-click → **Remove
   Download** → confirm they show the cloud icon and still stream.
3. 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](references/smart-playlist-recipe.md).

From eyelock/assistants, MIT.

More from eyelock/assistants

Signals

Stars
2
Forks
0
Open issues
0
Last commit (this folder)
Oct 6, 2026 (23 days ago)
Last release
Aug 25, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from eyelock

Cite this page

reclaim-space skill. Agent Mart. https://agentmart.dev/skills/eyelock-reclaim-space (last updated 2026-10-24)