Skip to content
Development
Skill

/mole-mac-cleanup

Safely operate the installed Mole CLI (`mo`) on macOS using machine-readable status, analysis, history, and dry-run surfaces. Use when Claude Code is asked to inspect Mac disk, CPU, memory, or network usage; find large files; preview or perform cleanup; remove apps, installers,

From plugin
all-my-ai-needs
1223 skills9 MCP
Install
$ npx -y skills add codingSamss/all-my-ai-needs --skill mole-mac-cleanup --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/mole-mac-cleanup

Context preview

The summary Claude sees to decide when to auto-load this skill.

Safely operate the installed Mole CLI (`mo`) on macOS using machine-readable status, analysis, history, and dry-run surfaces. Use when Claude Code is asked to inspect Mac disk, CPU, memory, or network usage; find large files; preview or perform cleanup; remove apps, installers,

SKILL.md

mole-mac-cleanup.SKILL.md
name: mole-mac-cleanup
description: Safely operate the installed Mole CLI (`mo`) on macOS using machine-readable status, analysis, history, and dry-run surfaces. Use when Claude Code is asked to inspect Mac disk, CPU, memory, or network usage; find large files; preview or perform cleanup; remove apps, installers, or project artifacts; diagnose Mole results; or check and upgrade Mole.

Mole Mac Cleanup

Use the official Mole agent skill at `tw93/Mole/.claude/skills/mole/SKILL.md` as the command-semantics baseline. The repo-only `runtime.yaml` pins the audited upstream version. For version-sensitive behavior, confirm the installed version and read `mo <command> --help`; trust the actual dry-run over stale assumptions.

Safety Contract

1. Always preview before deletion. Run the matching `--dry-run`, inspect its candidates, summarize the impact, and obtain explicit user confirmation in the current turn before running the destructive command. 2. Treat `clean`, `uninstall`, `purge`, `installer`, and `optimize` as destructive. Treat `update`, `remove`, and whitelist changes as state-changing and require an explicit request. 3. Never parse or act from a TUI frame. Use JSON surfaces where available. If a selector opens, do not infer a selection or press bulk-select keys on the user's behalf. 4. Never invent flags. Run `mo <command> --help` when the documented surface is insufficient. 5. Preserve Mole's safety layer. Use `mo clean --whitelist` for protected paths; never replace Mole with raw `rm`, hand-written recursive deletion, or broad globs. 6. Do not request `sudo`, close applications, remove login items or dotfiles, prune Docker/OrbStack, or delete virtualenvs and project artifacts unless the user separately confirms that exact scope. 7. Bound long scans and watches. Send progress updates, stop low-value scans that remain silent, and never leave `mo status --watch` running in the background.

Establish the Runtime

Confirm the binary, version, and real package manager:

command -v mo
mo --version
brew list --versions mole
brew info mole --json=v2

Do not trust the `Install:` line from `mo --version` alone; a Homebrew-managed build can report `Manual`. If `brew list --versions mole` succeeds, manage it with Homebrew.

Choose the Surface

| User intent | Agent-facing command | |---|---| | Explain disk usage | `mo analyze --json` or `mo analyze --json <path>` | | Preview safe cleanup | `mo clean --dry-run` | | List installed apps with exact uninstall names | `mo uninstall --list` | | Remove one app completely | `mo uninstall --list` to read the exact name, then `mo uninstall --dry-run <app>` | | Preview bounded maintenance | `mo optimize --dry-run` | | Preview old project artifacts | `mo purge --dry-run` | | Preview downloaded installers | `mo installer --dry-run` | | Audit prior cleanup | `mo history --json --limit 20` | | Capture one health snapshot | `mo status --json` | | Capture a short time series | `mo status --watch --interval 1s` |

Interactive `analyze`, terminal-attached `status`, app selectors, and installer selectors are human surfaces. Prefer the commands above. If a dry-run still opens a selector, stop after reporting the visible candidates and ask the user to make the selection.

Machine-Readable Evidence

Disk analysis

`mo analyze --json` returns one JSON object containing `path`, `overview`, and `entries[]`. Each entry includes `name`, `path`, `size`, `is_dir`, and `insight`; sizes are bytes. Scope expensive scans when possible, for example:

mo analyze --json "$HOME/Library"

Cleanup candidates

`mo clean --dry-run` prints a summary and writes the candidate paths to:

~/.config/mole/clean-list.txt

Read that file to review the paths this dry-run found. It is a preview snapshot, not an executable deletion plan: a later `mo clean` rescans and revalidates current candidates, so the two target sets can differ. Never promise the user that the real run will remove exactly this list. `purge --dry-run` and `installer --dry-run` report their candidates in the terminal and do not write this list.

Cleanup history

`mo history --json --limit N` returns session summaries and the operation/deletion log paths. Use `actions.removed`, `trashed`, `skipped`, and `failed` to verify the outcome. When `failed` is nonzero, inspect only the matching session in the operations log and classify permission-protected or running-app paths separately from real cleanup failures.

Installed apps

`mo uninstall --list` prints the app inventory as a JSON array when stdout is not a TTY. Each entry has `name`, `bundle_id`, `source`, `uninstall_name`, `path`, and `size`. Read `uninstall_name` for the exact argument `mo uninstall` accepts, so the app selector TUI never has to be opened.

mo uninstall --list

System status

Use `mo status --json` for a single CPU, memory, disk, and network snapshot. `mo status --watch --interval 1s` emits NDJSON; collect only the number of samples needed, then terminate it.

Command Notes

  • `mo clean` permanently removes caches and also sweeps evidence-backed leftovers from already-uninstalled apps. It does not uninstall an installed app.
  • `mo uninstall` moves the app and matched leftovers to Trash by default, so they remain recoverable until Trash is emptied.
  • `mo clean --external <path>` cleans macOS metadata from an external volume; resolve and show the exact mounted path before asking for confirmation.
  • In current upstream Mole, `mo purge` targets both local build output (`target/`, `build/`, `dist/`, `.next/`) and dependency directories that require a network to restore (`node_modules/`, `Pods/`, `venv/`, `vendor/`). A purge is therefore not always recoverable offline: classify the dry-run candidates by recovery type and show that distinction before requesting confirmation. Add `--include-empty` to surface zero-size candidates. A non-interactive real run requires an explicit `--
Read more
Ships withall-my-ai-needs

跨 Claude Code 与 Codex 两套 agent 的 skill 能力真源与同步规则。写入由 agent 执行,人只审校与决策。 把 Claude Code 与 Codex 的可复用能力收敛到一个仓库,按 platform-first 维护:每个平台独立持有自己的 skills/ 与运行约定,同名 skill 允许在两端并存,不强行抽象去重。 仓库要解决的是多端 AI 配置的漂移——GitHub 仓库、本地工作区、本地 CLI

Get the whole plugin

Other skills on all-my-ai-needs.

aihot
Skill

aihot

查询 AIHOT 的中文 AI 资讯、精选、当前热点和日报。用户询问今天或最近的 AI 新闻、AI 圈动态、大模型或产品发布、OpenAI/Anthropic/Google 最新消息、AI 论文、AI 日报、AIHOT 精选、当前最热事件,或需要同步当前全部精选时使用。必须通过 aihot.news 的匿名只读…

apifox-cli
Skill

apifox-cli

通过 Apifox CLI 管理 Apifox 项目资源。触发场景:运行接口自动化测试/测试套件,查询/创建/更新/删除接口、环境、Schema、Mock、分支等项目资源,导入导出 API 文档,查看测试报告,管理 Runner、定时任务、通知等 CI/CD 配置。CLI 输出为结构化 JSON,常含…