maintaining-macos-health

maintaining-macos-health is a skill for Claude Code from CodeAlive-AI/ai-driven-development. It costs 157 tokens per session (5,027 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 — 22 skills, 1 agent shipped together

Good fit Use it to free disk space, investigate high CPU or memory pressure, respond to watchdog or Jetsam events, configure monitoring, or cleanly uninstall apps.

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 22 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/github.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/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 maintaining-macos-health

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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 5,027 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 15 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 140
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Privilege Escalation · line 45
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 64
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 133
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 137
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Rogue Agent · line 53
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 107
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 111
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 123
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 149
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Excessive Agency · line 78
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
  • medium Rogue Agent · line 83
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Rogue Agent · line 111
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Privilege Escalation · line 137
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Rogue Agent · line 148
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.05027
Opus 5.5 $0.00063 $0.02011
Sonnet 5.5 $0.00031 $0.01005
Haiku 4.5 $0.00016 $0.00503

Measured 1mo ago against content hash 77b345e32169, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

The scan reads SKILL.md. This mod also ships 20 executable files (assets/apply-cleanup-selection.py, assets/build-space-scan.sh, assets/config.sh, …), 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 · 179 lines

How it starts

The opening of the file, as written. The whole thing — 179 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/space-scan/, assets/build-space-scan.sh Read-only bulk metadata scanner with explicit directory exclusions and a compact full folder tree; see references/storage-report.md for manual inventory
assets/render-storage-report.py, assets/storage-tree.js Append scanner output to the report; lazily expand folders and show largest files
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 · 179 lines

Files

What ships with it

40 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · +3 lines 77b345e32169
  2. 1mo ago Changed · +19 lines 0dbde11adc75
  3. 1mo 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 (166 stars, last pushed 2d ago), licensed MIT. It adds 157 tokens to every session and 5,027 once invoked, about $0.0006 per session on Opus 5.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

grok-cli

Delegate bounded tasks to Grok Build from a supervising agent such as Codex. Use when the user asks Grok to investigate, review, implement, or provide another perspective, or when a distinct coding agent would materially help. Includes a background ACP client for progress, follow-up prompts, permissions, and…

scarletkc/agents · 66 tokens

marketing-copy

Write outbound promotional copy for a product or project: launch and update posts for community platforms and social media, store page descriptions and short blurbs, landing page headlines and calls to action, press-style announcements, and the naming of a product for another language or market. Covers what may be…

scarletkc/agents · 121 tokens

intuitive-refactor

Execute a selected cleanup seam after its target and scope are known; use reduce-entropy for discovery.

MiaoDX/intuitive-flow · 25 tokens

deep-research

Universal deep research agent team. 13-agent pipeline for rigorous academic research on any topic. 8 modes: full research, quick brief, paper review, lit-review, fact-check, three-way literature scan, Socratic guided research dialogue, and systematic review with optional meta-analysis. Covers research question…

hamzabellouch/agent-skills · 291 tokens

intuitive-preflight

Turn a vague task or plan into an execution contract with scope, non-goals, acceptance, verification, and route.

MiaoDX/intuitive-flow · 29 tokens