# dan-snelson/mac-health-check architecture

> Architecture diagram of the GitHub repository dan-snelson/mac-health-check, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dan-snelson/mac-health-check
- Repository: https://github.com/dan-snelson/mac-health-check

## Overview

Mac Health Check is an MDM-agnostic macOS compliance and support-triage tool. An administrator deploys the script through an MDM Self Service policy; a user runs it to collect health and policy findings, which are reported locally and optionally sent to Splunk. Self Service can also present an Inspect Mode summary and selectively recheck findings after remediation. The README documents these product-level relationships, but no source excerpts were provided, so internal call paths are not asserted.

Main entry points: [`Mac-Health-Check.zsh`](https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh) (Health Check Runtime), [`Resources/MacHealthCheck-Inspect-Mode`](https://github.com/dan-snelson/mac-health-check/tree/main/Resources/MacHealthCheck-Inspect-Mode) (Inspect Mode Summary), [`external-checks`](https://github.com/dan-snelson/mac-health-check/tree/main/external-checks) (External Checks), [`Skills/mac-health-check-selector/SKILL.md`](https://github.com/dan-snelson/mac-health-check/blob/main/Skills/mac-health-check-selector/SKILL.md) (Customization Skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Health Checks"]
  node_healthcheck["Health Check Runtime"]
  node_externalchecks["External Checks"]
  node_compliance["Compliance Findings"]
end

subgraph group_results["Results and State"]
  node_report["JSON Health Report"]
  node_runtime_state[("Runtime State and Caches")]
  node_splunk["Splunk HEC"]
  node_webhooks["Slack and Teams"]
end

subgraph group_experience["User Experience"]
  node_inspect["Inspect Mode Summary"]
  node_inspect_assets["Inspect Config and Compliance"]
  node_swiftdialog["swiftDialog"]
end

subgraph group_deployment["Administration"]
  node_skill["Customization Skill<br/>[SKILL.md]"]
  node_deployment_config["Deployment Configuration"]
  node_remediation["Remediation Work"]
end

node_user(("Mac user"))
node_admin(("Mac administrator"))
node_mdm["MDM Self Service"]

node_admin -->|"configures deployment"| node_deployment_config
node_admin -->|"uses customization guide"| node_skill
node_mdm -->|"runs on demand"| node_healthcheck
node_user -->|"starts Self Service run"| node_mdm
node_healthcheck -->|"runs checks"| node_externalchecks
node_healthcheck -->|"collects findings"| node_compliance
node_healthcheck -->|"writes report"| node_report
node_healthcheck -->|"stores runtime state"| node_runtime_state
node_healthcheck -.->|"optionally forwards report"| node_splunk
node_healthcheck -.->|"delivers messages"| node_webhooks
node_healthcheck -->|"generates Inspect assets"| node_inspect_assets
node_healthcheck -->|"launches Self Service summary"| node_inspect
node_inspect -->|"presents results"| node_user
node_inspect -->|"uses"| node_swiftdialog
node_healthcheck -->|"installs or updates"| node_swiftdialog
node_remediation -->|"triggers targeted recheck"| node_healthcheck
node_healthcheck -->|"merges recheck results"| node_report

click node_healthcheck "https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh"
click node_externalchecks "https://github.com/dan-snelson/mac-health-check/tree/main/external-checks"
click node_compliance "https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh"
click node_report "https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh"
click node_runtime_state "https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh"
click node_inspect "https://github.com/dan-snelson/mac-health-check/tree/main/Resources/MacHealthCheck-Inspect-Mode"
click node_inspect_assets "https://github.com/dan-snelson/mac-health-check/tree/main/Resources/MacHealthCheck-Inspect-Mode"
click node_skill "https://github.com/dan-snelson/mac-health-check/blob/main/Skills/mac-health-check-selector/SKILL.md"
click node_deployment_config "https://github.com/dan-snelson/mac-health-check/tree/main/Resources"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_healthcheck,node_externalchecks,node_compliance,node_user toneBlue
class node_report,node_runtime_state,node_splunk,node_webhooks toneAmber
class node_inspect,node_inspect_assets,node_swiftdialog toneMint
class node_skill,node_deployment_config,node_remediation toneRose
class node_admin,node_mdm toneIndigo
```

## Components

### Health Checks

- [Health Check Runtime](https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh): `Mac-Health-Check.zsh`
- [External Checks](https://github.com/dan-snelson/mac-health-check/tree/main/external-checks): `external-checks`
- [Compliance Findings](https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh): `Mac-Health-Check.zsh`

### Results and State

- [JSON Health Report](https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh): `Mac-Health-Check.zsh`
- [Runtime State and Caches](https://github.com/dan-snelson/mac-health-check/blob/main/Mac-Health-Check.zsh): `Mac-Health-Check.zsh`
- **Splunk HEC**
- **Slack and Teams**

### User Experience

- [Inspect Mode Summary](https://github.com/dan-snelson/mac-health-check/tree/main/Resources/MacHealthCheck-Inspect-Mode): `Resources/MacHealthCheck-Inspect-Mode`
- [Inspect Config and Compliance](https://github.com/dan-snelson/mac-health-check/tree/main/Resources/MacHealthCheck-Inspect-Mode): `Resources/MacHealthCheck-Inspect-Mode`
- **swiftDialog**

### Administration

- [Customization Skill](https://github.com/dan-snelson/mac-health-check/blob/main/Skills/mac-health-check-selector/SKILL.md): `Skills/mac-health-check-selector/SKILL.md`
- [Deployment Configuration](https://github.com/dan-snelson/mac-health-check/tree/main/Resources): `Resources`
- **Remediation Work**

### Other components

- **Mac user**
- **Mac administrator**
- **MDM Self Service**

## Connections

- Mac administrator → Deployment Configuration: configures deployment (evidence: `README.md`)
- Mac administrator → Customization Skill: uses customization guide (evidence: `README.md`)
- MDM Self Service → Health Check Runtime: runs on demand (evidence: `README.md`)
- Mac user → MDM Self Service: starts Self Service run (evidence: `README.md`)
- Health Check Runtime → External Checks: runs checks (evidence: `README.md`)
- Health Check Runtime → Compliance Findings: collects findings (evidence: `README.md`)
- Health Check Runtime → JSON Health Report: writes report (evidence: `README.md`)
- Health Check Runtime → Runtime State and Caches: stores runtime state (evidence: `README.md`)
- Health Check Runtime → Splunk HEC: optionally forwards report (evidence: `README.md`)
- Health Check Runtime → Slack and Teams: delivers messages (evidence: `README.md`)
- Health Check Runtime → Inspect Config and Compliance: generates Inspect assets (evidence: `README.md`)
- Health Check Runtime → Inspect Mode Summary: launches Self Service summary (evidence: `README.md`)
- Inspect Mode Summary → Mac user: presents results (evidence: `README.md`)
- Inspect Mode Summary → swiftDialog: uses (evidence: `README.md`)
- Health Check Runtime → swiftDialog: installs or updates (evidence: `README.md`)
- Remediation Work → Health Check Runtime: triggers targeted recheck (evidence: `README.md`)
- Health Check Runtime → JSON Health Report: merges recheck results (evidence: `README.md`)
