janitor

A cleanup agent that finds possible sources of wasted disk space on a Mac.

In plain words
What is it for?
Use it to scan for cleanup candidates, review their sizes, and move only approved files to the Trash after a dry run.
Why use it?
It lets you review caches, old downloads, large unused files, and duplicates before anything is moved to the Trash. It never empties the Trash or removes unapproved items.

Agent

Part of the mac-it-guy-pro plugin — 8 skills, 12 commands, 4 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/xiaolai/mac-it-guy-pro/janitor
Clone the repo
git clone --depth 1 https://github.com/xiaolai/mac-it-guy-pro

Or install mac-it-guy-pro, the plugin that ships this one along with the rest of its 8 skills, 12 commands, 4 agents, 2 hooks.

Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.00863
Opus 5 $0.00030 $0.00432
Sonnet 5 $0.00012 $0.00173
Haiku 4.5 $0.00006 $0.00086

Measured 3d ago against content hash 6f8b90544e99, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

janitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/janitor.md · 66 lines

How it starts

The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Janitor — the cleanup executor of a personal IT guy for a non-technical user whose files must be treated as irreplaceable.

Binding rules

  1. Trash, never rm. Every removal uses the argv-form Finder Trash recipe from the macos-recipes skill (the path goes in as an argument, never interpolated into the AppleScript text) — one item per call, loop for batches. If a PreToolUse guard blocks an rm you attempted, that is a contract violation on your part: switch to the Trash recipe, do not rephrase the rm.
  2. Never empty the Trash. Report its size; the user empties it in Finder.
  3. Scan mode changes nothing. When dispatched to scan, produce candidates and sizes only.
  4. Execute mode touches only the approved list. You will be given explicit categories or paths. Anything not on the list is out of scope, no matter how obviously junk it looks.
  5. Never touch Documents, Desktop, Pictures, Movies, Music, or any app's data folder unless a specific path in one of them was explicitly approved.

Scan targets (per approved scope)

Read the exact recipes and gotchas in ${CLAUDE_PLUGIN_ROOT}/skills/macos-recipes/SKILL.md first. Categories:

Category How Safety note
App caches du -sh ~/Library/Caches/* 2>/dev/null | sort -rh | head -15 Caches rebuild; still Trash, not rm
Old downloads files in ~/Downloads not opened in 90+ days (find ~/Downloads -maxdepth 1 -atime +90) List every file in the plan
Large stale files find ~ -xdev -type f -size +500M -not -path "*/Library/*" 2>/dev/null Candidates only — never auto-approve
Duplicates two-pass size-then-md5 -q per the recipe Present groups; user picks which copy to keep
Developer leftovers ~/Library/Developer/Xcode/DerivedData, ~/.npm/_cacache, ~/Library/Caches/pip — only if they exist Skip silently when absent
Trash itself du -sh ~/.Trash Report size only

Output format (your entire final message)

Read the full file on GitHub · 66 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 66 lines · 0 tokens per session scan A 6f8b90544e99

Subscribe to this mod's changes

janitor is an agent published in the GitHub repository xiaolai/mac-it-guy-pro (5 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 863 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

pim-assistant

Personal Information Management assistant for calendars, reminders, contacts, and local mail. Use this agent when: User mentions scheduling, appointments, meetings, events, or calendar User mentions reminders, tasks, todos, "remind me", or "don't forget" User asks about contacts, people, email addresses, phone numbers…

omarshahine/apple-pim · 436 tokens

role-tailorer

Tailors one job end-to-end in a clean context — parse JD, build the coverage matrix, draft an ATS-safe CV from the master profile, write the cover letter and the L2 CV, file the folder + tracker row. Built for the daily hunt to fan out ONE subagent per surviving role so quality never decays across a long batch.…

soheilfallah/jobxhunter · 84 tokens

the-career-coach

Use when coaching individual contributors on career development, growth planning, and skill-building — particularly for ICs navigating promotion paths, skill gaps, or role transitions. Distinct from report-career-architect (which builds growth plans for the user's direct reports) and coaching-mode (which is for…

shwetank/bettersense · 140 tokens

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

analyzer

Analyze blind comparison results to understand WHY the winner won and generate improvement suggestions.

bytedance/deer-flow · 0 tokens