macos-cleanup

macos-cleanup is a skill for Claude Code, Codex from pivoshenko/pivoshenko.ai. It costs 144 tokens per session (1,627 once invoked), scanned B, original, MIT.

A macOS cleanup workflow for finding unused caches, logs, app leftovers, backups, development files, and startup items.

In plain words
What is it for?
Use it to scan storage, identify leftovers from deleted apps, review developer-tool caches and login items, remove confirmed files, and verify recovered space.
Why use it?
It shows what is using disk space before anything is removed and separates safe-to-regenerate files from items that need a decision.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool; mentions Codex.

Good fit Use it to scan storage, identify leftovers from deleted apps, review developer-tool caches and login items, remove confirmed files, and verify recovered space.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pivoshenko/pivoshenko.ai/macos-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pivoshenko/pivoshenko.ai --skill macos-cleanup
Clone the repo
git clone --depth 1 https://github.com/pivoshenko/pivoshenko.ai

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macos-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/macos-cleanup/github.svg)](https://agentmods.dev/skills/pivoshenko/pivoshenko.ai/macos-cleanup)
Your own site
<a href="https://agentmods.dev/skills/pivoshenko/pivoshenko.ai/macos-cleanup"><img src="https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/macos-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for macos-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/pivoshenko/pivoshenko.ai/macos-cleanup"><img src="https://agentmods.dev/badge/skills/pivoshenko/pivoshenko.ai/macos-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00144 $0.01627
Opus 5.5 $0.00058 $0.00651
Sonnet 5.5 $0.00029 $0.00325
Haiku 4.5 $0.00014 $0.00163

Measured 1mo ago against content hash eec2fb55f538, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

macos-cleanup scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/scan.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- No sudo by default. System paths (`/Library/Caches`, `/Library/Logs`, LaunchDaemons) -> report; act only on explicit sudo OK

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- Xcode: `rm -rf ~/Library/Developer/Xcode/DerivedData`; `xcrun simctl delete unavailable`; old iOS DeviceSupport = risky (re-fetch needs the device)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/macos-cleanup/SKILL.md · 68 lines

How it starts

The opening of the file, as written. The whole thing — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.

macOS Cleanup

Deep-clean: junk + app leftovers + dev junk + space/startup audit. Destructive territory -> scan (read-only) -> sized report -> confirm -> delete -> verify freed. Never delete during scan.

Flow

  1. Scan: bash scripts/scan.sh. Read-only, deletes nothing. Sized report -> stdout, raw lists -> /tmp/macos-cleanup-scan.*/ (path printed). du over ~/Library = takes a minute+, warn user up front
  2. Cross-ref leftovers: installed.txt (app bundle ids + cask/formula names) vs candidates (app-support.txt, containers.txt, preferences.txt, caches.txt, saved-state.txt, LaunchAgents). Matching rules below. Flag only what you can name the dead app for
  3. Report: table per category - item · size · verdict (safe = regenerable / risky = judgment call / skip + why). Lead with total reclaimable + current disk free
  4. Confirm: AskUserQuestion, multiSelect across categories. Anything >1 GB or non-regenerable (iOS backups, go modcache, simulator runtimes, Xcode DeviceSupport) -> its own option, never bundled into a category
  5. Clean: only what was confirmed, commands below. Leftovers + launch agents -> Finder Trash (recoverable). Pure caches -> rm fine
  6. Verify: df -h / before vs after -> "freed X GB". List skipped + why. df unchanged -> likely APFS purgeable / TM local snapshots; report tmutil listlocalsnapshots /, thinning is automatic, tmutil deletelocalsnapshots <date> only on explicit ask

Categories

User/System Junk (Mostly Safe)

  • ~/Library/Caches/* - per-entry, not wholesale. Skip entries of currently running apps (pgrep -if <name>) or tell user to quit them
  • ~/Library/Logs, CrashReporter, QuickLook thumbnails, ~/Library/HTTPStorages - regenerable
  • Trash: osascript -e 'tell app "Finder" to empty trash' (handles locked files)
  • Mail Downloads cache - safe; Mail data itself off-limits
  • iOS device backups (~/Library/Application Support/MobileSync/Backup) - user data, not regenerable. Individual confirm, state device + date per backup (ls -lt)

Read the full file on GitHub · 68 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +1 lines · -6 tokens per session eec2fb55f538
  2. 1mo ago Changed 6b773a0b9113
  3. 2mo ago Changed 9de05e3584ee
  4. 2mo ago First seen · 67 lines · 150 tokens per session scan B 08dc26aa9c50

Subscribe to this mod's changes

macos-cleanup is a skill published in the GitHub repository pivoshenko/pivoshenko.ai (6 stars, last pushed 5d ago), licensed MIT. It adds 144 tokens to every session and 1,627 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

macos-cleanup compared with skills from other repositories

macos-cleanup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
macos-cleanuppivoshenko/pivoshenko.aiSkill65d agoMITB144Claude Code, Codex
semantic-persona-routingellmos-ai/skillsSkill94d agoMITA168Codex
80-livekit-agents-majiayu000-claude-skill-registrmajiayu000/claude-skill-registry-dataSkill28yesterdaynoneA18Claude Code, Codex
80-livekit-agents-panaversity-agentfactory-1f8ecf89majiayu000/claude-skill-registry-dataSkill28yesterdaynoneA18Claude Code, Codex
agent-creation-skillmajiayu000/claude-skill-registry-dataSkill28yesterdaynoneA0Claude Code, Codex
agent-creatormajiayu000/claude-skill-registry-dataSkill28yesterdaynoneA84Claude Code
agent-creatormajiayu000/claude-skill-registry-dataSkill28yesterdaynoneA84Claude Code