macos-security-hardening — Claude Code skill
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.
no license 107 installs ★ 13 updated 2026-10-09
npx skills add reason-machines/security-skills --skill macos-security-hardening -a claude-codeWhat macos-security-hardening 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.
What it helps with
- 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 for the agent
- 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.confto block incoming connections—what goes in the config?
How to install macos-security-hardening
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill macos-security-hardening -a claude-code2Manually: put the files in place
~/.claude/skills/macos-security-hardening/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/macos-security-hardening/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill macos-security-hardening -a codex2Manually: put the files in place
.agents/skills/macos-security-hardening/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill macos-security-hardening -a cursor2Manually: put the files in place
.cursor/skills/macos-security-hardening/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/security-skills skills/macos-security-hardening2Manually: put the files in place
.github/skills/macos-security-hardening/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill macos-security-hardening -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/security-skills --path skills/macos-security-hardeningManually: put the files in place
.devin/skills/macos-security-hardening/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/security-skills --skill macos-security-hardening -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about macos-security-hardening
How do I install macos-security-hardening in Claude Code?
Run npx skills add reason-machines/security-skills --skill macos-security-hardening -a claude-code in your terminal, then open ~/.claude/skills/macos-security-hardening/SKILL.md in your editor.
What does this skill do?
It provides step-by-step commands to harden macOS: enable disk encryption, configure firewalls, filter DNS requests, turn off telemetry, separate user accounts, and apply other protections against physical access and data theft.
Will I need this if I work alone on a personal Mac?
It depends. If theft or unauthorized cloud sync is a concern, the steps are worthwhile. If your Mac stays home and you trust your environment, basic protection like a password and FileVault is usually enough.