maintaining-macos-health

maintaining-macos-health is a skill for Claude Code from CodeAlive-AI/ai-driven-development. It costs 157 tokens per session (4,850 once invoked), scanned A, original, MIT.

A practical guide for keeping a Mac’s storage, memory, CPU use, and system health under control. It covers cleanup, developer-machine optimization, monitoring, alerts, and recovery from certain crashes or resource problems.

In plain words
What is it for?
Use it to free disk space, investigate high CPU or memory pressure, respond to watchdog or Jetsam events, configure monitoring, or cleanly uninstall apps.
Why use it?
It helps diagnose a Mac that is full, slow, or repeatedly overloaded. It also provides a repeatable way to remove unwanted app files and set up health alerts.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the ai-driven-development plugin — 24 skills, 1 agent shipped together

Good fit Use it to free disk space, investigate high CPU or memory pressure…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/codealive-ai/ai-driven-development/maintaining-macos-health
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.

Any agent
npx skills add CodeAlive-AI/ai-driven-development --skill maintaining-macos-health
Clone the repo
git clone --depth 1 https://github.com/CodeAlive-AI/ai-driven-development

Made for: Claude Code.

Or install ai-driven-development, the plugin that ships this one along with the rest of its 24 skills, 1 agent.

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 maintaining-macos-health

README.md
[![agentmods](https://agentmods.dev/badge/skills/codealive-ai/ai-driven-development/maintaining-macos-health.svg)](https://agentmods.dev/skills/codealive-ai/ai-driven-development/maintaining-macos-health)
Your own site
<a href="https://agentmods.dev/skills/codealive-ai/ai-driven-development/maintaining-macos-health"><img src="https://agentmods.dev/badge/skills/codealive-ai/ai-driven-development/maintaining-macos-health.svg" alt="Measured on agentmods" height="20"></a>
Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,850 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00157 $0.04850
Opus 5 $0.00078 $0.02425
Sonnet 5 $0.00031 $0.00970
Haiku 4.5 $0.00016 $0.00485

Measured 2d ago against content hash 0dbde11adc75, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

maintaining-macos-health scanned grade A with 1 finding 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 2d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (assets/apply-cleanup-selection.py, assets/config.sh, assets/disk_agent.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `references/never-touch.md` | Categories that **must not** be deleted even under sudo (Mole-derived blacklist + incident-derived additions) |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/maintaining-macos-health/SKILL.md · 176 lines

How it starts

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

Maintaining macOS Health

Recovery and prevention playbook for macOS disk and memory crises. Validated against a real watchdog-timeout kernel panic on Apple Silicon caused by vm_compressor segments saturated to 100 % with the disk over 90 % full. The same playbook works for routine cleanup or first-time setup on a new machine.

Table of contents

When to use

Trigger on any of:

  • Disk free < 20 % or user complains about being out of space
  • Watchdog-timeout / kernel panic / "no checkins from watchdogd"
  • New JetsamEvent-*.ips with vm-compressor-space-shortage
  • "Mac is slow", swap > 6 GB, sustained Critical memory pressure
  • A process persistently consumes a core, or the whole machine stays CPU-saturated
  • User wants to set up monitoring/alerting from scratch
  • Migration to a new Mac → restore the same alerter
  • General "clean my Mac" / "audit storage" / "free space" requests

Skill layout

File Use for
references/triage.md First 5 minutes — which signal fired, which tier of cleanup to start with
references/cleanup-tiers.md Tiered cleanup playbook (10 tiers, zero-risk → discuss-first), copy-paste-safe shell blocks
references/never-touch.md Categories that must not be deleted even under sudo (Mole-derived blacklist + incident-derived additions)
references/mole-techniques.md What Mole does that we borrow: marker→target map for mo purge, safe-path validators, age thresholds
references/alerting.md Full alerter design: disk/memory/Jetsam critical triggers plus sustained CPU anomaly detection, incident lifecycle, hysteresis, notifier choices, install/restore commands
references/optional-disk-responses.md First-use offer, installation and operation of two independent opt-ins: emergency Mole cache cleanup below 2%, and a Codex cleanup plan/page at or below 5% with exact-session continuation.
assets/mac-health-disk, assets/disk_*.py Consent-gated disk controller, deterministic inventory, restricted Codex runner and authenticated local selection/confirmation page. Both modes default off.
assets/mole-exact-file.sh, assets/mole-core-1.39.0.json Compatibility-pinned exact-file adapter to Mole; no general mo clean, sudo, or shell commands from the agent.
assets/mac-health-check Production-ready bash script (~250 lines, bash 3.2 compatible)
assets/mac-health-action Background action dispatcher for read-only Codex/Claude investigations and explicitly confirmed graceful process stopping
assets/com.local.mac-health-check.plist LaunchAgent plist with StartCalendarInterval (StartInterval is broken on laptops)
assets/config.sh Default config with safe thresholds
assets/render-cleanup-plan.py Interactive HTML cleanup-plan UI. Renders categorised checkboxes from a JSON of scan findings, serves on 127.0.0.1:18347, opens browser, waits for the user's selection, writes it to /tmp/cleanup-selection-<ts>.json. Used by Workflow A.
assets/apply-cleanup-selection.py The only sanctioned way to apply a cleanup selection. Reads selected_items from a selection JSON and executes each item's command field. Enforces protected-override check + path validation + Mole-compatible operations log. Prevents drift between what the user picked and what gets deleted. Supports --dry-run.

Read the full file on GitHub · 176 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. 2d ago Changed · +19 lines 0dbde11adc75
  2. 7d ago First seen · 157 lines · 157 tokens per session scan A 405f8e7331b8

Subscribe to this mod's changes

maintaining-macos-health is a skill published in the GitHub repository CodeAlive-AI/ai-driven-development (132 stars, last pushed today), licensed MIT. It adds 157 tokens to every session and 4,850 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agenttrace-session-audit

Audit local AI coding-agent sessions with agenttrace for cost, tool failures, latency, anomalies, health, diffs, and CI gates.

sickn33/agentic-awesome-skills · 34 tokens

intuitive-preflight

Turn a vague task, plan, issue, or "LGTM/go ahead" request into an approval-ready preflight contract before implementation starts. Use when the user wants prompt preflight, clearer scope, non-goals, context package, acceptance criteria, definition of done, verification, stop gates, the exact execution command, or…

MiaoDX/intuitive-flow · 112 tokens

intuitive-squash

Squash local GSD or agent-generated commit history into a clean, reviewable story while preserving important fixes. Use when the user asks to squash commits, clean git history, compress phase commits, prepare a branch before PR, compare aggressive vs moderate squash options, or preserve hotfix/security commits during…

MiaoDX/intuitive-flow · 73 tokens

intuitive-refactor

Refactor and cleanup router for known code/module/API seams, stale surfaces, compatibility shims, architecture cleanup targets, changed-code quality review, oversized modules, repeated cleanup campaigns, and recurring whole-repo architecture maintenance goals. Use this when the user names a concrete seam, wants…

MiaoDX/intuitive-flow · 185 tokens

antigravity-workflows-v2

Antigravity Workflows workflow skill. Use this skill when the user needs Orchestrate multiple Antigravity skills through guided workflows for SaaS MVP delivery, security audits, AI agent builds, and browser QA and the operator should preserve the upstream workflow, copied support files, and provenance before merging…

diegosouzapw/awesome-omni-skills · 71 tokens

reviewer

Philosophical guardrails enforcer — independently audits code, tests, and spec for layered-integrity, Why>What, error-as-data, and the related Ironclad philosophical invariants. Activate only when the connected project contains spec.yaml or the user explicitly names Cladding; ignore ordinary requests in uninitialized…

qwerfunch/cladding · 68 tokens