- Skill ID
- daymade/claude-code-skills/macos-cleaner
- Publisher
- daymade
- Repository
- claude-code-skills
- Installs
- 0
- Files
- 134
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
daymade/claude-code-skills/macos-cleanerInstalls these files- SKILL.md
- references/apple_content_caching.md
- references/chromium_code_sign_clones.md
- references/cleanup_targets.md
- references/docker_analysis.md
- references/mole_integration.md
- references/proving-redundancy-before-deletion.md
- references/report_templates.md
- references/safety_rules.md
- scripts/analyze_caches.py
- scripts/analyze_code_sign_clones.py
- scripts/analyze_dev_env.py
- scripts/analyze_large_files.py
- scripts/check_gate_plan.py
- scripts/cleanup_report.py
- scripts/find_app_remnants.py
- scripts/safe_delete.py
- tests/fixtures/corpus/known-bad-original.md
- tests/fixtures/corpus/known-good-arm1.md
- tests/fixtures/corpus/known-good-round2-plan.md
- tests/fixtures/corpus/known-good-round2-table.md
- tests/fixtures/corpus/known-good-zai.md
- tests/fixtures/review-probes-r3/r3-01_gate.md
- tests/fixtures/review-probes-r3/r3-01_plan.md
- tests/fixtures/review-probes-r3/r3-02_gate.md
- tests/fixtures/review-probes-r3/r3-02_plan.md
- tests/fixtures/review-probes-r3/r3-03_gate.md
- tests/fixtures/review-probes-r3/r3-03_plan.md
- tests/fixtures/review-probes-r3/r3-04_gate.md
- tests/fixtures/review-probes-r3/r3-04_plan.md
- tests/fixtures/review-probes-r3/r3-04b_gate.md
- tests/fixtures/review-probes-r3/r3-04b_plan.md
- tests/fixtures/review-probes-r3/r3-04c_plan.md
- tests/fixtures/review-probes-r3/r3-04d_gate.md
- tests/fixtures/review-probes-r3/r3-04d_plan.md
- tests/fixtures/review-probes-r3/r3-05_gate.md
- tests/fixtures/review-probes-r3/r3-05_plan.md
- tests/fixtures/review-probes-r3/r3-05b_plan.md
- tests/fixtures/review-probes-r3/r3-06_gate.md
- tests/fixtures/review-probes-r3/r3-06_plan.md
- tests/fixtures/review-probes-r3/r3-06b_gate.md
- tests/fixtures/review-probes-r3/r3-06b_plan.md
- tests/fixtures/review-probes-r3/r3-07_gate.md
- tests/fixtures/review-probes-r3/r3-07_plan.md
- tests/fixtures/review-probes-r3/r3-07b_plan.md
- tests/fixtures/review-probes-r3/r3-07c_gate.md
- tests/fixtures/review-probes-r3/r3-08_gate.md
- tests/fixtures/review-probes-r3/r3-08_plan.md
- tests/fixtures/review-probes-r3/r3-09_gate.md
- tests/fixtures/review-probes-r3/r3-09_plan.md
- tests/fixtures/review-probes-r3/r3-09b_gate.md
- tests/fixtures/review-probes-r3/r3-09c_gate.md
- tests/fixtures/review-probes-r3/r3-10_gate.md
- tests/fixtures/review-probes-r3/r3-10_plan.md
- tests/fixtures/review-probes-r3/r3-11_gate.md
- tests/fixtures/review-probes-r3/r3-11_plan.md
- tests/fixtures/review-probes-r3/r3-11b_gate.md
- tests/fixtures/review-probes-r3/r3-11b_plan.md
- tests/fixtures/review-probes-r3/r3-11c_gate.md
- tests/fixtures/review-probes-r3/r3-12_plan.md
- tests/fixtures/review-probes-r3/r3-13_gate.md
- tests/fixtures/review-probes-r3/r3-13b_gate.md
- tests/fixtures/review-probes-r3/r3-14_gate.md
- tests/fixtures/review-probes-r3/r3-14_plan.md
- tests/fixtures/review-probes-r3/r3-14b_gate.md
- tests/fixtures/review-probes-r3/r3-15_plan.md
- tests/fixtures/review-probes-r4/r4-01_plan.md
- tests/fixtures/review-probes-r4/r4-01_table.md
- tests/fixtures/review-probes-r4/r4-01ctl_table.md
- tests/fixtures/review-probes-r4/r4-02_plan.md
- tests/fixtures/review-probes-r4/r4-02_table.md
- tests/fixtures/review-probes-r4/r4-02b_plan.md
- tests/fixtures/review-probes-r4/r4-02b_table.md
- tests/fixtures/review-probes-r4/r4-03_plan.md
- tests/fixtures/review-probes-r4/r4-03_table.md
- tests/fixtures/review-probes-r4/r4-04_plan.md
- tests/fixtures/review-probes-r4/r4-04_table.md
- tests/fixtures/review-probes-r4/r4-04ctl_table.md
- tests/fixtures/review-probes-r4/r4-05_plan.md
- tests/fixtures/review-probes-r4/r4-05_table.md
- tests/fixtures/review-probes-r4/r4-05ctl_table.md
- tests/fixtures/review-probes-r4/r4-07_plan.md
- tests/fixtures/review-probes-r4/r4-07_table.md
- tests/fixtures/review-probes-r4/r4-09_plan.md
- tests/fixtures/review-probes-r4/r4-09_table.md
- tests/fixtures/review-probes-r4/r4-10_plan.md
- tests/fixtures/review-probes-r4/r4-10_table.md
- tests/fixtures/review-probes-r4/r4-11_plan.md
- tests/fixtures/review-probes-r4/r4-11_table.md
- tests/fixtures/review-probes-r4/r4-11b_plan.md
- tests/fixtures/review-probes-r4/r4-11b_table.md
- tests/fixtures/review-probes-r4/r4-12_plan.md
- tests/fixtures/review-probes-r4/r4-12_table.md
- tests/fixtures/review-probes-r4/r4-13_plan.md
- tests/fixtures/review-probes-r4/r4-13_table.md
- tests/fixtures/review-probes-r4/r4-13ctl_table.md
- tests/fixtures/review-probes-r4/r4-14_plan.md
- tests/fixtures/review-probes-r4/r4-14_table.md
- tests/fixtures/review-probes-r4/r4-15_plan.md
- tests/fixtures/review-probes-r4/r4-15_table.md
- tests/fixtures/review-probes-r4/r4-16_plan.md
- tests/fixtures/review-probes-r4/r4-16_table.md
- tests/fixtures/review-probes-r4/r4-17_plan.md
- tests/fixtures/review-probes-r4/r4-18_plan.md
- tests/fixtures/review-probes-r4/r4-18_table.md
- tests/fixtures/review-probes/p10_gate.md
- tests/fixtures/review-probes/p10_plan.md
- tests/fixtures/review-probes/p11_gate.md
- tests/fixtures/review-probes/p11_plan.md
- tests/fixtures/review-probes/p12_gate.md
- tests/fixtures/review-probes/p1_gate.md
- tests/fixtures/review-probes/p1_plan.md
- tests/fixtures/review-probes/p2_gate.md
- tests/fixtures/review-probes/p2_plan.md
- tests/fixtures/review-probes/p3_gate.md
- tests/fixtures/review-probes/p3_plan.md
- tests/fixtures/review-probes/p3b_gate.md
- tests/fixtures/review-probes/p4_gate.md
- tests/fixtures/review-probes/p4_plan.md
- tests/fixtures/review-probes/p4b_gate.md
- tests/fixtures/review-probes/p4b_plan.md
- tests/fixtures/review-probes/p5_gate.md
- tests/fixtures/review-probes/p5_plan.md
- tests/fixtures/review-probes/p6_plan.md
- tests/fixtures/review-probes/p7_gate.md
- tests/fixtures/review-probes/p7_plan.md
- tests/fixtures/review-probes/p8_gate.md
- tests/fixtures/review-probes/p8_plan.md
- tests/fixtures/review-probes/p9_gate.md
- tests/fixtures/review-probes/p9_plan.md
- tests/test_analyze_code_sign_clones.py
- tests/test_cleanup_report.py
- tests/test_gate_checker.py
- tests/test_safe_delete.py
What this skill tells the agent
macOS Cleaner
Diagnose the actual source of disk pressure, reclaim only approved space, and prove that the cleanup did not damage user data or co-resident services.
Entry router
Choose the narrowest path that can answer the request:
| User signal | Route |
|---|---|
Apple Content Caching, AssetCacheManagerUtil, CacheUsed, ActualCacheUsed, iCloud cache, or “Caching needs more space” | Read references/apple_content_caching.md completely before probing or proposing commands |
| Docker, OrbStack, images, containers, or volumes | Read references/docker_analysis.md; inspect every object and never use prune-family commands |
| Docker build cache | Measure with docker builder du; this skill reports it but does not delete it because Docker exposes category-wide prune controls rather than per-record intent |
Chrome, ChromeDriver, Playwright, Codex Computer Use, Edge, or Chromium has large *.code_sign_clone directories | Read references/chromium_code_sign_clones.md completely; use the bundled analyzer to separate active, inactive, and unknown exact children and never equate du with physical release |
| A named cache, directory, application, or service is already the suspect | Inspect that target first and read the matching semantics in references/cleanup_targets.md; do not start a home-directory or whole-disk scan |
| The source is genuinely unknown | Use the general analysis workflow below; Mole is optional, not the universal first step |
User-provided scope exclusions override every generic scan suggestion. Do not inspect personal directories, credentials, databases, application state, or unrelated services when the user excludes them.
Safety and authorization contract
- Separate observation from mutation. Complete a read-only diagnosis first. Do not delete, stop a service, edit settings, install or upgrade tools, or run a cleanup preview that may mutate state during that phase.
- Confirm the exact target. On a remote Mac, record the current host identity before any other work. Never infer the machine from an IP, old PID, directory name, or prior report.
- Plan before asking. Before any state change, list every command, what it changes, expected physical space reclaimed, impact, recoverability, and postconditions. Then stop if the user requested a plan-only phase.
- Require explicit approval. If the user supplies an exact confirmation phrase, require that phrase. Otherwise ask for unmistakable approval of the listed commands and targets. Approval for one plan does not authorize a fallback or a wider cleanup.
- Use precise supported controls — and check them for known defects first. Prefer an application's supported cache-management command or an exact object ID. "Official" and "precise" are not evidence of safety, so before the first supported-control command runs, do a known-issue check on that exact command at the installed version: a search of the tool's issue tracker for the command name, plus its changelog for fixes landing in a later release than the one installed. A command with an open, version-relevant defect is not a supported control for this skill — treat it like the category-wide commands in the next rule and either upgrade past the fix or use an exact-path alternative. If no supported control exists, an exact application-owned cache directory may be removed only after verifying its owner, confirming the application is stopped or the directory is otherwise inactive, explaining rebuild/redownload impact, and receiving approval. Never target a broad cache root or active application state.
- Never use Docker prune-family commands. This includes image, container, volume, system, builder, and buildx prune. Category-wide deletion cannot express per-object user intent.
- Avoid broad destructive shell forms. Do not recommend or execute broad
rm -rfor glob deletion. For exact approved ordinary files, prefer Finder Trash. The bundled legacy helper permanently deletes and has only the limited guards documented below; never treat it as equivalent to Trash. - Preserve valuable state. Never target user documents, credentials, SSH material, active databases, application configuration, or running-service state merely to increase the reported savings. Read
references/safety_rules.mdbefore any file deletion. - Execution follows the user's authorization. If the user asks only for analysis or wants to run commands personally, hand off the commands. If the user asks the agent to fix the machine and explicitly confirms the scoped plan, execute the exact approved commands and verify them. Unattended recurring deletion logic needs separate approval before it is written or enabled.
- Fail fast. An unexpected non-zero command, a mismatched postcondition, an unexpected target, or a changed dependency stops the cleanup. Interpret documented probe statuses such as
lsofexit 1 with empty output before deciding they are failures. Report the partial state; do not improvise a fallback. - Before promising physical release from any deletion, name the mechanism — and get it from the creating command, not from a guess. A
dfgap between a nominaldutotal and actual reclaim means one candidate mechanism is at work, and the strongest evidence is the verbatim command that created the folder, because the copy verb alone decides the space semantics. Find it in session history before theorizing; a folder-name or size-based inference is not a mechanism. Only if no command can be found does the gap stayunknown— do not substitute the most plausible-sounding mechanism for one you can demonstrate.
The mechanisms, distinguished by what du reports and what deletion releases (all four measured on 2026-09-19, 1 GiB source, drift-controlled):
| Created by | du nominal | Deleting the copy releases | Fingerprint |
|---|---|---|---|
cp (bare) / cp -a | full, counted per path | full | independent inodes, independent extents |
| `cp -c` / `cp -cR` (clonefile) | full, counted per path | ≈0 | different inode, `nlink=1`, shared extent |
ln / cp -l (hard link) | counted once — sibling reads 0 | ≈0 | same inode, `nlink=2` |
| local APFS snapshot | full | ≈0 until snapshots are thinned | tmutil listlocalsnapshots / |
Two traps this table exists to kill. The clonefile and hard-link rows are opposite on `du` but identical on deletion — both release ≈0, so "deleting it freed nothing" cannot tell them apart, while du can: a hard-linked sibling counts once (or as 0), a clonefile copy counts full. And calibrating the wrong copy verb proves nothing: a 98 GiB gap was twice attributed to the wrong mechanism because the probe used bare cp when the folder had been built with cp -cR. Before any deletion, run the probe with the same flags as the creating command. Clonefile is worth flagging as the common case — macOS cp defaults to it for -c, and directories copied for a delivery/kit routinely carry it.
Phase contract
Use this state machine for every cleanup:
- Observe — read-only. Capture identity, disk baseline, the suspected subsystem's status and configuration, physical allocation, and critical-service health.
1b. Authorize stateful inspection when unavoidable. If deeper evidence requires creating a temporary container, pulling an image, mounting a volume, or writing a snapshot, first finish the metadata-only observation, list the exact inspection commands and their side effects, and obtain separate approval. Inspection approval is not cleanup approval.
- Plan — no mutation. Pass the Phase 2 entry gate first (four steps: target confirmation, classification table, gate rules, checker — see below), then explain findings, commands, impact, recovery, expected release, and success criteria. Stop at the confirmation gate.
More from daymade
Use this skill in a project
Open any RiverX project, search the Skills panel for daymade/claude-code-skills/macos-cleaner, and install it in one click.
