# Mac Cortex

> Monitor the local Mac and Hermes runtime with real scripts, including context-aware anomaly detection and a compact runtime status report.

- Skill: `ichichuang/mac-cortex` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add ichichuang/mac-cortex`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ichichuang/mac-cortex/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- License: MIT
- Author: ichichuang (https://skillmd.com/u/ichichuang)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/ichichuang/mac-cortex

---


# Mac Cortex

Use this skill for real system monitoring, runtime inspection, or anomaly checks.

## Core Commands

System snapshot with anomaly detection:

```bash
~/.hermes/hermes-agent/venv/bin/python ~/.hermes/scripts/system_snapshot.py
```

Compact Hermes runtime status:

```bash
~/.hermes/hermes-agent/venv/bin/python ~/.hermes/scripts/cortex_status.py
```

## What The Snapshot Script Does

- captures CPU, memory, disk, load average, and thermal state
- tags the current machine context as `build`, `watcher`, or `idle`
- stores a rolling metric history under `~/.hermes/cache/cortex_metrics.json`
- compares the current sample against same-context baselines
- emits a machine-readable anomaly verdict with reasons

## What The Status Script Does

- shows the configured model and reasoning level
- shows gateway state and live platform connections
- shows registered cron jobs
- shows memory mode
- summarizes recent warnings and errors from Hermes logs

## Rules

1. Prefer these scripts over guessing from raw logs.
2. If the snapshot says `anomaly_detected: false`, do not fabricate an emergency.
3. If the snapshot says `anomaly_detected: true`, include the exact reasons and current context.
4. Use the runtime status script before changing gateway, cron, or memory configuration.
5. These scripts require Python dependencies: `psutil` for `system_snapshot.py` and `PyYAML` (`yaml`) for `cortex_status.py`. If either import fails, report the missing dependency instead of pretending the monitoring run succeeded.

## Verification

- The scripts must return valid JSON.
- `system_snapshot.py` should persist history to `~/.hermes/cache/cortex_metrics.json`.
- `cortex_status.py` should report the current config and gateway state without crashing.
- Prefer the Hermes venv wrapper above so interactive runs and cron runs share the same dependency set.

