CodexSoftwareShipping codeAI score · 80/100AI-assisted edit · no obvious prompt-injection riskX

Read-Only Mac Storage Audit with Codex/Claude Code: Visual Breakdown and Cleanup Candidates

Input: a read-only audit instruction → Process: AI scans home directory, generates visual breakdown and numbered candidate table → Output: an itemized cleanup list awaiting your approval

Some experienceStepsPromptTip
Who
Mac users running low on disk space who want to audit before manually deciding what to delete
You get
Get disk usage overview, visual breakdown of large folders, and a numbered cleanup candidate table with risk notes; author illustrates 956 GB → 600 GB (illustrative, not guaranteed)
You need
Codex

Constraints

Paste the author's read-only audit prompt into Codex or Claude Code. The tool scans the home folder (without opening personal file contents or downloading cloud-only files) and returns total/available space, a visual folder/type breakdown, and a numbered cleanup candidate table. You must explicitly approve items by number before any deletion or move occurs. Source does not specify model version; not tested by this site.

What they did

Author fenillramoliya shared on X a read-only Mac storage audit prompt for Codex or Claude Code, posting the full text in a self-reply. The prompt instructs AI to scan the home directory, produce a visual space breakdown and numbered cleanup candidate table, and forbids any cleanup before explicit user approval.

How it went

The author reported identifying and cleaning large files using this workflow, with an illustrative before/after image showing 956 GB → 600 GB (author-reported, not verified by this site).

Worth knowing

956 GB → 600 GB is an illustrative comparison from the author's image, not a guaranteed result. Source does not specify the model version used. The prompt asks the tool not to open personal file contents or download cloud-only files, but actual file access is constrained by local permissions and sandboxing. Recovery estimates in the numbered table are approximate; actual freed space may differ due to sparse files, shared blocks, and overlapping totals. Maintain Time Machine or other backups before any deletion.

Steps

  1. Open Codex or Claude Code

    Launch your locally installed Codex CLI or Claude Code interactive session. Ensure the tool has read access to your home directory (write permission is not required to begin the audit).

  2. Paste the read-only audit prompt

    Paste the full prompt below into the conversation and send. The prompt instructs the tool to perform an exploratory audit only, and forbids deleting, moving, clearing, or stopping any files or apps before receiving your explicit approval.

    Execution prompt · Source text。Codex or Claude Code conversation input

    Audit my Mac’s storage and show me where the space is going.
    
    This is an exploration task. Do not delete, move, clear or unpin files, empty Trash, or stop apps. Wait for my explicit approval before cleanup.
    
    Inspect my home folder, not just the current project. Use folder sizes and file metadata without opening personal file contents or downloading cloud-only files.
    
    Give me:
    
    1. Total, used and available disk space. Explain any differences from macOS Storage Settings.
    
    2. A visual, tile-style breakdown of the largest folders and file types: Documents, Downloads, Desktop, recordings, archives, development projects and app caches. Drill into the biggest contributors.
    
    3. A numbered cleanup table showing:
       • Exact path and measured size
       • What it contains
       • Why it might be removable
       • What I would lose or need to recreate
       • Any checks required before removal
    
    Separate regenerable caches and build output from personal files, backups, dependencies and app data. Large or old does not automatically mean unnecessary.
    
    Preserve passwords, cookies, history, bookmarks, sessions, credentials, source code, Git history, databases and Docker volumes. Keep AI/coding tools’ data and shared caches out of cleanup candidates unless I explicitly include them.
    
    For cloud folders, distinguish freeing local space from deletion that syncs everywhere. For installers, verify the app is installed and the installer is unused. Identify apps or dev servers that must close before cleanup.
    
    Use allocated disk usage where possible. Flag sparse files, shared blocks and overlapping totals. Give a conservative recovery estimate without double-counting, and clearly state anything you couldn’t verify.
    
    Finish by asking which numbered items I approve. Do not perform cleanup yet.
  3. Review output and approve by item number

    The tool returns three sections: disk overview with macOS Storage Settings variance notes, visual breakdown of large folders, and a numbered cleanup candidate table. Read each path's risk notes carefully (what would be lost, what needs recreation, pre-removal checks). Only reply with approved numbers after fully understanding the consequences; unapproved items will not be executed.

Prompt you can copy

Setup guidance · Editorial suggestion。For setup assistant: confirm Codex CLI or Claude Code is installed locally and has read access to home directory

This block is the prompt. Ads are never placed here.

Open Codex or Claude Code, paste the source audit prompt from step 2 verbatim, then check and fix its output item by item.

The prompt is long; copy and paste the full text at once. Do not send in chunks to avoid truncating the numbered list format.

Source

让 Codex/Claude Code 只读审计 Mac 磁盘:可视化大文件夹与清理候选表,956GB→600GB · fenillramoliya · X · 2026-10-17T17:44:33.000Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related