# macos-security-hardening

The macos-security-hardening skill guides you through setting up full-disk encryption, configuring firewalls, securing DNS, and disabling telemetry on macOS. Use it to protect your system against local access, data theft, and tracking.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 107 installs · ★ 13 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/security-skills/tree/HEAD/skills/macos-security-hardening/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/macos-security-hardening

## What it does

The skill provides commands and explanations for securing a macOS machine: enable FileVault with a recovery key, configure application-level and packet-filter firewalls, block incoming connections via `pf`, enable secure hibernation mode, separate a standard user from the admin account, set a firmware password, and switch to encrypted DNS.

Inside are bash scripts using `sudo fdesetup enable`, `pfctl`, `softwareupdate`, `defaults write`, and native macOS utilities. It favours Apple silicon over Intel due to unfixable CPU vulnerabilities.

You need terminal access and admin rights to run most commands. Some steps require booting into recovery mode. If your Mac is managed by corporate policy, certain settings may be locked.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/security-skills --skill macos-security-hardening -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/macos-security-hardening/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/macos-security-hardening/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/security-skills --skill macos-security-hardening -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/macos-security-hardening/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/security-skills --skill macos-security-hardening -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/macos-security-hardening/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/security-skills skills/macos-security-hardening
```

2. **Manually: put the files in place**
- File: `.github/skills/macos-security-hardening/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/security-skills --skill macos-security-hardening -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/security-skills --path skills/macos-security-hardening
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/macos-security-hardening/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/security-skills --skill macos-security-hardening -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/security-skills/tree/HEAD/skills/macos-security-hardening/SKILL.md

## When to use it
- enable full-disk encryption with FileVault
- set up a packet-filtering firewall with custom rules
- switch to encrypted DNS instead of plaintext
- disable system telemetry and tracking
- create a separate admin account for maintenance only

## Example prompts
- Enable FileVault and walk me through storing the recovery key securely
- Show me how to set hibernation mode 25 and require password immediately after sleep
- I need packet-filter rules in `/etc/pf.conf` to block incoming connections—what goes in the config?

## Similar
- [powershell-security-hardening](https://affpapa.org/en/nevibecode/agents/voltagent-powershell-security-hardening.md) — subagent · ★ 6505 repo stars
- [Cyber Security Specialist](https://affpapa.org/en/nevibecode/prompts/cyber-security-specialist.md) — prompt · ★ 178201 repo stars
- [windows-hardening](https://affpapa.org/en/nevibecode/skills/windows-hardening.md) — skill · 435 installs
- [hardening-docker-containers-for-production](https://affpapa.org/en/nevibecode/skills/hardening-docker-containers-for-production.md) — skill · 373 installs
- [macos-security-bypass](https://affpapa.org/en/nevibecode/skills/macos-security-bypass.md) — skill · 3900 installs
- [Linux Server Hardening taste](https://affpapa.org/en/nevibecode/prompts/linux-server-hardening-taste.md) — prompt · ★ 178201 repo stars

From the same set: [reason-machines/security-skills](https://affpapa.org/en/nevibecode/by/reason-machines/security-skills.md) — 129 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
