跳到正文
Skillpedia
部署与云(DevOps)74k · #3094

mole

它能做什么

这个技能在 Mac 或 Windows 电脑上运行 Mole 命令行工具,以读取磁盘占用、预览清理内容并卸载应用。它面向希望安全整理电脑的人。

适用场景

  • ✓有人问电脑上是什么占用了磁盘空间的时候。
  • ✓有人想安全地清理旧文件或缓存的时候。
  • ✓有人想通过命令行卸载应用的时候。

技能链接

https://github.com/tw93/Mole/blob/main/plugins/mole/skills/mole/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/tw93/Mole/blob/main/plugins/mole/skills/mole/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的笔记本快满了。请帮我看看占用空间最多的是什么,以及哪些可以安全清理吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先用只读的 Mole 命令读取机器状态。它会向用户展示将会发生的改动,并且只有在用户看过并批准预览后才删除文件。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Mole

Mole (mo) is a maintenance CLI with two editions that share one command set: Mole CLI (macOS) and Mole CLI (Windows). It deletes real files on the user's own machine. Your job is to read the machine, show the user exactly what would change, and hand them the decision. Done means the user's question is answered from Mole's own output, and nothing was removed that the user had not seen and approved.

1. Identify the edition

Run mo --version. The second line names the system (macOS: … or Windows: …). Then read exactly one reference and use only its commands:

The two editions differ in flags, JSON fields and what goes to the Trash or Recycle Bin, so never carry a command across. If the installed version is older than the one the reference names, or a flag is rejected, run mo <command> --help and trust it over this skill.

If mo is not found, say so and offer the install command from the reference. Install only after the user agrees.

2. Rules

  1. Read before you change. Answer with the read-only commands first: analyze --json, status --json, history --json, uninstall --list, and every --dry-run. They are safe to run without asking.
  2. Preview before every removal. Run the command with --dry-run, read the result, and summarize it for the user: total size, the largest groups, and for each group whether it is gone for good, goes to the Trash or Recycle Bin, or needs a download to rebuild. A preview is a snapshot; the real run rescans, so do not promise an exact number.
  3. Get consent before you type a removing command. Without a terminal, mo clean and mo optimize do not ask for confirmation: they start as soon as they are invoked. The consent therefore has to come first, in this conversation, after the user has seen the preview. "Why is my disk full" is a question, not consent; "go ahead and clean those" after the preview is. Consent covers what the preview showed. If the user wants only part of it, protect the rest first or hand the interactive command to the user.
  4. Some steps belong to the user's terminal. App uninstall, interactive selection lists, whitelist editors, and anything that needs an administrator password or an elevated shell cannot be completed from an agent. Give the user the exact command to run in their own terminal and stop. Never run sudo, ask for a password, or try to elevate.
  5. Use only the surfaces in the reference. Never parse a full-screen TUI frame, never invent a flag such as --yes or --force where the reference does not list it, and never fall back to rm, find -delete or Remove-Item to remove what Mole skipped or protected. A skip is Mole's answer.
  6. Leave Mole itself alone. Do not run mo update, mo remove, a nightly install, or configuration commands unless the user asked for that command.

3. Which command answers which question

The user asks Read first Then
"What is using my disk?" mo analyze --json, then mo analyze --json <path> on the largest entries Map each large entry to the command below that handles it; say plainly when none does (documents, media, VMs)
"Free up space" mo clean --dry-run and its path list After consent, mo clean
"Remove this app" mo uninstall --list Per reference; the final uninstall runs in the user's terminal
"Clean old projects" mo purge --dry-run Per reference
"My computer is slow" mo status --json, plus a short --watch sample if one snapshot is not enough Name the process or resource; offer mo optimize --dry-run only when maintenance fits the finding
"Did Mole delete my file?" mo history --json --limit 200 Match the path and anything under it, then offer to protect it. If the oldest entry returned is newer than the date in question, read the log file named in logs. No match means Mole has no record of it, not that Mole did not touch it
"Keep this folder" The whitelist section of the reference Never a hand-made exclusion

When explaining a disk analysis, map what you found: cache directories (cleanable: true), logs and leftovers of deleted apps go to clean; build output and dependency folders inside projects go to purge; installed apps go to uninstall. Documents, photos, media libraries, virtual mac

常见问题

它会不经询问就删除文件吗?

不会。这个技能说,应先运行预览,任何删除都需要用户批准。

它在 Mac 和 Windows 上都能用吗?

能。这个技能涵盖 macOS 和 Windows,并为每个系统使用对应的命令。

如果没有安装 mo 命令怎么办?

这个技能说,应告知用户并提供安装命令,只有在用户同意后才进行安装。

详情

作者的原始描述

Drive the Mole CLI (`mo`) on macOS or Windows: find what uses disk space, preview and run cleanup, uninstall apps, and read system health and cleanup history. Use before running any `mo` command. Not for editing Mole source code.

repo: tw93/Mole

热度

GitHub 星标
74k
排名
#3094
许可证
GPL-3.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能