mac-cleanup
This skill should be used when the user asks to "clean up my Mac", "free disk space", "my disk is full", "what's taking up space", "reclaim storage", "offload…
Skill by sejas
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/sejas-mac-cleanup
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.
About
Use cases: productivity
Reviews
Write a reviewNo 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. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/mac-cleanup
What's inside
- Skill name
mac-cleanup- Description
- This skill should be used when the user asks to "clean up my Mac", "free disk space", "my disk is full", "what's taking up space", "reclaim storage", "offload files", or wants to dedupe/archive backups and media to remote storage. Provides a scan → categorize → offload/clean → reclaim workflow with tested scripts and macOS-specific gotchas.
- License
- MIT
- Instructions
- 111 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (6)
- SKILL.md
- cleanup-playbook.md · references/
- macos-quirks.md · references/
- backup-dedup.py · scripts/
- offload-retry.sh · scripts/
- scan-disk.sh · scripts/
SKILL.md (first lines)
# Mac Cleanup
Free disk space on macOS safely: find the real space hogs, sort them into
risk buckets, offload irreplaceable data to remote storage, delete only what
regenerates, and actually reclaim the space. Built for stock macOS (bash 3.2,
openrsync, permission-restricted `rm`, `trash` CLI) and Hetzner Storage Box
offload.
## Iron rules
1. **Scan before deleting.** Never guess what's big — measure.
2. **Categorize before touching.** Every hog is regenerable cache, app data,
personal media, or a backup. Handling differs (see
`references/cleanup-playbook.md`).
3. **Offload, don't delete, irreplaceable media.** Copy to remote, verify on the
remote, *then* remove local.
4. **Confirm anything personal or >10G.** VMs, photo archives, large app data.
5. **Reclaim is not done until Trash is emptied.** `trash` frees nothing on its own.
## Workflow
### 1. Scan
Run the read-only scanner:
```bash
bash ~/.claude/skills/mac-cleanup/scripts/scan-disk.sh
```
It reports free space and ranked consumers across `$HOME`, `Library/Group
Containers` (Parallels VMs hide here), `Application Support`, `Caches`, package
caches, Docker, `node_modules`, `Downloads`, and Trash.
### 2. Categorize
Sort each hog using `references/cleanup-playbook.md`:
- **Regenerable caches** (npm, .cache, playwright, electron, typescript, Docker
images) → clean immediately, just announce it.
- **App data / models** (Claude vm_bundles, Whisper models, browser caches) →
low risk, confirm; keep state DBs.
- **Personal media** (photos, video, wedding/travel archives) → offload only.
- **Backups** (studio/jetpack/.wpress) → keep one latest per site, offload it.
### 3. Offload personal media + backups
Set up the remote once (Hetzner Storage Box — see `references/macos-quirks.md`
for `ssh-copy-id -s`). Create the remote dir, then use the retry-loop offloader
(survives SSH drops, removes local only after each file verifies):
```bash
ssh <alias> "mkdir -p pictures"
bash ~/.claude/skills/mac-cleanup/scripts/offload-retry.sh <alias>:pictures/ ~/Documents/photos-disk
```
For backups, dedupe first — keep latest per site:
```bash
python3 ~/.claude/skills/mac-cleanup/scripts/backup-dedup.py ~/Downloads
# writes /tmp/backup_move.txt (latest per site) + /tmp/backup_delete.txt (older)
ssh <alias> "mkdir -p studio-wordpress-backups"
SRCS=(); while IFS= read -r p || [ -n "$p" ]; do [ -n "$p" ] && SRCS+=("$p"); done < /tmp/backup_move.txt
bash ~/.claude/skills/mac-cleanup/scripts/offload-retry.sh <alias>:studio-wordpress-backups/ "${SRCS[@]}"
```
Run long transfers in the background and report on completion.
### 4. Clean regenerable caches
```bash
npm cache clean --force
docker system prune -a --volumes -f # daemon must be running
```
For cache directories, use `trash` (not `rm` — usually blocked):
```bash
trash ~/.cache ~/Library/Caches/{ms-playwright,electron,typescript,Cypress,Yarn,node-gyp,pip}
```
### 5. Verify + reclaim
- After any directory move, confirm sources emptied: `find <dir> -type f | wc -l` → 0,
then `trash` the empty shells.
- Verify offloaded data landed: `ssh <alias> "du -sh <remote>/*"`.
- Trash holds the freed space until emptied. Offer to empty (irreversible, clears
ALL trash):
```bash
osascript -e 'tell application "Finder" to empty trash'
```
- Re-run `scan-disk.sh`; report before/after free space.
## Critical macOS gotchas
Read `references/macos-quirks.md` before scripting. Highlights:
- **bash 3.2**: no `mapfile`; read lists with `while IFS= read -r p || [ -n "$p" ]`.
- **openrsync**: rejects `--append-verify`; use `-avP --remove-source-files --timeout=120`.
- **`rm`/`rmdir` blocked**, `trash` allowed; `~/.Trash` not shell-readable.
- **SSH drops** on long transfers → retry loop (built into `offload-retry.sh`).
- **`Docker.raw`** auto-shrinks on APFS after prune.
## Resources
- `scripts/scan-disk.sh` — read-only hog scanner.
- `scripts/offload-retry.sh` — rsync-to-remote with SSH-drop retry + verified local removal.
- `scripts/backup-dedup.py` — group WP/Studio backups by site, emit move/delete lists.
- `references/cleanup-playbook.md` — the four buckets + decision flow + never-delete list.
- `references/macos-quirks.md` — bash/openrsync/trash/SSH/Docker specifics.From sejas/ai-code-skills, MIT.
More from sejas/ai-code-skills
- 0.603score
gpt-image
sejas
Generate and edit images with OpenAI GPT Image 2.5 via fal.ai.
SkillAFreshness: A★ 2Claude Code +9 - 0.557score
id-photo-sheet
sejas
Use when the user needs ID/passport/carnet photos (foto carnet, foto de carné, DNI, visa) at an exact mm size (e.g.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
design-review
sejas
Designer's-eye QA of a running UI — screenshots it at real breakpoints, then reports spacing, hierarchy, alignment, contrast, state and motion defects ranked…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
brainstorming-names
sejas
Use when the user wants to name or rename something — a product, feature, brand, project, command, or company — or asks to "brainstorm names", "find a better…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
first-time-contributors
sejas
Use when checking whether recently merged PRs in a GitHub repository include first-time contributors — e.g.
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
pr-leaderboard
sejas
Use when asked to analyze, rank, or explore merged PRs in a GitHub repo — "who merged what this week", "PR leaderboard", "rank contributors", "top authors"…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
make-pdf
sejas
Turn a markdown file into a publication-quality PDF — cover page, clickable table of contents with page numbers, running headers, page numbers, curly quotes…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
ai-radar
sejas
Use when Antonio wants to catch up on frontier AI — "what's new in AI", "AI radar", "what is karpathy working on", "AI trends", "research digest", "what…
SkillCFreshness: C★ 2Claude Code +9 - 0.503score
og-inspect
sejas
Inspect a URL's Open Graph and Twitter Card metadata and render a styled HTML page showing how the link unfurls on Facebook, X/Twitter, LinkedIn…
SkillCFreshness: C★ 2Claude Code +9 - 0.443score
commit
sejas
Write a commit message and create a git commit.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
presentation
sejas
Generate a Marp presentation from an intent's spec.
SkillDFreshness: D★ 2Claude Code +9 - 0.436score
ai-prs
sejas
List all open PRs targeting the Studio AI command with draft status, approval state, and requested reviewers
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jun 9, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sejas/ai-code-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sejas
- 0.603score
gpt-image
sejas
Generate and edit images with OpenAI GPT Image 2.5 via fal.ai.
SkillAFreshness: A★ 2Claude Code +9 - 0.557score
id-photo-sheet
sejas
Use when the user needs ID/passport/carnet photos (foto carnet, foto de carné, DNI, visa) at an exact mm size (e.g.
SkillBFreshness: B★ 2Claude Code +9 - 0.507score
first-time-contributors
sejas
Use when checking whether recently merged PRs in a GitHub repository include first-time contributors — e.g.
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
ai-radar
sejas
Use when Antonio wants to catch up on frontier AI — "what's new in AI", "AI radar", "what is karpathy working on", "AI trends", "research digest", "what…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
brainstorming-names
sejas
Use when the user wants to name or rename something — a product, feature, brand, project, command, or company — or asks to "brainstorm names", "find a better…
SkillCFreshness: C★ 2Claude Code +9 - 0.507score
pr-leaderboard
sejas
Use when asked to analyze, rank, or explore merged PRs in a GitHub repo — "who merged what this week", "PR leaderboard", "rank contributors", "top authors"…
SkillCFreshness: C★ 2Claude Code +9
Cite this page
mac-cleanup skill. Agent Mart. https://agentmart.dev/skills/sejas-mac-cleanup (last updated 2026-10-24)