xcode-disk-cleanup

xcode-disk-cleanup is a skill for Claude Code from AvdLee/Xcode-Disk-Cleanup-Agent-Skill. It costs 147 tokens per session (2,774 once invoked), scanned B, original, MIT.

A macOS audit guide for finding Xcode-related storage, such as build products, simulator data, archives, debugging files, dependency caches, and old runtimes. It treats cleanup as an inventory and review process before any deletion.

In plain words
What is it for?
Use it to inspect Xcode storage, identify safe cleanup candidates with paths and sizes, recheck them before removal, and move ordinary files to Trash while preserving important archives and debugging files.
Why use it?
It helps recover disk space while showing exactly what can be removed, what it costs to recreate, and what may be needed for shipped apps. It also reduces the risk of deleting system-managed or release-related files.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the xcode-disk-cleanup plugin — 1 skill shipped together

Good fit Use it to inspect Xcode storage, identify safe cleanup candidates with paths and sizes, recheck them before removal, and move ordinary files to Trash while preserving important archives and debugging files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-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 AvdLee/Xcode-Disk-Cleanup-Agent-Skill --skill xcode-disk-cleanup
Clone the repo
git clone --depth 1 https://github.com/AvdLee/Xcode-Disk-Cleanup-Agent-Skill

Made for: Claude Code.

Or install xcode-disk-cleanup, the plugin that ships this one along with the rest of its 1 skill.

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 xcode-disk-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-cleanup/github.svg)](https://agentmods.dev/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-cleanup)
Your own site
<a href="https://agentmods.dev/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-cleanup"><img src="https://agentmods.dev/badge/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-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 xcode-disk-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-cleanup"><img src="https://agentmods.dev/badge/skills/avdlee/xcode-disk-cleanup-agent-skill/xcode-disk-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,774 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00147 $0.02774
Opus 5.5 $0.00059 $0.01110
Sonnet 5.5 $0.00029 $0.00555
Haiku 4.5 $0.00015 $0.00277

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

Security

Grade B, and why

xcode-disk-cleanup scanned grade B with 1 finding 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/xcode_disk_cleanup.py), 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.

Recursive force deletemediumDestructive command

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

- Never use wildcards, unbounded `rm -rf`, `sudo`, SIP changes, or manual deletion

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

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

xcode-disk-cleanup/SKILL.md · 251 lines

How it starts

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

Xcode Disk Cleanup

Safety contract

  • Treat every cleanup request as permission to audit, not permission to delete.
  • Never mutate storage before presenting exact candidate IDs, paths or simulator identifiers, measured sizes, risks, and regeneration costs.
  • Treat a category-level request made after an audit (for example, “remove all outdated documentation caches”) as approval of the matching, current frozen selection set when it was already fully enumerated to the user. Execute in that turn after revalidation; do not restate the set and ask again. No special command or repeated confirmation is required. Broad requests made before an audit, such as “clean Xcode” or “delete everything,” remain audit-only.
  • Default ordinary files and directories to Trash. Explain that space is not reclaimed until Trash is emptied, and request separate approval before doing so.
  • Revalidate identity and running-process usage immediately before mutation.
  • Never use wildcards, unbounded rm -rf, sudo, SIP changes, or manual deletion inside system-managed CoreSimulator and MobileAsset directories.
  • Preserve archives and dSYMs unless the user proves the exact distributed build is backed up elsewhere and separately approves deletion.
  • Never delete Package.resolved, signing assets, credentials, custom DocSets, the active Xcode, a running simulator, or an Xcode that uniquely provides a required SDK/toolchain.
  • Report summed candidate sizes separately from actual APFS space recovered.

Read references/safety-model.md before applying cleanup.

Workflow

1. Preflight

  1. Confirm the host is macOS and the bundled script is available.
  2. Check for active Xcode, Simulator, xcodebuild, Swift build, test, archive, and package-resolution processes.
  3. Treat an open Xcode or Simulator application as context, not an automatic cleanup blocker. Defer an affected cleanup when a build, test, archive, or package-resolution process is active, an exact candidate is actively needed by that operation, or a supported deletion API requires the app/device to be stopped.
  4. Do not ask the user to quit apps merely because they appear in ps. For regenerable documentation caches, moving an old cache while Xcode is open may temporarily remove local documentation until it reloads, but does not require quitting Xcode or Simulator. State that cost instead.
  5. Determine optional source roots for project-local .build and .derived-data scanning. Do not crawl the whole home directory.

Read the full file on GitHub · 251 lines

Files

What ships with it

6 files 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 First seen · 251 lines · 147 tokens per session scan B b070fa1eb851

Subscribe to this mod's changes

xcode-disk-cleanup is a skill published in the GitHub repository AvdLee/Xcode-Disk-Cleanup-Agent-Skill (75 stars, last pushed 1mo ago), licensed MIT. It adds 147 tokens to every session and 2,774 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

apple-notes

Read Apple Notes content and execute checklist-driven automations in order. Use when a user asks to run tasks from an Apple Note (especially a checklist note like "AGENT TODO LIST"), or to fetch a specific note body for automation.

IvanCampos/agents · 51 tokens

confetti

Trigger a two-step confetti celebration by opening the Raycast confetti URL and speaking a phrase with the Alex voice. Use when the user asks to run confetti, celebrate, or trigger the confetti sequence.

IvanCampos/agents · 46 tokens

macos-disk-cleanup

A macOS disk-space diagnostic and cleanup workflow, including hidden “System Data” storage. It examines developer files, package-manager caches, containers, virtual machines, browser profiles, and leftover app data.

himynameisben/macos-disk-cleanup · 284 tokens

free-space

Free up disk space on a Mac safely. Scans for reclaimable space — app caches, developer caches (npm/uv/cargo/gradle/…), local AI models (Ollama/HuggingFace), Trash, Xcode build data, Docker images, leftover data from uninstalled apps, old nodemodules, and large stray files — then deletes only what the user approves.…

NikOneZ1/mac-space-cleaner · 115 tokens

mac-disk-cleanup

Scan a Mac for reclaimable disk space — caches, duplicate editor extensions, package-manager caches (npm/gradle/uv/pnpm/Homebrew), Docker images and build cache, iOS simulators, nodemodules and Python venvs, app caches, and old downloads — then present what was found grouped by size and safety, and let the USER choose…

Mateeb11/skills · 166 tokens

anti-sleep

Keep a Mac awake with caffeinate during long builds, downloads, or supervised automation runs.

sickn33/agentic-awesome-skills · 22 tokens