macos-networking
WiFi/Ethernet, DNS, proxy, VPN Tailscale, airport CLI, pfctl firewall
What this skill does
# macos-networking ## Purpose This skill provides tools for managing macOS networking components, including WiFi, Ethernet, DNS, proxies, Tailscale VPN, and the pfctl firewall, to automate or assist in network configuration tasks. ## When to Use Use this skill when handling macOS-specific network operations, such as troubleshooting connectivity, configuring secure VPNs, managing DNS for applications, or enforcing firewall rules in scripts or user interactions. ## Key Capabilities - WiFi and Ethernet management via `networksetup` and `airport` CLI for connecting, scanning, or switching networks. - DNS configuration using `networksetup` to set servers like Google DNS (e.g., 8.8.8.8). - Proxy setup with `networksetup` for HTTP/SOCKS proxies, including authentication. - Tailscale VPN integration for peer-to-peer networking, requiring Tailscale CLI and an auth key. - Firewall control via `pfctl` for loading rulesets, enabling/disabling, and monitoring traffic. - Airport CLI (part of macOS) for wireless diagnostics, like scanning networks. - Specific tools: `networksetup` for most settings, `tailscale` for VPN, and `pfctl` for packet filtering. ## Usage Patterns Always run commands with elevated privileges using `sudo` where needed. For scripts, check if tools like `tailscale` are installed first. Use environment variables for sensitive data, e.g., export `TAILSCALE_AUTH_KEY=$SERVICE_API_KEY` before running Tailscale commands. Integrate with AI responses by generating bash snippets that users can copy-paste. Example 1: Switch to a specific WiFi network. - Use this pattern: First, scan networks with `airport en0 scan`, then connect via `networksetup -setairportnetwork en0 SSID password`. Example 2: Set up Tailscale VPN. - Authenticate and connect: Export your auth key as `export TAILSCALE_AUTH_KEY=$SERVICE_API_KEY`, then run `tailscale up --authkey=$TAILSCALE_AUTH_KEY`. ## Common Commands/API Use these exact commands in scripts or responses. All require macOS environment. - WiFi: Scan networks with `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 scan`. Connect: `sudo networksetup -setairportnetwork en0 "NetworkName" "Password"`. - Ethernet: Enable/disable: `sudo networksetup -setnetworkserviceenabled Ethernet on/off`. - DNS: Set servers for Wi-Fi: `sudo networksetup -setdnsservers Wi-Fi 8.8.8.8 8.8.4.4`. Flush cache: `sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder`. - Proxy: Set HTTP proxy: `sudo networksetup -setwebproxy Wi-Fi proxy.example.com 8080`. Enable with auth: `sudo networksetup -setwebproxyusername Wi-Fi username -setwebproxypassword Wi-Fi password`. - Tailscale VPN: Install via `brew install tailscale` if needed. Authenticate: `tailscale up --authkey=$TAILSCALE_AUTH_KEY`. Status: `tailscale status --json`. - pfctl Firewall: Load rules: `sudo pfctl -f /etc/pf.conf`. Enable: `sudo pfctl -e`. Block traffic: Add rule in /etc/pf.conf like `block in on en0 proto tcp from any to any port 80`, then reload. Code snippet for WiFi connection: ```bash #!/bin/bash network=$(airport en0 scan | grep -o 'SSID: .\+' | cut -d' ' -f2-) echo "Available networks: $network" sudo networksetup -setairportnetwork en0 "$1" "$2" ``` Code snippet for Tailscale setup: ```bash #!/bin/bash export TAILSCALE_AUTH_KEY=$SERVICE_API_KEY tailscale up --authkey=$TAILSCALE_AUTH_KEY tailscale status ``` ## Integration Notes Integrate by wrapping commands in AI-generated scripts. For Tailscale, ensure the auth key is passed via `$TAILSCALE_AUTH_KEY` to avoid hardcoding. Check dependencies: Use `command -v tailscale >/dev/null 2>&1 || brew install tailscale`. For pfctl, edit /etc/pf.conf directly or via scripts, then reload. Avoid conflicts with system services; use `launchctl` to manage related daemons, e.g., `sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.pfctl.plist`. Test in a non-production environment first. ## Error Handling Handle permissions with `sudo` for all root-required commands; catch failures by checking exit codes, e.g., if `$? -ne 0`, log "Command failed, check sudo access." For network errors, use `ping` to verify connectivity before proceeding. Tailscale auth failures: Check if `$TAILSCALE_AUTH_KEY` is set and valid; retry with `tailscale logout && tailscale up`. pfctl issues: If "no ALTQ support", ensure kernel extensions are loaded via `kextstat | grep pf`. Common: Interface not found errors (e.g., en0 missing)—use `ifconfig -l` to list available interfaces and adjust commands. ## Graph Relationships - Related to cluster: "macos" (e.g., shares dependencies with macos-file-system, macos-security skills). - Related by tags: "networking" (connects to general-networking skills), "vpn" (links to remote-access skills), "firewall" (associates with security-monitoring skills), "dns" (integrates with domain-resolution skills).
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.