{"success":true,"name":"clean-builds-here","description":"Use or restore this Mac’s Clean builds here Finder action.","category":"brimind","path":"brimind/clean-builds-here/SKILL.md","file":"SKILL.md","content":"---\nname: clean-builds-here\ndescription: Use or restore this Mac’s Clean builds here Finder action.\nversion: 0.1.0\nplatforms: [macos]\nmetadata:\n  hermes:\n    tags: [finder, automator, build-cleanup]\n---\n\n# Clean builds here\n\nUse this when the user asks how to free build space with `cleanbuilds` or to troubleshoot the existing Finder action. Restoring or verifying the action is not permission to run it or delete anything.\n\n## Use\n\n- Right-click the folder icon or name itself, not empty space in the column. A menu starting with **New Folder** and showing **View** is Finder’s background menu, so this folder-input workflow won’t appear. To clean the current folder, right-click its name in the column to the left (or go up one level and right-click it there).\n- In Finder, right-click a specific project or parent folder and look under **Quick Actions** or **Services** for **Clean builds here**. The workflow passes the selected folder paths as arguments and opens a checklist for each folder.\n- For interactive terminal use, call `\"$HOME/.local/bin/cleanbuilds\" \"/absolute/path/to/folder\"`. Use `--next-only` or `--modules-only` to narrow the search, or `--tui` for an interactive terminal checklist.\n- The tool finds `.next` and `node_modules`; unlocked entries are checked by default. Review and uncheck anything to keep before confirming **Delete checked**. Detected active projects are locked. The tool refuses to scan `/` or the entire home directory. Do not use `--yes` for inspection or verification: it bypasses the checklist and deletes unlocked entries.\n\n## Restore or verify without running cleanup\n\n1. Check `~/Library/Services/Clean builds here.workflow/Contents/Info.plist` and `document.wflow` with `plutil -lint`, and inspect them with `plutil -p`. Expect `runWorkflowAsService`, `com.apple.finder`, and `public.folder`; the shell action calls `\"$HOME/.local/bin/cleanbuilds\"` with each folder path. Check `test -x \"$HOME/.local/bin/cleanbuilds\"` and `readlink` without executing it. The current link targets `~/Documents/Unitary tools/cleanbuilds/cleanbuilds.py`.\n2. If the installed workflow is intact, refresh registration with `/System/Library/CoreServices/pbs -update`, then inspect `/System/Library/CoreServices/pbs -dump` for this exact workflow and its Finder/folder restrictions. Do not flush all services or reinstall the launcher just to refresh registration.\n3. If the menu is missing, check the exact action's toggle in **System Settings → General → Login Items & Extensions → Finder** (or Finder’s Quick Actions → Customize when available) and check **Keyboard → Keyboard Shortcuts → Services**. To enable the named Services item without rewriting preferences, use the AppKit `NSSetShowsServicesMenuItem(\"Clean builds here\", true)` API and check its return code; `NSShowsServicesMenuItem` is only corroboration, not proof of registration or Finder visibility.\n4. Right-click a real folder and inspect **Quick Actions** and **Services** without selecting the action. Report whether the live item was visible; if UI access is unavailable, report only registration evidence. Never invoke the workflow or launcher to test registration.\n\nSource and installer: `~/Documents/Unitary tools/cleanbuilds/`. Inspect `README.md` and `install.sh` before reinstalling; the installer replaces the workflow and can adjust shell startup files, so prefer the targeted restore above for intact installations.\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}