İçeriğe geç
Kurulum

mac-storage-maintenance

Mac disklerini, medya taşımalarını ve boş alanı yönetir.

HamaratLabsMITv1.0.0

KURULUM

hermes skills install well-known:https://skills.hamaratlabs.com/.well-known/skills/mac-storage-maintenance

Ham dosyaSKILL.md önizlemesi

3 GERÇEK ÖRNEK

Ne istendi, ne çıktı

NE İSTENDİ · 17 KASIM 2026

Diskte ne lazımsa bak, gereksizleri sil; uzun süredir kullanılmayanları harici diske yedekle.

default
NE ÇIKTI

Boş alan 19 GB'tan 58 GB'a çıkarıldı (hedef 60 GB); kullanılmayan yerel modeller, eski worktree'ler ve önbellekler temizlendi, büyük kalemler ölçülerek raporlandı.

NE İSTENDİ · 19 KASIM 2026

Depolamayı analiz et.

depocu
NE ÇIKTI

Çöp boşaltılarak 30 GB açıldı; kullanılan alan 412 GB'tan 382 GB'a indi, boş alan 42 GB.

NE İSTENDİ · 6 KASIM 2026

Acil: disk 460 GB'ın 1,4 GB'ı boş; gereksiz worktree'leri tespit edip kaldır (onaylı).

depocu
NE ÇIKTI

26 worktree kaldırıldı (dallar korundu), boş alan 17 GB'a çıktı; atlanan ya da hata veren olmadı.

KAYNAK VE LİSANS

Tür
HamaratLabs yazdı
Yazan
HamaratLabs
Lisans
MIT
Ham dosya
SKILL.md

DEĞERLENDİRME

  • 2ajan profilinde kullanıldı
  • 272kayıtlı yükleme
  • 3belgelenmiş örnekyalnız metin

Sayılar ajan kayıtlarından gelir. Puanlama henüz yok.

SÜRÜM

Sürüm
v1.0.0
Siteye ilk yayın
1 Aralık 2026
Oluşturma
29 Eylül 2026
Son kullanım
30 Kasım 2026
Paket
10 dosya · SKILL.md 174 satır

YORUMLAR

Yorumlar yakında

Bu skill hakkındaki yorumlar ve puanlar burada görünecek. Bölüm henüz açılmadı.

SKILL.MDÖnizleme174 SATIR

AJAN AÇIKLAMASI Use when managing Mac disks, media moves, or free space.

Mac storage maintenance

When to Use

Use for external disk format/partition decisions, Photos-library relocation, cross-platform storage setup, and bounded Mac free-space reviews. This workflow separates metadata inspection from private-content access and user-operated destructive actions.

Binding disk policy (record the user's own rules here first)

Before any storage work, write down the user's binding rules for each disk and follow them literally. A typical setup that worked:

  • An external archive disk is never deleted from, moved from, overwritten, formatted or repartitioned by an agent, not even when the user says "delete it". The user performs such actions themselves in Finder / Disk Utility.
  • The user repartitions/resizes disks over time, so never quote a cached size: run df -h "<harici-disk>" (and diskutil list external when layout matters) before planning an archive there.
  • Scoped exception: inside one named agent folder on that disk (e.g. <harici-arsiv>/agents/) an agent may read AND write, but still never delete, including a file the agent itself just created for a test. Verify a write by reading the file back and leave it in place. Every other folder on the disk stays fully closed unless the user names a new exception explicitly.
  • If a Photos library lives only on one external volume, treat it as a single-copy asset and do not put competing workloads on that volume without saying so.
  • macOS TCC blocks terminal access to the photo archive. A permission error is not evidence of an empty library.
  • Personal phone/computer backups are entirely closed: no reading, listing, indexing, hashing, scanning or cloud transfer, by any agent or worker.

Standing rules

  • Read df -h / with its header and take the Avail column - never a bare number from memory. Size/Used/Avail sit side by side and a mis-read column turns "13 GB used" into "13 GB free". On APFS the Avail figure is also volatile: purgeable space (local Time Machine snapshots, caches) can make it read under 1 GB during a transient pressure spike and jump back to tens of GB minutes later once macOS reclaims it. Before alarming the user, pausing work, or shrinking a planned store (a Garage/Docker/VM capacity), re-run df -h / once more a minute later and size against that second Avail reading; a sub-GB figure that recovers on its own is not a crisis, and a false alarm costs more credibility than a one-minute wait. For Used/Capacity, read df -h /System/Volumes/Data instead: / is the sealed system snapshot, so its Used shows only ~13 GB while the data volume is 99% full, and quoting it understates the problem.

  • When the purpose of a folder, worktree or file is unknown, find it out yourself before asking. Read-only evidence answers it: git log/git reflog -8, ahead/behind against origin, dirty count, creation and modification dates (stat -f '%SB %Sm'), open handles, and a grep for the path in cron outputs, LaunchAgents and scripts. Bring the user a finding plus a recommendation. Asking the user "what is X for?" is a question they cannot answer, and they treat it as the agent not doing its job. When the open question is "is this project finished / is this AVD still needed", ask the owning agent directly (owner map and query format in references/bloat-flows.md) in the same turn instead of putting it to the user; he expects the agent-to-agent round-trip done before he is asked. Only the final keep-or-remove approval goes back to the user.

  • Test it yourself before handing the user a check. With terminal, the agent browser and computer_use available, never answer a "is X working / is the address right" question with "refresh and tell me" or "open the console and send a screenshot": load the page or run the probe, report what it returned, and give the user only the step no tool can do (a login, a physical click). Pushing verification back to him reads as evasion.

  • Give concise Turkish instructions grounded in live disk metadata. Explain the actual tradeoff before recommending a format; do not reverse advice merely because the user asks about another supported choice. Change a recommendation only with a stated new requirement or verified fact.

  • Keep personal phone/computer backups out of every scan, listing, index, hash operation, cloud transfer and worker scope. Permission for one media migration is not permission to inspect unrelated backups. Say which locations were excluded; do not imply that additional backups were discovered merely because they were excluded by policy.

  • Distinguish ordinary image/video files from a managed Photos library before changing storage layout. ExFAT file storage and a working .photoslibrary have different requirements.

  • Read the current disk plan and destructive-operation policy. Where it assigns erasing/partitioning to the user, guide Disk Utility rather than bypassing that boundary through shell commands or desktop automation. Surface conflicts with a newer request explicitly.

  • Never treat a copy as space reclaimed or a single remaining copy as a backup. Separate copy completion, application validation, independent backup, and separately authorized source deletion.

  • A blanket user prohibition on a device ("never delete anything on this disk") outranks later instructions to delete there, including the user's own. Persist it in the binding policy note and memory, then keep guiding the user to perform such removals themselves.

  • The destructive-operation ban (delete/move/overwrite/format/repartition) applies to operations performed ON this disk's existing content - it does not forbid writing brand-new files into a new, clearly separate, agent-created folder there, and it does not forbid deleting the LOCAL (Mac-side) copy of a file after it has been copied across (that deletion happens on a different disk, outside this rule's scope). Before using the disk as a destination for any new, unrelated workload (e.g. an archive folder for a different project), confirm this reading explicitly with the user rather than assuming either extreme - that the whole disk is untouchable for new writes, or that any write there is automatically fine because it isn't literally a delete/move/overwrite. Flag the shared-space risk plainly when the disk also holds a single-copy asset (like the Photos library): a new, growing, unrelated archive competes for the same free-space margin that asset depends on.

  • When the user has no second copy available and defers the fix, record the single-copy exposure as a standing risk item with the verified size/paths and the deferral decision. Do not repeat the pitch afterwards.

  • Recognize when a reversal is unjustified: if the user objects that a recommendation flip-flopped, compare the options on their real properties and state which requirement, if any, actually forces a choice, rather than defending the reversal.

  • When setting up a new project's Python/Node environment on this machine, never pin its package-manager or model-download cache to a project-local directory (e.g. a project-local .uv-cache/, cache/hf/, or an HF_HOME/UV_CACHE_DIR override pointing inside the project folder). Let uv, pip and huggingface_hub use their own shared global defaults (~/.cache/uv, ~/.cache/huggingface) so an identical package or model downloaded by one project is reused, not re-fetched and duplicated on disk, by the next. A project-local override is the actual root cause when two unrelated project folders each carry a multi-GB copy of the same dependency or model.

  • The 'share it so it is not re-downloaded' rule applies ONLY to generic technical substrate that carries zero creative/design direction (npm/pip/uv package caches, model-weight downloads of a stock model). It does NOT apply to anything that carries project identity even if reused across several projects - e.g. a set of cloned/designed character voices, a style reference library, or branded assets. Those stay in their own clearly-named folder (not dumped into the shared technical-cache folder) so that reusing them across projects is a deliberate reference, not an accidental homogenization of each project's distinct creative direction. When organizing a multi-project tree, keep two different kinds of 'shared' folder distinct: a technical-cache folder (pure infrastructure) and a named identity/asset folder (reusable creative material) - do not collapse them into one.

Renaming a folder/path that multiple independent consumers hardcode

When a media folder (or any shared path) is read by more than one already-deployed consumer - a shipped mobile app binary doing exact string matching on a folder name, a Python backend module's default-path constant, absolute paths embedded inside data/manifest files - a rename is not safe just because you created a backward-compat symlink at the old name. Each consumer can still be pointed at the OLD name in its own source of truth (the installed APK was built before the rename and checks the literal old string; a script's DEFAULT_..._ROOT constant still says the old name) and will silently show "empty"/"not found" instead of erroring loudly. Before calling a shared-path rename done: grep every consumer's source for the old literal name, update each one's default/constant to the new name, keep the symlink only as a legacy compatibility aliases (not as the fix itself), and actually exercise the read path the real consumer uses (e.g. import the Python module and list the resolved root's contents) rather than just checking the filesystem listing (search_files/directory listing). If a consumer is an already-installed binary on a user's device, the rename cannot be verified complete until that binary is updated/reinstalled - say so explicitly rather than declaring the rename finished.

When the shared folder has an append-only JSON manifest with its own naming/schema validator (e.g. a gallery_manifest.py-style add_entry), expect the validator to re-check EVERY existing entry on each write, not just the new one - a single legacy entry that predates a naming-convention change (e.g. an old canonical-slug mapping) blocks ALL future additions with a confusing error that looks like it's about the new entry. Fix the legacy entries' fields (and, if local files exist, rename those files to match) before retrying the add, rather than bypassing the validator by hand-editing the JSON.

iCloud-synced Desktop and Documents

When Desktop & Documents Folders sync is on, the user's whole working tree (vault, repositories, assets) lives inside an iCloud file provider, and a stalled provider presents as a very specific signature: os.stat and directory mode checks return instantly while open() + read() on any file under the tree blocks indefinitely, and brctl status never returns. Diagnose with a short alarm-guarded read of two known files plus one file outside the tree (for example under ~/.hermes) to prove the stall is scoped to the synced tree, not the machine. Writing a new file there can still succeed while reads hang, so a successful write proves nothing about readability. Absence of the dataless flag and optimize-storage = 0 do not rule out a provider stall.

A SECOND, distinct stall signature has the same root cause (the synced tree's provider) but a different trigger and a different symptom: deleting a large volume of files under the synced tree in one pass (dozens of GB - e.g. clearing many build-output directories or a package-manager cache at once) can itself trigger a provider re-evaluation that denies new access for minutes afterward. Unlike the hang-on-read signature above, this one answers immediately with an explicit Operation not permitted on ls/cd/git (reading .git/config fails the same way) rather than blocking - first on brand-new shell processes (shell-init: error retrieving current directory), and if it persists, on git itself. The decisive diagnostic is that processes and file handles opened BEFORE the deletion keep working normally (a background build or agent job already running under the tree continues and its output keeps growing) while anything NEW trying to open a path under the tree is refused - this proves it is a provider-level access stall, not data loss or disk damage, and rules out treating it as a code/build regression. Do not keep blind-retrying every few seconds; wait in longer intervals (30-90 s) and in the meantime verify already-running work is still alive (ps aux, check a log file's line count is still increasing) as the non-destructive way to confirm nothing is actually broken. To localize scope, ls/cat a sibling TCC-protected folder (~/Documents, ~/Downloads): if they read fine while only the recently-modified tree (e.g. ~/Desktop) is refused, that confirms the stall is scoped to that specific subtree's provider state, not a whole-account iCloud outage or a revoked TCC grant for the folder class in general - it does NOT by itself prove iCloud is uninvolved, since this stall type is commonly scoped to just the modified subtree. No in-session command fixes this, and that includes killall fileproviderd and launchctl kickstart .../com.apple.bird: both restart cleanly (new PID, state = running) but the stall persists, because the problem is provider-side re-evaluation state, not a dead process - do not spend turns cycling through individual daemon restarts hoping one works. It resolves on its own after some minutes, or faster if the user restarts Finder (killall Finder or Option-right-click the Dock icon → Relaunch) or, failing that, reboots; say so plainly rather than attempting other workarounds, since the real fix lives outside the agent's reach (GUI-level Finder/iCloud, not the shell). Never suggest an unattended reboot without naming the FileVault/remote-access lockout risk and getting explicit confirmation - a headless Mac can come up stuck at a pre-boot password screen with no remote path back in.

Never start a migration, copy or cleanup while reads are stalled: a copy made then yields empty or truncated files, and nothing can be checksum-verified. Fix or wait out the stall, prove the tree reads normally, and only then proceed.

A bulk deletion under the synced tree (the trigger for the second stall signature above) can ALSO break something unrelated in the same terminal session: if any earlier command in that persistent session had cd'd into a path that the deletion removed (e.g. a worktree's app/build subdirectory visited mid-sweep), the session's own shell process is left holding a cwd that no longer resolves. This produces the identical-looking shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted banner on every subsequent command regardless of target path, and it can make unrelated tools crash outright (e.g. a CLI's own bootstrap calling os.getcwd() and raising PermissionError before even reaching its first line of real work) - this looks exactly like the provider stall but is a DIFFERENT, session-local, and trivially fixable layer. Test it first, before cycling through daemon restarts: run a bare cd ~ (or any other guaranteed-valid absolute path) as its own command in that same session. If the generic shell-init/chdir banner disappears and previously-crashing tools now run clean, that layer is fixed - but separately re-check whether the specific subtree (e.g. ls ~/Desktop) is ALSO readable again, since the deeper provider-level stall can still be in effect underneath and needs the separate wait-or-Finder-restart remedy above.

Apple's documented behavior when Desktop & Documents Folders is turned off is that the files REMAIN in iCloud Drive and macOS creates new EMPTY Desktop and Documents folders locally; the user must drag the content back (optionally via the iCloud Drive (Archive) folder). So every agent path pointing into Desktop breaks at that moment. Treat moving the working tree out of Desktop as the safer alternative to disabling sync, in this order: prove the tree reads, take an independent off-machine backup, copy to the new ASCII-named parent, verify file counts and checksums, remove the old copy only after verification, then update path references. Count the real references first - a grep for the old absolute prefix across the agent home's live config, skills and scripts routinely finds hundreds - and quote that number instead of calling the move a drag-and-drop. Prefer an ASCII target directory name, since Turkish-character paths trigger shell quoting friction and confusable-character security prompts.

TCC Full Disk Access denial on Desktop/protected folders (not iCloud)

A THIRD signature produces the same plain Operation not permitted on ls/cd as the iCloud stalls above but has a different, non-transient root cause: a TCC (Full Disk Access / Files-and-Folders) denial for the specific binary doing the access. Distinguish it fast: stat/ls -la on the target folder shows normal Unix perms (drwx------, owned by the user) - ruling out a filesystem-permission problem - and log show --predicate 'eventMessage contains "<FolderName>" and eventMessage contains "deny"' --last 5m (keep the window small; broad/24h predicates can hang) shows a line like Sandbox: <proc> deny(1) file-read-data ~/Desktop. That kernel sandbox-violation log naming the exact process is the signature of a TCC denial, never of an iCloud provider stall, and it does not self-resolve by waiting or restarting Finder.

ajan's managed Python (~/.hermes/tools/python-<ver>+.../bin/python3.14) is ad-hoc signed with no Team ID and is never registered with Launch Services, so when an in-place toolchain update silently replaces that binary at the same path, any previously-granted Full Disk Access can be invalidated by the hash change even though the path didn't move - and tccutil reset <service> <bundle-id> fails outright with "No such bundle identifier" because the binary isn't a registered app, so that command cannot be used to force a fresh prompt either. When a Desktop/Documents access that used to work suddenly denies, check the toolchain directory's mtime (ls -la ~/.hermes/tools/) against when access broke before chasing any other cause. The only real fix is the user manually adding the current literal binary path via System Settings → Privacy & Security → Full Disk Access → "+" (removing any stale prior entry for the old binary first); this needs a physical click plus Touch ID/admin password, so it cannot be done headlessly or while the user is remote with no screen-sharing session open - say that plainly instead of iterating workarounds.

TCC grants are per-binary and are NOT inherited down a process chain by code identity: an ancestor process (e.g. osascript) already holding Full Disk Access does not extend it to a distinct child binary it launches (e.g. a Python daemon it starts). Confirm which process is actually doing the file access (ps -p <pid> -o ppid,comm walked up, codesign -dv <binary> for its Identifier/Team ID) before concluding a permission is "already granted" - checking only an ancestor's status is not sufficient.

Do not try an Automation/AppleScript workaround (osascript -e 'tell application "Finder" to ...') as a backdoor around a missing Full Disk Access grant when no one is physically at the machine: it needs its own separate TCC "Automation" permission, and with nobody present to click the resulting system prompt the osascript process hangs indefinitely instead of failing fast. If tried, kill it (pkill -f 'osascript.*Finder') rather than waiting it out, and don't repeat the same class of headless-GUI-permission attempt - report the dead end rather than presenting an untested workaround as a fix.

Spotlight indexing and OS-version questions

  • Turning Spotlight off is the user's command, internal disk only. It needs sudo, so give the exact line instead of running it: sudo mdutil -i off / && sudo mdutil -i off /System/Volumes/Data && mdutil -s /System/Volumes/Data (expect "Indexing disabled."); re-enable with -i on. Never use mdutil -a or -E: -a also writes index state onto mounted external volumes (the no-touch harici partitions) and -E erases the index. Check state read-only with mdutil -s <vol>. State the trade-off (Cmd+Space file search, Finder and Mail search degrade) and offer the softer alternative of adding build/media folders to System Settings → Spotlight → Search Privacy.
  • "Can we downgrade macOS?" Answer: only by erasing the internal disk - restore a Time Machine backup taken on the older version, or erase + install from a USB installer of that version (DFU/IPSW only while Apple still signs it); Recovery's "Reinstall macOS" installs the current version. List what this machine would have to rebuild (ajan + profiles, Homebrew, local databases/keys, agent browser logins, SDKs, unpushed branches) and do not inspect the user's backups to check them. Before recommending it, test the premise: compare load/swap evidence and the OS install date with when the problem started - slowness from agent workload is not fixed by a downgrade.

Procedure

1. Identify without inspecting contents

Run diskutil list external physical, then diskutil info -plist /dev/<fresh-identifier> on the selected device/volume. Check model, capacity, external status, whole disk versus partition, partition scheme, filesystem, mount point and volume UUID. Do not inspect files to establish device identity.

After each user erase/partition action, rediscover identifiers: APFS containers and volumes can change numbers. Use diskutil apfs list <new-container> instead of enumerating unrelated internal containers. A label alone is not identity, and GUID cannot be inferred from an ExFAT label.

2. Resolve purpose and choose a stable recommendation
  • Ordinary Mac/Windows files: ExFAT, generally on a GUID partition map for modern systems.
  • A working Apple Photos library: APFS or Mac OS Extended (Journaled), both supported by Apple. Windows reads neither natively. APFS is optimized for SSDs but also supports external HDDs; do not infer HFS+ superiority or a speed guarantee from the word HDD alone.
  • For a current Mac with no legacy compatibility requirement, APFS is a reasonable default; HFS+ Journaled remains a valid alternative. Do not ask the user to reformat a valid supported choice merely to match your preference.
  • Mixed use on one physical disk: a Mac-formatted partition for Photos plus ExFAT for shared files. Explain that two partitions do not provide physical isolation or independent backup.
  • Choose capacity with room for library growth. With iCloud Optimize Mac Storage, the local package size need not equal the size of all originals.

Use the current Apple documentation linked in references/photos-library.md for compatibility claims, not memory of a menu label. Avoid implying APFS snapshots automatically create backups.

3. Guide and verify layout

Confirm the user's old-data backup and whether new files were added since the last erase. Do not keep asking after the user has answered unless the target or scope changes.

Explain why an empty filesystem is not unpartitioned space. macOS Disk Utility cannot shrink an existing ExFAT filesystem in place; see references/partition-layout.md for the user-operated mixed-format procedure. Distinguish Add Partition from Add Volume and check the full target window before Apply, not only a cropped format menu.

Verify the resulting partition map, each filesystem and capacity using freshly discovered disk identifiers. Report only these verified facts; formatting success is not cross-platform read/write or Photos migration validation.

4. Copy and activate the library

Follow references/photos-library.md. Keep source deletion separate. For private photos, have the user validate albums and representative media; do not turn functional checking into agent access to private content. A copy progress screenshot proves only progress, not completion, integrity or downloaded iCloud originals.

5. Release the disk without adding risk

Follow the ejection checks in references/photos-library.md: first release the agent's own working directory, then distinguish open handles from evidence of writes. Keep permission errors visible and never infer an empty library or Trash from an unsuccessful inspection.

6. Review space without indiscriminate scans

Follow references/space-review.md. Show recoverable candidates with measured size, category, risk and proposed action.

Fast path for a Desktop/project-tree review (whole thing fits in ~5 tool calls; do not spend calls on one-off ls):

  1. df -h /System/Volumes/Data + ls -la ~/Desktop in one call. Top-level folders named after a person (e.g. <Ad>, <Ad Soyad>) or generic personal-sounding (Veri) are NOT descended into; list them as excluded and ask the user, because they may hold personal backups/health data that are closed even to size scans.
  2. python3 scripts/tree_sizes.py <roots...>: per-child GB with <ozel-klasor> folders pruned before descent (macOS has no timeout binary; give the terminal call a long timeout instead).
  3. python3 scripts/regenerable_dirs.py <roots...>: every build/cache/out/.toolchain/.venv/node_modules dir ≥100 MB, sorted.
  4. bash scripts/worktree_status.sh <repo>...: per worktree branch, merged-into-main yes/no, dirty count, size. For live use, ps aux | grep on the command line misses servers started with a relative command (npm exec next start): run lsof +D <repo>/.worktrees and resolve each non-shell PID with lsof -a -p <pid> -d cwd -Fn plus ps -p <pid> -o lstart=,command=; a worktree that is the cwd of a dev server or a cloudflared tunnel is untouchable even if merged.
    • Read the dirty count, do not trust it: agent dispatches leave untracked build/start logs (docs/.build-*.log, docs/.*-start*.log), so a merged worktree with dirty=1-5 is usually log-only. git -C <wt> status --porcelain per merged worktree separates log-only ones (logs go to Trash, then git worktree remove) from ones holding an untracked AGENTS.md or doc folder (owner reviews first).
    • git worktree list can be longer than 10 lines; do not head it when deciding whether a folder under .worktrees/ is registered.
    • The M (main) line's size includes the nested .worktrees/ tree, so never add it to the per-worktree sizes; main's own share is the main figure minus the worktree sum.
  5. Write the dated section into the report file right after step 4, BEFORE any drill-down or outside-Desktop scan. The tool-call budget is small (about 10 calls) and runs out mid-drill-down, leaving the scan only in chat. Fill it in incrementally afterwards. Keep max 5 sections.
    • Outside-Desktop sizes in one call: loop du -skx over ~/.[!.]*, ~/Downloads, ~/Movies, ~/Library/Developer, ~/Library/Caches, ~/Library/Application Support (skip *Trash*, MobileSync, Mobile Documents, symlinks), sort, top 20; then one call for the top children of ~/.hermes, ~/.cache and the biggest Desktop tree. Urgent path (Avail under 10 GB, or Used jumped since the last report section): find WHAT grew before any broad scan. Run date first (the context date can lag days behind the real one, which breaks -newermt windows and dated report headers), then one find <Desktop/.hermes/.cache/.gradle/.android/Library roots> -xdev \( <closed paths> -o -path '*/CoreDevice/DeviceFS' \) -prune -o -type f -size +100M -newermt '<last report time>' -print0 | xargs -0 stat -f '%z %Sm %N' sorted by size, plus du -skx (sizes only, never contents) of the agent scratch/workspace folders you are allowed to manage and ~/Library/Caches/*. Classify each hit with references/bloat-flows.md, then show the user the numbered list with sizes, trash ownerless regenerable caches only after the user's explicit OK for that list (and after pgrep/lsof show no user), and send everything owned (worktrees, agent workspaces) to owners in parallel. Report Avail/Used before, after owners, and the pending Trash GB.

Then compare the Desktop total with the Data volume Used: when Desktop is a fraction of it, say so and offer a scan of ~/Library/Developer, ~/.gradle, ~/.android/avd, ~/.cache, Downloads rather than implying the Desktop scan covered the disk.

When the user asks for a "kalıcı düzen" (lasting order) answer with root-cause rules, not just a one-time sweep: Desktop root holds only folders (loose files go to an inbox folder, screenshot location redirected), merged worktrees removed the same day, shared GOCACHE/HF cache instead of per-worktree copies, video out/ frames kept through revisions and cleared only when the user declares the project "hazır" (output//teslim//scripts stay), plus an optional weekly report-only cron. Flow-by-flow discussion format, example standing rules and the outside-Desktop scan allowlist are in references/bloat-flows.md. Deletions follow the approval model in step 7.0 (the user sees every deletion list and approves it explicitly). Do not silently migrate active code workspaces or toolchains to a removable disk. End with what was inspected, what was excluded, and whether anything was actually changed.

6b. Prepare a folder move (report before any mv)
  • Grep the old absolute prefix with rg -n -F (put long searches in a reviewable script file), excluding closed areas before descent, then split hits into live (scripts, code, skills, SOUL, config, cron jobs, root map, live OBS notes) and history (backups, .curator_backups, cron/output, dated reports). Quote both counts; only live hits get an action.
  • Also find what a text grep misses: find <src> -name pyvenv.cfg (venv console scripts and editable-install .pth/direct_url.json hardcode the old path and break on move; bin/python itself still runs) and absolute symlinks (find -type l, readlink). Recommend recreate-by-owner or a temporary compat symlink.
  • Check the referenced targets still exist: many skill/tool paths already point at archived folders, so they are pre-existing breakage, not move fallout.
  • Same APFS volume (stat -f %d) means mv is an instant rename needing no free space; state it so the 10 GB rule is not misapplied.
  • If media is tracked by a registry/manifest tool, update the registry's source paths (and dry-run its relocate command) before moving, and confirm duplicates with md5 against the registry's stored versions and the archive (read-only) before proposing Trash. An archive command that trashes the whole local folder also drops the regenerable dirs it skipped copying; say so in the plan.
6c. Cloud media backup (rclone)
  • Run the backup as a scheduled script with --dry-run, scope and --check modes; deliver failures to the user. Keep an ownership map (longest path prefix wins) so a new folder without a rule lands in an "unknown owner" folder instead of the wrong place.
  • Per-file renamed targets without thousands of copyto calls: build a symlink farm of the target tree under scratch and run one rclone copy -L <farm> <remote> --ignore-existing; rclone check -L --one-way <farm> <remote> then verifies md5. Never rm the farm; scratch is pruned.
  • Throughput is ~2.5 MB/s with many small files: 14 GB took ~70 min. The terminal tool caps foreground waits at ~420 s; run long jobs in background and poll with sleep 380 + rclone size.
  • Keep longer probes in script files under scratch so they can be reviewed and rerun. The workspace run.log can be the session's own output file: log rclone elsewhere (rclone.log).
7. Execute an approved cleanup
  1. Approval model for render/build leftovers and AVDs: the owning agent or person may recommend what goes (owner query recipe in references/bloat-flows.md), but every deletion list is shown to the user once, item by item with sizes, and executed only after the user's explicit approval of that list. Emptying the Trash stays a separate, explicit question. Owner answers say what to keep but rarely measure, so the byte check is yours: run python3 scripts/trash_render_leftovers.py targets.json (dry-run by default; targets [root, rel, full|partial]; full = owner said DELETE, partial = PARTIAL; --keep a.mp4,b.mp4 for revisions the owner flagged), read the kept-video list, show it to the user, then rerun with --apply after approval. It moves a video only when an identical copy (same size AND same SHA256) exists elsewhere in the project, so unique finals in out/ survive automatically. In zsh never echo ===: == is an expansion error that aborts the rest of an ;-chained command, silently skipping later steps.

  2. Scope the approval exactly: a "evet" that answers one question (e.g. "copy the images?") does not approve other pending items in the same message; keep those listed as still waiting.

  3. Live-use check right before acting: lsof +D <path> and pgrep -fl <tool> (for AVDs pgrep -fl 'qemu|emulator'). Your own shell's cwd shows up in lsof +D (bash/lsof/awk PIDs); ignore those, not real users.

  4. When the user wants part of a tool's data kept ("görseller kalsın, gerisini sil"), first separate user-generated output from bundled assets: icons/images under plugin or marketplace dirs (.tmp/plugins, bundled-marketplaces, *.app) are vendor files, not the user's work. Keep the user's output in place and trash the siblings with find <dir> -mindepth 1 -maxdepth 1 ! -name <keep> -print0 | xargs -0 /usr/bin/trash.

  5. To relocate kept content before trashing its original: refuse if the destination already exists, cp -Rp src/. dst/, compare file count AND byte sum (exclude .DS_Store) plus diff -rq, and only then trash the source.

  6. Delete only with macOS's native /usr/bin/trash (never rm -rf). Trashing frees no space: df before/after shows ~0 change until the Trash is emptied. Say so with the expected GB, and treat emptying the Trash as its own irreversible step: the user does it, or it needs a separate explicit OK.

  7. After the user empties the Trash, re-run df -h /System/Volumes/Data and report the before/after Avail difference (expect APFS noise of a few hundred MB).

  8. Append each executed action to the current dated section of the report file under a Yapılanlar subsection (what, size, where kept copies went, verification) RIGHT AFTER that action, not batched at the end: a multi-item cleanup can exhaust the tool budget mid-run and leave completed trashes/moves unrecorded. Update any decision line that changed from "onay bekliyor" to done.

  9. Git worktrees are not trashed: the repo owner removes them with git worktree remove (frees space immediately, irreversible for ignored files) after committing leftovers to the worktree's own branch; the storage agent (<depolama-ajani>) supplies the lsof/df before and after. Multi-agent sequencing and the shared-cache move recipe are in references/bloat-flows.md.

    • When a coordinator agent hands over a batch git worktree remove --force script that first copies untracked files to the archive folder, harden a copy before running it: abort if <harici-disk> is not mounted (otherwise mkdir -p silently creates the path on the internal disk), skip removal when any copy fails (the original lets --force run regardless), list files with git ls-files --others --exclude-standard -z instead of parsing porcelain, and re-check lsof -d cwd plus merge-base --is-ancestor per worktree at run time. Match the cwd path exactly (grep -E "^n$W(/|$)"): a bare ^n$W prefix makes .worktrees/perf look busy because perf2 is in use. Also list each worktree's ignored files minus build/cache dirs (git ls-files --others --ignored --exclude-standard --directory): Owner answers often say "clean" while ignored outputs (generated wavs, store/_ham, QA pngs) exist only there; copy those to the archive too, but never .env* (compare with main's copy instead). Run it via bash file.sh after reviewing it, and only with the user's approval for the removal list.
    • When the user wants owners to delete/merge their own worktrees (not just answer KALDIR/TUT), use the "owners decide and act" dispatch in references/bloat-flows.md (query contents, local merge only, no push). If your agent runtime exports its own home directory variable, unset it for the dispatch so the child uses the target profile (<proje-sahibi-ajan>). Count dispatched items in code before quoting the total.
    • Second wave (unmerged worktrees): ask each project-owner agent (<proje-sahibi-ajan>) in one message, a few in parallel, answer format <path> | REMOVE/KEEP | reason | data to keep. Rerun the remover with the REMOVE list, allowing only unmerged / new commit / differing local config as keep reasons; owners name data to keep that lives in ignored dirs or .log files, so in this mode copy .log too.
    • Treat *.yerel.toml, local.properties, .env* as secret: never copy; cmp -s against main's copy decides whether removal loses anything.
    • huggingface_hub.scan_cache_dir follows symlinks: models already moved to <harici-arsiv>/agents/hf-cache show full GB but du gives 0. Check ls -la ~/.cache/huggingface/hub before "deleting duplicates"; removing the symlink frees nothing and breaks consumers.
    • Puppeteer Chrome versions: lockfiles are not enough; grep -rIl <version> over render scripts finds hardcoded executablePaths (one project's tools pinned an older version than every lockfile said).
  10. Moving a shared cache (HF models, node_modules, toolchains) is safe only after every consumer that hardcodes the old path has been repointed and re-verified by its owner; moving first makes offline-mode consumers fail silently. Leave a symlink to the new location at the old path as a safety net for consumers you could not find.

  11. A general go-ahead ("devam edin", "hepsine evet" to a list that did not name it) never covers emptying the Trash: keep asking it as its own question with the pending GB until answered explicitly.

  12. In a growth scan (find -newermt / os.walk over ~/Library/Developer), exclude ~/Library/Developer/CoreDevice/DeviceFS: it is an FSKit devicefs mount (own device id, mount | grep devicefs) showing a booted simulator's filesystem, so it reports tens of GB of "new" files that take no Data-volume space. Check stat -f %d against ~ before counting any mount-like folder.

  13. Before an archive/scratch run, pgrep -fl 'disk_cleanup|scratch.*apply': another session running a scratch-archiving cleanup writes to the same <harici-arsiv>/<arsiv-klasoru>/<date>/ path, which shows up as many ATLANDI_hedef_var entries whose local copy then vanishes. Count only your own verified moves as gain and name the overlap in the report. Scratch entries holding a live socket (.s.PGSQL.*) fail ditto; leave them.

  14. When the user's approval explicitly includes emptying the Trash, first prove every Trash entry came from this job: ls -A ~/.Trash and match names against the job's trashed items (this job's collisions carry a HH-MM-SS-mmm suffix at the trash time; Finder/other tools use HH.MM.SS). Entries that are not yours: mv -n them out to a workspace holding folder (e.g. workspace/<job>/copte-bulunan-yabanci/) and name them in the reply, instead of blocking the whole emptying on a question. Then osascript -e 'tell application "Finder" to empty trash' in the same command, followed by sleep 20 and df -h /System/Volumes/Data; report the Used drop as the gain, because Avail swings by GBs under swap pressure. Your agent runtime may show its own approval prompt for this command; if that prompt times out, do not retry or rephrase until the user confirms again in chat, then rerun the identical command.

  15. Before trashing a mobile build/, list find build -path '*/outputs/*' \( -name '*.aab' -o -name '*.apk' \) with dates and check recent release: commits: a fresh release AAB/APK may be the pending store upload, and once the Trash is emptied it costs a full rebuild. Propose copying those files out (sha256-verified, gitignored destination) and trashing the rest, and ask whether that version was already uploaded.

VERİMLİLİK VE ARAŞTIRMA

İlişkili skill'ler

chrome-devtools-mcp-cli

browser_exec çalışmadığında izole Chrome'u CLI üzerinden sürer.

HamaratLabs1 ÖRNEK
İSTEK

Bir yarışma sunumu ve demosu için işi uygun ajanlara (Gemini/agy dahil) dağıt.

gemini-gorev

Araştırma veya görsel analiz gerektiğinde işi Gemini'ye görev olarak verir.

HamaratLabs1 ÖRNEK