mac-agent-hygiene

mac-agent-hygiene is a plugin for Claude Code from MSApps-Mobile/claude-plugins. Its manifest loads nothing; the 1 skill, 1 command it bundles cost 139 tokens per session together, scanned A, original, MIT.

A Mac cleanup plugin with a daily background task and an MCP server, a tool interface that lets an agent request system operations. It finds regenerable caches and stale Git worktrees, then requires a plan and confirmation before cleanup.

In plain words
What is it for?
Use it to inspect disk usage, review proposed removal of Xcode data, plugin clones, browser caches, or safe stale worktrees, and schedule daily checks on a Mac.
Why use it?
It helps prevent agent work from gradually filling the disk with disposable files. The confirmation step reduces the risk of deleting work that is dirty, unpushed, in use, or still needed.

Plugin for Claude Code

Written for Claude Code: a Claude Code plugin manifest. Also seen: mentions Claude Code.

Good fit Use it to inspect disk usage, review proposed removal of Xcode data, plugin clones, browser caches, or safe stale worktrees, and schedule daily checks on a Mac.

Compare 6 plugins from other repositories ↓
Install in Claude Code
/plugin marketplace add MSApps-Mobile/claude-plugins
/plugin install mac-agent-hygiene
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.

Clone the repo
git clone --depth 1 https://github.com/MSApps-Mobile/claude-plugins

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mac-agent-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene/github.svg)](https://agentmods.dev/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene)
Your own site
<a href="https://agentmods.dev/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene"><img src="https://agentmods.dev/badge/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mac-agent-hygiene

Your own site · 80×15
<a href="https://agentmods.dev/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene"><img src="https://agentmods.dev/badge/plugins/msapps-mobile/claude-plugins/mac-agent-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured The manifest loads nothing itself; its 1 skill, 1 command cost 139 tokens a session between them.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

mac-agent-hygiene 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 today.

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.

plugins/mac-agent-hygiene/.claude-plugin/plugin.json · 47 lines

How it starts

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

{
  "name": "mac-agent-hygiene",
  "description": "Keeps a Mac that runs Claude Code agents from filling its disk: a daily LaunchAgent plus an MCP server that clears regenerable caches (Xcode DerivedData, leftover plugin clones, browser-profile caches) and reaps stale git worktrees that are clean and already pushed. Plan first, apply on confirm.",
  "version": "0.1.2",
  "author": {
    "name": "MSApps",
    "url": "https://claudeservices.ai"
  },
  "license": "MIT",
  "homepage": "https://claudeservices.ai/plugins#mac-agent-hygiene",
  "repository": "https://github.com/MSApps-Mobile/claude-plugins",
  "privacy_policy": "https://opsagents.agency/privacy",
  "terms_of_service": "https://opsagents.agency/terms",
  "keywords": [
    "mac",
    "macos",
    "disk",
    "cleanup",
    "worktree",
    "launchd",
    "mcp",
    "claude-code",
    "agents",
    "sosa-agents"
  ],
  "platforms": [
    "claude-code",
    "cowork"
  ],
  "sosa": {
    "compliant": true,
    "level": 2,
    "impact": "medium",
    "methodology": "https://github.com/MSApps-Mobile/claude-plugins/blob/main/docs/SOSA.md",
    "whitepaper": "https://github.com/MSApps-Mobile/claude-plugins/blob/main/docs/sosa-whitepaper.pdf",
    "pillars": {
      "supervised": "Every removal is planned first (dry run with per-item reasons) and applied only with an explicit plan_id + confirm; the scheduled run deletes only regenerable caches and worktrees that are clean, pushed and untouched for a week",
      "orchestrated": "status → plan → re-check → apply → log; one shell script decides eligibility in both plan and apply so nothing slips between them",
      "secured": "Local filesystem only, no network except an optional read-only gh query for merged PRs; never sudo; never login state inside browser profiles; never dirty or unpushed worktrees; paths outside $HOME refused",
      "agents": "R=mac-hygiene, T=bash+launchd+git+gh(read), M=30-min plan cache + append-only log, P=status-plan-confirm-apply"
    }
  },

Read the full file on GitHub · 47 lines

Contents

What it installs

The manifest is a name and a version. 1 skill, 1 command travel with it, and installing the plugin installs all of them — 139 tokens a session between them. Each is measured on its own page, and each can be installed alone.

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. today Changed 5b9b79212de3
  2. 4d ago First seen · 47 lines scan A e5186597b9ee

Subscribe to this mod's changes

mac-agent-hygiene is a plugin published in the GitHub repository MSApps-Mobile/claude-plugins (9 stars, last pushed yesterday), licensed MIT. Its token cost is not measured: this kind of file is read by the harness, not the model. 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-10-08.