Agent skill

Mole Mac Cleanup CLI Safety

by tw93 in tw93/Mole

Teaches an agent to drive the Mole (mo) Mac cleaning CLI safely: preview first, use JSON output, and leave destructive runs to the user.

GPL-3.0Auto-check passedProductivity & Automation

Install Mole Mac Cleanup CLI Safety

skills CLI
$ npx skills add tw93/Mole --skill mole -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tw93/Mole mole --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tw93/Mole.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/mole .claude/skills/mole && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mole
GitHub stars
69k
Token cost
~1.8k tokens
SKILL.md length
1,062 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
GPL-3.0

At a glance

Teaches an agent to drive the Mole (mo) Mac cleaning CLI safely: preview first, use JSON output, and leave destructive runs to the user.

  • Works in 5 steps: Preview before you delete. Always. Every… → The user runs the destructive command,… → Never parse a TUI frame. Interactive mo… → …
  • Finding out what is using disk space on a Mac
  • SKILL.md covers The rules, What answers which question, Machine-readable surfaces and Command notes worth knowing, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mole cleans, uninstalls, analyzes, optimizes and monitors a Mac, so the skill sets strict rules for an agent using it on a live machine. Every destructive command is run with the dry-run flag first and the list is shown to the user. The user runs the real deletion unless they asked for it in the current turn. Full-screen interactive views are never parsed, flags are never invented, and keeping a cache goes through the clean whitelist option rather than raw rm.

A question-to-command table maps requests to commands: disk analysis with mo analyze in JSON mode, freeing space with mo clean, app removal with mo uninstall, slowness with mo optimize, old projects with mo purge, downloaded installers with mo installer, deletion history with mo history, and status snapshots or short time series with mo status. Five machine-readable surfaces are treated as the agent-facing interface. The skill is for using the installed CLI, not for editing or reviewing Mole's source.

When your agent uses it

  • Finding out what is using disk space on a Mac
  • Freeing space or removing an app completely, with a preview before anything is deleted
  • Checking what Mole deleted on an earlier run
  • Collecting CPU, memory, disk and network status as JSON

Example prompts

  • “Why is my disk full? Analyze it with Mole and show me the biggest folders.”
  • “Preview what mo clean would delete and wait for my approval.”
  • “Uninstall Slack completely, but show me the dry run first.”
  • “What did Mole delete the last time I ran it?”

Requirements

  • The Mole CLI (mo) installed on a Mac

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Preview before you delete. Always. Every destructive command takes
  2. The user runs the destructive command, not you, unless they explicitly
  3. Never parse a TUI frame. Interactive mo analyze and terminal-attached
  4. Never invent flags. The command surface is small and listed here; if
  5. Protection is a whitelist, not an argument. If the user wants a cache

What it can do on your machine

Read from SKILL.md and the folder at commit a68741b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mole Mac Cleanup CLI Safety loads about 1.8k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 1,062 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from tw93/Mole at commit a68741b, republished under its GPL-3.0 licence (© tw93). 1,062 words, ~1,776 tokens.

Download SKILL.mdSave it as .claude/skills/mole/SKILL.md (or your agent's skills folder).
name
mole
description
Drive the installed Mole CLI (`mo`) safely, including machine-readable status, analysis, history, and dry-run surfaces. Use before running `mo` on a user's Mac. Not for editing or reviewing Mole source code.

Using Mole from an agent

Mole (mo) cleans, uninstalls, analyzes, optimizes, and monitors a Mac. It is a real deletion tool operating on someone's live machine, so the way an agent uses it differs from the way a human does: never guess, never let a TUI decide, and never let a destructive command run without the user having seen the list.

The rules

  1. Preview before you delete. Always. Every destructive command takes --dry-run. Run it, read the result, show the user what would go, and only then offer the real run. An agent that runs mo clean before mo clean --dry-run has skipped the only step the user can veto.
  2. The user runs the destructive command, not you, unless they explicitly asked you to do it in the current turn. "Clean my Mac" is such an ask; "why is my disk full" is not.
  3. Never parse a TUI frame. Interactive mo analyze and terminal-attached mo status are full-screen Go programs whose output is drawn, not printed. Use mo analyze --json, mo status --json, or mo status --watch instead.
  4. Never invent flags. The command surface is small and listed here; if something is not on this page, run mo <command> --help and read it, do not assume a --yes or --force exists.
  5. Protection is a whitelist, not an argument. If the user wants a cache kept, the answer is mo clean --whitelist, not a hand-rolled find. Never work around Mole's safety layer with raw rm.

What answers which question

The user asksCommand
"What is eating my disk?"mo analyze --json (whole disk) or mo analyze --json <path>
"Free up space"mo clean --dry-run, review, then mo clean
"Remove this app completely"mo uninstall --list to get the name, mo uninstall <app> --dry-run, then mo uninstall <app> (no app argument opens the interactive selector)
"My Mac feels slow" / caches look brokenmo optimize --dry-run then mo optimize
"Clean up my old projects"mo purge --dry-run then mo purge
"Get rid of downloaded installers"mo installer --dry-run then mo installer
"What did Mole delete?"mo history --json --limit 20
One CPU / memory / disk / network snapshotmo status --json
A short time series for diagnosismo status --watch --interval 1s (NDJSON; stop after enough samples)

Machine-readable surfaces

These five surfaces are the agent-facing API. Everything else is for humans.

Disk usage. mo analyze --json prints one JSON object: path, overview, total_size, total_files, large_files[], and entries[] of {name, path, size, is_dir, insight, cleanable, last_access}. size is bytes. insight: true marks an entry Mole considers noteworthy (a large iOS backup, a runaway cache) and is set only in overview mode. Pass a path to scope it: mo analyze --json ~/Library; the flag must come before the path because the Go flag parser stops at the first positional argument.

Cleanup history. mo history --json [--limit N] (N is 1-200) prints logs (paths of the operations and deletions logs), limit, per-run activity in sessions[], and structured deletion audit entries in deletions[]. Use the README history notes for session identity and attribution semantics. This is how you answer "did Mole delete my file" without guessing.

Installed apps. mo uninstall --list piped (stdout not a TTY) prints the app inventory as JSON: name, bundle id, uninstall name, path, size. This is how you find the exact <UNINSTALL NAME> argument without touching the selector TUI.

The dry-run path list. mo clean --dry-run prints a summary to the terminal and writes every candidate path to ~/.config/mole/clean-list.txt. Read that file to review the paths found by that dry-run. 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. This list is clean-only: mo purge --dry-run and mo installer --dry-run print their candidates to the terminal and write no file.

System status. mo status --json prints one metrics snapshot. It also switches to JSON automatically when stdout is not a TTY, but pass --json explicitly in scripts so intent stays obvious. mo status --watch --interval 1s emits one complete JSON object per line from a warm collector. Bound the watch duration or sample count and terminate it after collecting the evidence the user asked for; do not leave an unbounded monitor running in the background.

Show full SKILL.md (349 more words)Show less

Command notes worth knowing

  • mo clean also sweeps leftovers from apps the user already deleted. It does not touch installed apps; that is mo uninstall.
  • mo clean --external <path> cleans macOS metadata off an external volume.
  • mo purge removes rebuildable project artifacts: local build output (target/, build/, dist/, .next/) and dependency directories that need a network to restore (node_modules/, Pods/, venv/, vendor/). A purge is therefore not always recoverable offline, so say which kind the candidates are before running it. mo purge --paths configures which directories are scanned; --include-empty shows zero-size candidates. A non-interactive real run requires explicit --yes; dry-run does not. Use --yes only after the user has authorized removal. Artifacts with authored content stay protected, and an inconclusive content probe keeps the candidate and reports an incomplete run.
  • mo optimize refreshes caches and system services. It is the one destructive command whose effects are not "files disappear", so say what it will do before running it.
  • mo update self-updates; mo update --nightly installs unreleased main. Do not run either on a user's behalf without being asked.
  • --debug on any command prints the detailed operation log. Reach for it when a command silently did nothing; do not leave it on in normal use.

When something goes wrong

mo clean deletions are permanent by default. Cache cleanup removes files rather than moving them to the Trash, so there is usually nothing to restore. That is why preview matters; a dry-run provides no backup or undo. mo uninstall is the exception: it routes the app and its leftovers through the Trash, so an uninstalled app is recoverable until the Trash is emptied.

What you do have is a record. mo history --json returns every logged deletion in its deletions[] array; the raw log at the path in logs (one tab-separated line per deletion: timestamp, mode, size, status, path) is the fallback for entries older than --limit. So when a user asks "did Mole take my file", answer from that record instead of guessing. Then add the path to the whitelist (mo clean --whitelist) so the next run leaves it alone.

© tw93, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/mole of tw93/Mole.

Open the folder on GitHubat commit a68741b

Compare with similar skills

Mole Mac Cleanup CLI Safety next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mole Mac Cleanup CLI Safety compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mole Mac Cleanup CLI Safety this skilltw93/Mole69k—~1.8kAutomated safety check: PassGPL-3.0
Disk Storage AnalyzerKKKKhazix/khazix-skills21k1 repos~1.4kAutomated safety check: PassMIT
Jev Desktop Computer Usekerpopule/hermes-jev-skills1k—~4.1kAutomated safety check: PassMIT
Dutis macOS Handler Managertsonglew/dutis251—~1.2kAutomated safety check: PassNone
Jarvis Setupethanplusai/jarvis838—~2.5kAutomated safety check: NotesCustom licence
cmux Cloud Machinesmanaflow-ai/cmux28k—~864Automated safety check: PassCustom licence

Similar skills

  • Disk Storage Analyzer

    KKKKhazix/khazix-skills

    Scans a Mac or Windows PC read-only to find what fills the disk, grades each item by how safe it is to clean and builds an interactive HTML report.

    21k GitHub starsUsed in 1 repo~1.4k tokens
    Productivity & AutomationAuto-check passed
  • Jev Desktop Computer Use

    kerpopule/hermes-jev-skills

    Drives desktop GUI apps and OS dialogs by letting Jev pick the next action from a menu of safe actions the agent built, with a Mac Co-Agent shortcut.

    1k GitHub stars~4.1k tokensUpdated yesterday
    Productivity & AutomationAuto-check passed
  • Inspects, plans, changes and rolls back macOS default app handlers for file types, MIME types and URL schemes through Dutis, with approval before any write.

    251 GitHub stars~1.2k tokensUpdated 2 days ago
    Productivity & AutomationAuto-check passed
  • Jarvis Setup

    ethanplusai/jarvis

    A skill your agent uses when helping someone install, configure, or debug a fresh clone of JARVIS (this repo) — especially "the mic doesn't work", "JARVIS says his language systems are down", any…

    838 GitHub stars~2.5k tokensUpdated 27 days ago
    Frontend & DesignAuto-check: notes
  • cmux Cloud Machines

    manaflow-ai/cmux

    Operates cmux Cloud machines from the cmux CLI, running durable remote commands or detached agents and presenting their workspaces, with authorization limits on destructive steps.

    28k GitHub stars~864 tokensUpdated today
    DevOps & CloudAuto-check passed
  • Rename Pdfs

    realspqrk/autorename-pdf

    [Dev] Rename PDF files using AI (Python, requires venv). An agent skill from realspqrk/autorename-pdf.

    122 GitHub stars~541 tokensUpdated 26 days ago
    Documents & OfficeAuto-check passed

More from tw93/Mole

  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    69k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Runbook for assessing and executing a Mole CLI release: distribution channels, pre-flight checks, capital-V tags, build artifacts and the handoff to curated release notes.

    69k GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • Publishes curated, bilingual release notes for an existing Mole version tag with gh release edit, including contributor thanks and reactions, after the release workflow finishes.

    69k GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Works with

Questions about Mole Mac Cleanup CLI Safety

What does Mole Mac Cleanup CLI Safety do?

Teaches an agent to drive the Mole (mo) Mac cleaning CLI safely: preview first, use JSON output, and leave destructive runs to the user. Mole cleans, uninstalls, analyzes, optimizes and monitors a Mac, so the skill sets strict rules for an agent using it on a live machine. Every destructive command is run with the dry-run flag first and the list is shown to the user.

When should I use Mole Mac Cleanup CLI Safety?

Mole Mac Cleanup CLI Safety fits situations like: finding out what is using disk space on a Mac; freeing space or removing an app completely, with a preview before anything is deleted; checking what Mole deleted on an earlier run; collecting CPU, memory, disk and network status as JSON.

How do I install Mole Mac Cleanup CLI Safety in Claude Code?

Run `npx skills add tw93/Mole --skill mole -a claude-code`. Or copy the skill folder (.claude/skills/mole in tw93/Mole) into .claude/skills/mole in your project. Claude Code loads it when a task matches its description.

How do I install Mole Mac Cleanup CLI Safety in Codex?

Run `npx skills add tw93/Mole --skill mole -a codex`. Or copy the skill folder (.claude/skills/mole in tw93/Mole) into .agents/skills/mole in your project. Codex loads it when a task matches its description.

Can I use Mole Mac Cleanup CLI Safety in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tw93/Mole --skill mole -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mole, .gemini/skills/mole, .github/skills/mole and .opencode/skills/mole in your project.

What does Mole Mac Cleanup CLI Safety need to run?

SKILL.md names no scripts, command-line tools or credentials: Mole Mac Cleanup CLI Safety is instructions for the agent only. Our summary lists: The Mole CLI (mo) installed on a Mac.

Does Mole Mac Cleanup CLI Safety access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mole Mac Cleanup CLI Safety safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mole Mac Cleanup CLI Safety use?

Mole Mac Cleanup CLI Safety is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mole Mac Cleanup CLI Safety use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mole Mac Cleanup CLI Safety?

Skills that share tags, products or a category with Mole Mac Cleanup CLI Safety: Disk Storage Analyzer (KKKKhazix/khazix-skills, 21k stars), Jev Desktop Computer Use (kerpopule/hermes-jev-skills, 1k stars), Dutis macOS Handler Manager (tsonglew/dutis, 251 stars) and Jarvis Setup (ethanplusai/jarvis, 838 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mole Mac Cleanup CLI Safety?

tw93 (a GitHub user) maintains it in tw93/Mole, which has 69,469 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 7, 2026.

Source: tw93/Mole on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.