macos
macOS system overview and general orchestration
What this skill does
# macos
## Purpose
This skill enables OpenClaw to provide macOS system overviews and orchestrate tasks like file management, process control, and app interactions, leveraging macOS-specific APIs and CLI tools for efficient automation.
## When to Use
Use this skill for macOS-exclusive tasks, such as managing user permissions, monitoring system resources, automating app launches, or integrating with Apple ecosystem tools. Apply it when the agent needs to handle Apple-specific environments, like scripting for macOS-only workflows or troubleshooting hardware interactions.
## Key Capabilities
- Access macOS CLI commands for file operations, e.g., listing directories with permissions.
- Orchestrate system processes using `launchctl` for service management.
- Interact with Apple APIs, like Foundation framework for file I/O.
- Monitor system metrics via `sysctl` or `top`, and handle app-specific events using AppleScript.
- Manage configurations in plist XML format for system preferences or app settings.
## Usage Patterns
Invoke this skill by specifying the "macos" ID in OpenClaw queries, e.g., prefix with "use skill: macos" for context. Always check for macOS version compatibility using `sw_vers` before executing commands. For orchestration, chain tasks like file checks followed by process starts. Use environment variables for sensitive data, e.g., set `$APPLE_API_KEY` for authenticated API calls. Structure requests as JSON payloads with fields like {"action": "run_command", "command": "ls -l"}.
## Common Commands/API
- Use `ls -l` to list files with detailed permissions; example: run via subprocess in Python: `import subprocess; subprocess.run(['ls', '-l', '/path'])`.
- Manage services with `launchctl load /path/to/plist` for starting daemons; snippet: `subprocess.run(['launchctl', 'load', '-w', '/Library/LaunchDaemons/com.example.plist'])`.
- Query system info via `sysctl -n hw.memsize` for memory size; code: `output = subprocess.check_output(['sysctl', '-n', 'hw.memsize']).decode().strip()`.
- Open files with `open -a "Application" file.path`; e.g., `subprocess.run(['open', '-a', 'TextEdit', 'document.txt'])`.
- AppleScript integration: Use `osascript -e 'tell app "Finder" to open document file "path"'`; snippet: `subprocess.run(['osascript', '-e', 'tell app "Finder" to display dialog "Hello"'])`.
If API keys are needed for extended services (e.g., Apple Developer APIs), reference them as `$APPLE_DEVELOPER_KEY` in environment variables.
## Integration Notes
Integrate this skill with other OpenClaw skills by linking via clusters, e.g., combine with "system" cluster for cross-platform tasks. For config files, parse plist XML using Python's `plistlib` module: `import plistlib; with open('config.plist', 'rb') as f: data = plistlib.load(f)`. Ensure compatibility by checking macOS version with `subprocess.run(['sw_vers', '-productVersion'])` and adjust commands accordingly, e.g., use `xattr` for extended attributes on macOS 10.10+. When integrating with tools like Homebrew, prefix commands with `brew --prefix` for paths. Always sandbox operations using `sandbox-exec` for security.
## Error Handling
Handle permission errors by checking for `Operation not permitted` and prefix commands with `sudo` if needed, e.g., wrap in try-except: `try: subprocess.run(['command']) except subprocess.CalledProcessError as e: log_error(e, "Permission issue; use sudo")`. For API failures, verify `$APPLE_API_KEY` is set and catch HTTP errors like 401 Unauthorized. Common issues: File not found—use `os.path.exists('/path')` before operations; Process timeouts—set timeouts in subprocess calls, e.g., `subprocess.run(['command'], timeout=10)`. Log errors with macOS's `syslog` via `logger` command for auditing.
## Concrete Usage Examples
1. **Automate file backup**: To back up a directory, use this pattern: First, check disk space with `df -h /`, then copy files: `subprocess.run(['cp', '-R', '/source/dir', '/backup/dir'])`. In OpenClaw, query: "use skill: macos; backup /Documents to /Backup if disk space > 10GB".
2. **Monitor system resources**: Query CPU usage with `top -l 1 | grep "CPU usage"`, then alert if >80%: `import re; output = subprocess.check_output(['top', '-l', '1']); if re.search(r'CPU usage: \d+\.\d+% user', output) and float(match) > 80: send_alert()`. In OpenClaw: "use skill: macos; monitor CPU and notify if usage exceeds 80%".
## Graph Relationships
- Related to cluster: macos (direct link for system tasks).
- Connects to skills: ["apple"] for ecosystem integrations, ["system"] for general OS operations.
- Dependencies: Requires "core" cluster for basic execution; provides outputs to "automation" cluster for workflow chaining.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.