SwiftLee
Read post

How to free up Xcode disk space safely with an AI Agent

Xcode disk usage grows fast, especially with agentic development workflows using multiple Git worktrees. The author created an open-source Xcode Disk Cleanup Agent Skill that audits Derived Data, Simulators, archives, DeviceSupport, and caches before proposing any deletions. The skill uses a deterministic Python script to produce structured JSON output, keeping token usage low. It integrates with tools like Cursor, Claude Code, and Codex via the npx skills command. Cleanup is always approval-gated — nothing is deleted without explicit user confirmation, and irreversible operations like Simulator removal require a second confirmation. Archives are handled conservatively: distributed archives and the newest undistributed archive are preserved. The skill can also be triggered automatically when an agent detects low storage during a build or download failure.

    #ai-agents#ios#xcode
Jul 27•11m read time•From avanderlee.com
Post cover image
Table of contents
Why Xcode consumes so much disk spaceInstalling the Xcode Disk Space Cleanup Agent SkillWhat does the agent skill check?Why you should audit before deletingApplying my experience since 2009An agentic alternative to DevCleanerKeeping the audit token-efficientAutomatically detecting low storageApproving the cleanupConclusion
1 Impression
SwiftLee's image
SwiftLee

Avanderlee is a blog and resource hub for iOS development, offering tutorials, tips, and insights fo...

173 Followers

•

249 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard