skills/macos/macos-admin/SKILL.md
System preferences, users, disk utility, SIP, Gatekeeper, FileVault, console logs
npx skillsauth add alphaonedev/openclaw-graph macos-adminInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill handles macOS system administration tasks, including managing preferences, users, disks, and security features like SIP, Gatekeeper, FileVault, and console logs.
Use this skill for automating macOS admin operations in scripts, such as configuring system settings during deployment, managing user accounts in enterprise environments, or troubleshooting security issues via logs.
systemsetup for settings like time zone or energy saver.dscl for creating, deleting, or modifying accounts.diskutil for mounting, verifying, or encrypting volumes.csrutil to enable/disable for kernel extensions.spctl to assess app security policies.fdesetup for status checks and enablement.log command for system diagnostics.Invoke this skill in shell scripts or Python subprocess calls, always with elevated privileges (e.g., via sudo). For example, wrap commands in a function that checks for admin rights first. Use environment variables for configuration, like $ADMIN_PASSWORD for scripts requiring authentication. Pattern: Check prerequisites (e.g., OS version with sw_vers), execute the command, and parse output for automation.
Use sudo for most commands due to admin requirements. Here's how to accomplish key tasks:
dscl . -create /Users/newuser; dscl . -create /Users/newuser UserShell /bin/bash; dscl . -create /Users/newuser RealName "New User"csrutil status (output: "System Integrity Protection: enabled")sudo fdesetup enable -user username -pass $ADMIN_PASSWORDspctl --assess --verbose /path/to/app to verify app allowancediskutil mount disk1s1log show --predicate 'subsystem == "com.apple.console"' --last 1hsudo scutil --set ComputerName NewNameCode snippet for user creation in Python:
import subprocess
subprocess.run(['sudo', 'dscl', '.', '-create', '/Users/newuser'])
subprocess.run(['sudo', 'dscl', '.', '-create', '/Users/newuser', 'RealName', 'New User'])
Code snippet for SIP check:
import os
result = os.popen('csrutil status').read()
if 'enabled' in result:
print("SIP is active")
Integrate by calling macOS CLI tools from your AI agent's code via subprocess or os.system. For scripts, ensure the agent runs with admin privileges; use sudo and pass credentials via env vars like $ADMIN_PASSWORD. Config formats: Use plist files for preferences (e.g., edit /Library/Preferences/com.apple.loginwindow.plist with defaults write). For API-like access, leverage AppleScript via osascript, e.g., osascript -e 'tell application "System Preferences" to activate'. If combining with other skills, pipe output to tools like jq for JSON parsing of log data.
Always check command exit codes; for example, use subprocess.run(..., check=True) in Python to raise exceptions on failure. Common errors: Permission denied (code 1) – prompt for sudo or check $EUID for root status. Handle SIP-related errors by verifying status first. For disk operations, catch I/O errors with try-except blocks. Example: If diskutil fails, log the error and retry after user confirmation. Use 2>&1 to capture stderr in scripts, e.g., command 2>&1 | grep error.
dscl . -read /Users/username, then create if not: sudo dscl . -create /Users/newuser && sudo dscl . -passwd /Users/newuser $NEW_PASSWORD. Use in a script to handle onboarding.sudo fdesetup status to check current state, then if disabled, execute sudo fdesetup enable -user admin -pass $ADMIN_PASSWORD to encrypt the drive, ensuring data protection.tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui