macos-cleanup

macos-cleanup is a skill for Claude Code, Codex from pivoshenko/pivoshenko.ai. It costs 150 tokens per session (1,601 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 150 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,601 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.00150 $0.01601
Opus 5 $0.00075 $0.00800
Sonnet 5 $0.00030 $0.00320
Haiku 4.5 $0.00015 $0.00160

Measured 4d ago against content hash 9de05e3584ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 4d 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 · 67 lines

How it starts

The opening of the file, as written. The whole thing — 67 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 · 67 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. 4d ago Changed 9de05e3584ee
  2. 9d 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 (4 stars, last pushed 5d ago), licensed MIT. It adds 150 tokens to every session and 1,601 once invoked, about $0.0007 per session on Opus 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

Other skills, from other repositories

80-livekit-agents-majiayu000-claude-skill-registr

Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter.

majiayu000/claude-skill-registry · 18 tokens

agent-creation-skill

Procedural guide for creating new agents from templates when project complexity requires delegation.

majiayu000/claude-skill-registry · 0 tokens

agent-creator

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use…

majiayu000/claude-skill-registry · 84 tokens

semantic-persona-routing

Erstellt und verwendet einen anbieterneutralen semantischen Routing-Graphen aus Personas, koordinierenden Rollen, Experten und aktiven Skill-Endpunkten. Verwenden, wenn ein LLM eine Anfrage von einer Leitrolle über einen Experten zu einem Skill routen, aus einem vorhandenen Agentensystem einen portablen Persona-Router…

ellmos-ai/skills · 168 tokens

80-livekit-agents-panaversity-agentfactory-1f8ecf89

Create your LiveKit Agents skill from official documentation, then learn to improve it throughout the chapter.

majiayu000/claude-skill-registry · 18 tokens

agent-creator

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use…

majiayu000/claude-skill-registry · 84 tokens