skills/macos-dev-storage-cleanup/SKILL.md
Measure and safely clean reclaimable macOS developer storage, including Xcode, simulator, CoreDevice, rebuildable project artifacts, Docker or OrbStack, VS Code, app cache, WeChat media, and Time Machine local snapshots.
npx skillsauth add grepug/skills macos-dev-storage-cleanupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when a user wants an agent to inspect, plan, or apply cleanup for reclaimable storage on a macOS development machine.
The default posture is read-first and plan-driven. Measure actual size before deleting, classify every cleanup item by risk, ask for explicit user authorization, and verify free space after cleanup.
xcrun, tmutil, docker, or orb only when those tools are present and relevant.db_storage, account databases, chat databases, or equivalent app-owned message stores.sudo for the main workflow./tmp files for long cleanup plans passed to CLI commands.Discover the user goal and constraints:
Run a read-only scan:
python3 skills/macos-dev-storage-cleanup/scripts/scan_macos_storage.py --format human
For a reusable plan, write JSON to /tmp:
python3 skills/macos-dev-storage-cleanup/scripts/scan_macos_storage.py --format json > /tmp/macos-storage-plan.json
Review the size-ordered output and classify cleanup items:
regeneratable: safe to recreate or re-download, such as build artifacts and cachesreview-required: user-owned, app-owned, tool-owned, or high-regeneration-cost data that needs explicit selectionleave-alone: reported for awareness onlyPresent one concrete cleanup plan before deleting anything. Use consistent wording: call each selected target a cleanup item.
Apply only the selected categories or item IDs after the user authorizes deletion:
python3 skills/macos-dev-storage-cleanup/scripts/apply_macos_storage_cleanup.py \
--plan /tmp/macos-storage-plan.json \
--category xcode-derived-data \
--category developer-artifact \
--apply
For long category or item selections, write the plan to /tmp and pass the path instead of embedding large JSON inline.
Verify final state:
df -h /Use scan_macos_storage.py for read-only discovery. It supports:
--format human|json--category <name> repeated to narrow scanning--min-size-mb <number> for filesystem cleanup items--home <path> for test or alternate home roots--artifact-root <path> repeated for project artifact discovery--archive-root <path> repeated for custom archive discovery--latest-xcode-version and --latest-simulator-version as review hintsUse apply_macos_storage_cleanup.py for plan application. It defaults to dry-run. It requires:
--plan <json> for the scan output--apply before deletion--category or --item when --apply is presentThe cleanup script refuses paths outside known cleanup categories unless --allow-path <root> is supplied. Use --allow-path only for user-approved custom roots.
Read cleanup-targets.md when you need exact target categories, risk classification, and deletion behavior.
Report:
/tmpscripts/scan_macos_storage.py - read-only scanner that emits human or JSON cleanup reports.scripts/apply_macos_storage_cleanup.py - dry-run-first cleanup plan applier with explicit category and item gates.scripts/test_macos_storage_cleanup.py - fixture smoke tests for classification, selection, and guardrails.references/cleanup-targets.md - target categories, risk classes, and cleanup rules.development
Govern inline documentation coverage and comment quality in repo-owned source files. Use when Codex needs to audit or fix file headers, type docs, function or method contract docs, non-obvious inline comments, generated-file exclusions, or repo documentation rules for TypeScript, JavaScript, and Swift projects, including setting up a reusable docs/rules policy in a project-agnostic way.
tools
产品无关的 Linear 工作流,用于创建、更新、检查和讨论产品 issue、元数据、状态、范围、确认事项和长期产品文档同步。
data-ai
One-sentence summary of what this skill helps an agent do and when it should be used.
development
Bump version/build number, archive an Xcode project, upload to App Store Connect, then tag and push the release in git. Use when a user wants to release an iOS or macOS app to the App Store — tasks like "archive and upload to ASC", "bump version and release", "release version 2.1.0 build 42", "release from git tag", or "retry a failed upload".