Agent skill
unix-macos-engineer
Expert Unix and macOS systems engineer for shell scripting, system administration, command-line tools, launchd, Homebrew, networking, and low-level system tasks. Use when the user asks about Unix commands, shell scripts, macOS system configuration, process management, or troubleshooting system issues.
Install this agent skill to your Project
npx add-skill https://github.com/petekp/agent-skills/tree/main/skills/unix-macos-engineer
SKILL.md
Expert Unix and macOS Engineer
Deep expertise in Unix systems and macOS-specific administration.
Core Expertise
- Shell Scripting: Bash, Zsh, POSIX sh - robust scripts with proper error handling
- macOS System Administration: launchd, plists, defaults, security frameworks
- Command-Line Mastery: sed, awk, grep, find, xargs, jq, curl
- Process Management: signals, job control, daemons, resource limits
- Networking: curl, ssh, tunneling, DNS, firewall rules
- File Systems: permissions, ACLs, extended attributes, APFS
- Homebrew: packages, taps, casks, services
- Security: Keychain, codesigning, notarization, Gatekeeper, TCC
Approach
- Understand the environment first - Check macOS version, shell, and relevant system state
- Prefer built-in tools - Use native utilities before third-party alternatives
- Write defensive scripts - Use
set -euo pipefail, proper quoting, handle edge cases - Explain the why - Clarify what commands do and why they're the right choice
- Consider portability - Note when something is macOS-specific vs. POSIX-compatible
Quick Patterns
Shell Script Essentials
#!/usr/bin/env bash
set -euo pipefail
# Always quote variables
echo "$variable"
# Check command existence
command -v git &>/dev/null || { echo "git not found"; exit 1; }
# Use [[ ]] for conditionals in Bash
[[ -f "$file" ]] && echo "exists"
macOS Quick Commands
# Read/write preferences
defaults read com.apple.finder AppleShowAllFiles
defaults write com.apple.dock autohide -bool true
# Spotlight search
mdfind -name "file.txt"
mdfind "search term" -onlyin ~/Documents
# Clipboard
echo "text" | pbcopy
pbpaste
# Open files/URLs
open https://example.com
open -a "Visual Studio Code" file.txt
Service Management (launchd)
# Load/unload agents
launchctl load ~/Library/LaunchAgents/com.example.agent.plist
launchctl unload ~/Library/LaunchAgents/com.example.agent.plist
# Check plist syntax
plutil -lint com.example.agent.plist
Response Style
- Provide working, tested commands
- Include error handling where appropriate
- Warn about potentially destructive operations
- Suggest safer alternatives when risky commands are requested
- Note when
sudoor SIP disable is required - Distinguish macOS-specific from POSIX-portable solutions
Reference Guides
Load the relevant reference when working in that domain:
| Domain | Reference | Contents |
|---|---|---|
| launchd | references/launchd-patterns.md | Plist templates, scheduling, file watchers, keep-alive services |
| Shell Scripts | references/shell-patterns.md | Argument parsing, error handling, loops, temp files, logging |
| macOS Commands | references/macos-commands.md | defaults, mdfind, open, pbcopy, security, Homebrew |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
multi-model-meta-analysis
Synthesize outputs from multiple AI models into a comprehensive, verified assessment. Use when: (1) User pastes feedback/analysis from multiple LLMs (Claude, GPT, Gemini, etc.) about code or a project, (2) User wants to consolidate model outputs into a single reliable document, (3) User needs conflicting model claims resolved against actual source code. This skill verifies model claims against the codebase, resolves contradictions with evidence, and produces a more reliable assessment than any single model.
capture-learning
Analyze recent conversation context and capture learnings to project knowledge files (for project-specific insights) or skills/commands/subagents (for cross-project patterns). Use when the user asks to "capture this learning", "update the docs with this", "remember this for next time", "document this issue", "add this to CLAUDE.md", "save this knowledge", or "update project knowledge". Also triggers after resolving build/setup issues, discovering non-obvious patterns, or completing debugging sessions with valuable insights.
optimize-agent-docs
Build a retrieval-optimized knowledge layer over agent documentation in dotfiles (.claude, .codex, .cursor, .aider). Use when asked to "optimize docs", "improve agent knowledge", "make docs more efficient", or when documentation has accumulated and retrieval feels inefficient. Generates a manifest mapping task-contexts to knowledge chunks, optimizes information density, and creates compiled artifacts for efficient agent consumption.
agent-changelog
Compile an agent-optimized changelog by cross-referencing git history with plans and documentation. Use when asked to "update changelog", "compile history", "document project evolution", or proactively after major milestones, architectural changes, or when stale/deprecated information is detected that could confuse coding agents.
literate-guide
Create a narrative guide to a codebase or feature in the style of Knuth's Literate Programming — code and prose interwoven as a single essay, ordered for human understanding rather than compiler needs. Use when the user asks to 'explain this codebase as a story', 'write a literate guide', 'create a narrative walkthrough', 'tell the story of this code', 'Knuth-style documentation', 'weave a guide for this feature', or when they want deep, readable documentation that treats the program as literature. Also trigger when someone wants a document that a thoughtful reader could follow from start to finish and come away understanding both WHAT the code does and WHY every design choice was made.
autonomous-agent-readiness
Assess a codebase's readiness for autonomous agent development and provide tailored recommendations. Use when asked to evaluate how well a project supports unattended agent execution, assess development practices for agent autonomy, audit infrastructure for agent reliability, or improve a codebase for autonomous agent workflows. Triggers on requests like "assess this project for agent readiness", "how autonomous-ready is this codebase", "evaluate agent infrastructure", or "improve development practices for agents".
Didn't find tool you were looking for?