[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75J1X3HP7008ZTJ1XSB9J4S":3,"skill-same:01M75J1X3HP7008ZTJ1XSB9J4S":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":6,"updatedAt":37,"install":38,"resources":51},"01M75J1X3HP7008ZTJ1XSB9J4S","seatbelt-sandboxer",null,"Generates minimal macOS Seatbelt sandbox configurations. Use when sandboxing, isolating, or restricting macOS applications with allowlist-based profiles.","agisota\u002Fold-one","agisota","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F121413592?v=4","01M75B4BRNT67EC1NDRT8QZEP2","01M75B4BS7QR9VP580MSCPTS3X",3,"MIT","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fseatbelt-sandboxer\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: seatbelt-sandboxer\ndescription: \"Generates minimal macOS Seatbelt sandbox configurations. Use when sandboxing, isolating, or restricting macOS applications with allowlist-based profiles.\"\nallowed-tools:\n  - Read\n  - Write\n  - Bash\n  - Glob\n  - Grep\n---\n\n# macOS Seatbelt Sandbox Profiling\n\nGenerate minimally-permissioned allowlist-based Seatbelt sandbox configurations for applications.\n\n## When to Use\n\n- User asks to \"sandbox\", \"isolate\", or \"restrict\" an application on macOS\n- Sandboxing any macOS process that needs restricted file\u002Fnetwork access\n- Creating defense-in-depth isolation if supply chain attacks are a concern\n\n## When NOT to Use\n\n- Linux containers (use seccomp-bpf, AppArmor, or namespaces instead)\n- Windows applications\n- Applications that legitimately need broad system access\n- Quick one-off scripts where sandboxing overhead isn't justified\n\n## Profiling Methodology\n\n### Step 1: Identify Application Requirements\n\nDetermine what the application needs across these resource categories:\n\n| Category | Operations | Common Use Cases |\n|----------|------------|------------------|\n| **File Read** | `file-read-data`, `file-read-metadata`, `file-read-xattr`, `file-test-existence`, `file-map-executable` | Reading source files, configs, libraries |\n| **File Write** | `file-write-data`, `file-write-create`, `file-write-unlink`, `file-write-mode`, `file-write-xattr`, `file-clone`, `file-link` | Output files, caches, temp files |\n| **Network** | `network-bind`, `network-inbound`, `network-outbound` | Servers, API calls, package downloads |\n| **Process** | `process-fork`, `process-exec`, `process-exec-interpreter`, `process-info*`, `process-codesigning*` | Spawning child processes, scripts |\n| **Mach IPC** | `mach-lookup`, `mach-register`, `mach-bootstrap`, `mach-task-name` | System services, XPC, notifications |\n| **POSIX IPC** | `ipc-posix-shm*`, `ipc-posix-sem*` | Shared memory, semaphores |\n| **Sysctl** | `sysctl-read`, `sysctl-write` | Reading system info (CPU, memory) |\n| **IOKit** | `iokit-open`, `iokit-get-properties`, `iokit-set-properties` | Hardware access, device drivers |\n| **Signals** | `signal` | Signal handling between processes |\n| **Pseudo-TTY** | `pseudo-tty` | Terminal emulation |\n| **System** | `system-fsctl`, `system-socket`, `system-audit`, `system-info` | Low-level system calls |\n| **User Prefs** | `user-preference-read`, `user-preference-write` | Reading\u002Fwriting user defaults |\n| **Notifications** | `darwin-notification-post`, `distributed-notification-post` | System notifications |\n| **AppleEvents** | `appleevent-send` | Inter-app communication (AppleScript) |\n| **Camera\u002FMic** | `device-camera`, `device-microphone` | Media capture |\n| **Dynamic Code** | `dynamic-code-generation` | JIT compilation |\n| **NVRAM** | `nvram-get`, `nvram-set`, `nvram-delete` | Firmware variables |\n\nFor each category, determine: **Needed?** and **Specific scope** (paths, services, etc.)\n\nIf the application has multiple subcommands that perform significantly different operations, such as `build` and `serve` commands for a Javascript bundler like Webpack, do the following:\n* Profile the subcommands separately\n* Create separate Sandbox configurations for each subcommand\n* Create a helper script that acts as a drop-in replacement for the original binary, executing the sandboxed application with the appropriate Seatbelt profile according to the subcommand passed.\n\n### Step 2: Start with Minimal Profile\n\nBegin with deny-all and essential process operations, saved in a suitably-named Seatbelt profile file with the `.sb` extension.\n\n```scheme\n(version 1)\n(deny default)\n\n;; Essential for any process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; Metadata access (stat, readdir) - doesn't expose file contents\n(allow file-read-metadata)\n```\n\n### Step 3: Add File Read Access (Allowlist)\n\nUse `file-read-data` (not `file-read*`) for allowlist-based reads:\n\n```scheme\n(allow file-read-data\n    ;; System paths (required for most runtimes)\n    (subpath \"\u002Fusr\")\n    (subpath \"\u002Fbin\")\n    (subpath \"\u002Fsbin\")\n    (subpath \"\u002FSystem\")\n    (subpath \"\u002FLibrary\")\n    (subpath \"\u002Fopt\")                    ;; Homebrew\n    (subpath \"\u002Fprivate\u002Fvar\")\n    (subpath \"\u002Fprivate\u002Fetc\")\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Fdev\")\n\n    ;; Root symlinks for path resolution\n    (literal \"\u002F\")\n    (literal \"\u002Fvar\")\n    (literal \"\u002Fetc\")\n    (literal \"\u002Ftmp\")\n    (literal \"\u002Fprivate\")\n\n    ;; Application-specific config (customize as needed)\n    (regex (string-append \"^\" (regex-quote (param \"HOME\")) \"\u002F\\\\.myapp(\u002F.*)?$\"))\n\n    ;; Working directory\n    (subpath (param \"WORKING_DIR\")))\n```\n\n**Why `file-read-data` instead of `file-read*`?**\n- `file-read*` allows ALL file read operations including from any path\n- `file-read-data` only allows reading file contents from listed paths\n- Combined with `file-read-metadata` (allowed broadly), this gives:\n  - ✅ Can stat\u002Freaddir anywhere (needed for path resolution)\n  - ❌ Cannot read contents of files outside allowlist\n\n### Step 4: Add File Write Access (Restricted)\n\n```scheme\n(allow file-write*\n    ;; Working directory only\n    (subpath (param \"WORKING_DIR\"))\n\n    ;; Temp directories\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Ftmp\")\n    (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n\n    ;; Device files for output\n    (literal \"\u002Fdev\u002Fnull\")\n    (literal \"\u002Fdev\u002Ftty\"))\n```\n\n### Step 5: Configure Network\n\nThree levels of network access:\n\n```scheme\n;; OPTION 1: Block all network (most restrictive - use for build tools)\n(deny network*)\n\n;; OPTION 2: Localhost only (use for dev servers, local services)\n;; Bind to local ports\n(allow network-bind (local tcp \"*:*\"))\n;; Accept inbound connections\n(allow network-inbound (local tcp \"*:*\"))\n;; Outbound to localhost + DNS only\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")  ;; DNS resolution\n    (remote ip \"localhost:*\"))                   ;; localhost only\n\n;; OPTION 3: Allow all network (least restrictive - avoid if possible)\n(allow network*)\n```\n\n**Network filter syntax:**\n- `(local tcp \"*:*\")` - any local TCP port\n- `(local tcp \"*:8080\")` - specific local port\n- `(remote ip \"localhost:*\")` - outbound to localhost only\n- `(remote tcp)` - outbound TCP to any host\n- `(literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")` - Unix socket for DNS\n\n### Step 6: Test Iteratively\n\nAfter you generate or edit the Seatbelt profile, test the functionality of the target application in the sandbox. If anything fails to work, revise the Seatbelt profile. Repeat this process iteratively until you have generated a minimally-permissioned Seatbelt file and have confirmed empirically that the application works normally when sandboxed using the Seatbelt profile you generated.\n\nIf the program requires external input to function fully (such as a Javascript bundler that needs an application to bundle), find sample inputs from well-known, ideally official sources. For instance, these example projects for the Rspack bundler: https:\u002F\u002Fgithub.com\u002Frstackjs\u002Frstack-examples\u002Ftree\u002Fmain\u002Frspack\u002F\n\n```bash\n# Test basic execution\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \u002Fbin\u002Fecho \"test\"\n\n# Test the actual application\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication --args\n\n# Test security restrictions\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Ftmp -D HOME=$HOME \\\n  cat ~\u002F.ssh\u002Fid_rsa\n# Expected: Operation not permitted\n```\n\n**Common failure modes:**\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Exit code 134 (SIGABRT) | Sandbox violation | Check which operation is blocked |\n| Exit code 65 + syntax error | Invalid profile syntax | Check Seatbelt syntax |\n| `ENOENT` for existing files | Missing `file-read-metadata` | Add `(allow file-read-metadata)` |\n| Process hangs | Missing IPC permissions | Add `(allow mach-lookup)` if needed |\n\n## Seatbelt Syntax Reference\n\n### Path Filters\n```scheme\n(subpath \"\u002Fpath\")           ;; \u002Fpath and all descendants\n(literal \"\u002Fpath\u002Ffile\")      ;; Exact path only\n(regex \"^\u002Fpath\u002F.*\\\\.js$\")   ;; Regex match\n```\n\n### Parameter Substitution\n```scheme\n(param \"WORKING_DIR\")                                    ;; Direct use\n(subpath (param \"WORKING_DIR\"))                          ;; In subpath\n(string-append (param \"HOME\") \"\u002F.config\")                ;; Concatenation\n(regex-quote (param \"HOME\"))                             ;; Escape for regex\n```\n\n### Operations\n\n**File operations:**\n```scheme\n(allow file-read-data ...)          ;; Read file contents\n(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)\n(allow file-read-xattr ...)         ;; Read extended attributes\n(allow file-test-existence ...)     ;; Check if file exists\n(allow file-map-executable ...)     ;; mmap executable (dylibs)\n(allow file-write-data ...)         ;; Write to existing files\n(allow file-write-create ...)       ;; Create new files\n(allow file-write-unlink ...)       ;; Delete files\n(allow file-write* ...)             ;; All write operations\n(allow file-read* ...)              ;; All read operations (use sparingly)\n```\n\n**Process operations:**\n```scheme\n(allow process-exec* ...)           ;; Execute binaries\n(allow process-fork)                ;; Fork child processes\n(allow process-info-pidinfo)        ;; Query process info\n(allow signal)                      ;; Send\u002Freceive signals\n```\n\n**Network operations:**\n```scheme\n(allow network-bind (local tcp \"*:*\"))              ;; Bind to any local TCP port\n(allow network-bind (local tcp \"*:8080\"))           ;; Bind to specific port\n(allow network-inbound (local tcp \"*:*\"))           ;; Accept TCP connections\n(allow network-outbound (remote ip \"localhost:*\"))  ;; Outbound to localhost only\n(allow network-outbound (remote tcp))               ;; Outbound TCP to any host\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\"))     ;; DNS via Unix socket\n(allow network*)                                    ;; All network (use sparingly)\n(deny network*)                                     ;; Block all network\n```\n\n**IPC operations:**\n```scheme\n(allow mach-lookup ...)             ;; Mach IPC lookups\n(allow mach-register ...)           ;; Register Mach services\n(allow ipc-posix-shm* ...)          ;; POSIX shared memory\n(allow ipc-posix-sem* ...)          ;; POSIX semaphores\n```\n\n**System operations:**\n```scheme\n(allow sysctl-read)                 ;; Read system info\n(allow sysctl-write ...)            ;; Modify sysctl (rare)\n(allow iokit-open ...)              ;; IOKit device access\n(allow pseudo-tty)                  ;; Terminal emulation\n(allow dynamic-code-generation)     ;; JIT compilation\n(allow user-preference-read ...)    ;; Read user defaults\n```\n\n## Known Limitations\n\n1. **Deprecated but functional**: Apple deprecated sandbox-exec but it works through macOS 14+\n2. **Temp directory access often required**: Many applications need `\u002Ftmp` and `\u002Fvar\u002Ffolders`\n\n## Example: Generic CLI Application\n\n```scheme\n(version 1)\n(deny default)\n\n;; Process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; File metadata (path resolution)\n(allow file-read-metadata)\n\n;; File reads (allowlist)\n(allow file-read-data\n    (literal \"\u002F\") (literal \"\u002Fvar\") (literal \"\u002Fetc\") (literal \"\u002Ftmp\") (literal \"\u002Fprivate\")\n    (subpath \"\u002Fusr\") (subpath \"\u002Fbin\") (subpath \"\u002Fsbin\") (subpath \"\u002Fopt\")\n    (subpath \"\u002FSystem\") (subpath \"\u002FLibrary\") (subpath \"\u002Fdev\")\n    (subpath \"\u002Fprivate\u002Fvar\") (subpath \"\u002Fprivate\u002Fetc\") (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath (param \"WORKING_DIR\")))\n\n;; File writes (restricted)\n(allow file-write*\n    (subpath (param \"WORKING_DIR\"))\n    (subpath \"\u002Fprivate\u002Ftmp\") (subpath \"\u002Ftmp\") (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n    (literal \"\u002Fdev\u002Fnull\") (literal \"\u002Fdev\u002Ftty\"))\n\n;; Network disabled\n(deny network*)\n```\n\n**Usage:**\n```bash\nsandbox-exec -f profile.sb \\\n  -D WORKING_DIR=\u002Fpath\u002Fto\u002Fproject \\\n  -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication\n```\n\n## References\n\n- [Apple Sandbox Guide (reverse-engineered)](https:\u002F\u002Freverse.put.as\u002Fwp-content\u002Fuploads\u002F2011\u002F09\u002FApple-Sandbox-Guide-v1.0.pdf)\n- [sandbox-exec man page](https:\u002F\u002Fkeith.github.io\u002Fxcode-man-pages\u002Fsandbox-exec.1.html)\n","# macOS Seatbelt Sandbox Profiling\n\nGenerate minimally-permissioned allowlist-based Seatbelt sandbox configurations for applications.\n\n## When to Use\n\n- User asks to \"sandbox\", \"isolate\", or \"restrict\" an application on macOS\n- Sandboxing any macOS process that needs restricted file\u002Fnetwork access\n- Creating defense-in-depth isolation if supply chain attacks are a concern\n\n## When NOT to Use\n\n- Linux containers (use seccomp-bpf, AppArmor, or namespaces instead)\n- Windows applications\n- Applications that legitimately need broad system access\n- Quick one-off scripts where sandboxing overhead isn't justified\n\n## Profiling Methodology\n\n### Step 1: Identify Application Requirements\n\nDetermine what the application needs across these resource categories:\n\n| Category | Operations | Common Use Cases |\n|----------|------------|------------------|\n| **File Read** | `file-read-data`, `file-read-metadata`, `file-read-xattr`, `file-test-existence`, `file-map-executable` | Reading source files, configs, libraries |\n| **File Write** | `file-write-data`, `file-write-create`, `file-write-unlink`, `file-write-mode`, `file-write-xattr`, `file-clone`, `file-link` | Output files, caches, temp files |\n| **Network** | `network-bind`, `network-inbound`, `network-outbound` | Servers, API calls, package downloads |\n| **Process** | `process-fork`, `process-exec`, `process-exec-interpreter`, `process-info*`, `process-codesigning*` | Spawning child processes, scripts |\n| **Mach IPC** | `mach-lookup`, `mach-register`, `mach-bootstrap`, `mach-task-name` | System services, XPC, notifications |\n| **POSIX IPC** | `ipc-posix-shm*`, `ipc-posix-sem*` | Shared memory, semaphores |\n| **Sysctl** | `sysctl-read`, `sysctl-write` | Reading system info (CPU, memory) |\n| **IOKit** | `iokit-open`, `iokit-get-properties`, `iokit-set-properties` | Hardware access, device drivers |\n| **Signals** | `signal` | Signal handling between processes |\n| **Pseudo-TTY** | `pseudo-tty` | Terminal emulation |\n| **System** | `system-fsctl`, `system-socket`, `system-audit`, `system-info` | Low-level system calls |\n| **User Prefs** | `user-preference-read`, `user-preference-write` | Reading\u002Fwriting user defaults |\n| **Notifications** | `darwin-notification-post`, `distributed-notification-post` | System notifications |\n| **AppleEvents** | `appleevent-send` | Inter-app communication (AppleScript) |\n| **Camera\u002FMic** | `device-camera`, `device-microphone` | Media capture |\n| **Dynamic Code** | `dynamic-code-generation` | JIT compilation |\n| **NVRAM** | `nvram-get`, `nvram-set`, `nvram-delete` | Firmware variables |\n\nFor each category, determine: **Needed?** and **Specific scope** (paths, services, etc.)\n\nIf the application has multiple subcommands that perform significantly different operations, such as `build` and `serve` commands for a Javascript bundler like Webpack, do the following:\n* Profile the subcommands separately\n* Create separate Sandbox configurations for each subcommand\n* Create a helper script that acts as a drop-in replacement for the original binary, executing the sandboxed application with the appropriate Seatbelt profile according to the subcommand passed.\n\n### Step 2: Start with Minimal Profile\n\nBegin with deny-all and essential process operations, saved in a suitably-named Seatbelt profile file with the `.sb` extension.\n\n```scheme\n(version 1)\n(deny default)\n\n;; Essential for any process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; Metadata access (stat, readdir) - doesn't expose file contents\n(allow file-read-metadata)\n```\n\n### Step 3: Add File Read Access (Allowlist)\n\nUse `file-read-data` (not `file-read*`) for allowlist-based reads:\n\n```scheme\n(allow file-read-data\n    ;; System paths (required for most runtimes)\n    (subpath \"\u002Fusr\")\n    (subpath \"\u002Fbin\")\n    (subpath \"\u002Fsbin\")\n    (subpath \"\u002FSystem\")\n    (subpath \"\u002FLibrary\")\n    (subpath \"\u002Fopt\")                    ;; Homebrew\n    (subpath \"\u002Fprivate\u002Fvar\")\n    (subpath \"\u002Fprivate\u002Fetc\")\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Fdev\")\n\n    ;; Root symlinks for path resolution\n    (literal \"\u002F\")\n    (literal \"\u002Fvar\")\n    (literal \"\u002Fetc\")\n    (literal \"\u002Ftmp\")\n    (literal \"\u002Fprivate\")\n\n    ;; Application-specific config (customize as needed)\n    (regex (string-append \"^\" (regex-quote (param \"HOME\")) \"\u002F\\\\.myapp(\u002F.*)?$\"))\n\n    ;; Working directory\n    (subpath (param \"WORKING_DIR\")))\n```\n\n**Why `file-read-data` instead of `file-read*`?**\n- `file-read*` allows ALL file read operations including from any path\n- `file-read-data` only allows reading file contents from listed paths\n- Combined with `file-read-metadata` (allowed broadly), this gives:\n  - ✅ Can stat\u002Freaddir anywhere (needed for path resolution)\n  - ❌ Cannot read contents of files outside allowlist\n\n### Step 4: Add File Write Access (Restricted)\n\n```scheme\n(allow file-write*\n    ;; Working directory only\n    (subpath (param \"WORKING_DIR\"))\n\n    ;; Temp directories\n    (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath \"\u002Ftmp\")\n    (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n\n    ;; Device files for output\n    (literal \"\u002Fdev\u002Fnull\")\n    (literal \"\u002Fdev\u002Ftty\"))\n```\n\n### Step 5: Configure Network\n\nThree levels of network access:\n\n```scheme\n;; OPTION 1: Block all network (most restrictive - use for build tools)\n(deny network*)\n\n;; OPTION 2: Localhost only (use for dev servers, local services)\n;; Bind to local ports\n(allow network-bind (local tcp \"*:*\"))\n;; Accept inbound connections\n(allow network-inbound (local tcp \"*:*\"))\n;; Outbound to localhost + DNS only\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")  ;; DNS resolution\n    (remote ip \"localhost:*\"))                   ;; localhost only\n\n;; OPTION 3: Allow all network (least restrictive - avoid if possible)\n(allow network*)\n```\n\n**Network filter syntax:**\n- `(local tcp \"*:*\")` - any local TCP port\n- `(local tcp \"*:8080\")` - specific local port\n- `(remote ip \"localhost:*\")` - outbound to localhost only\n- `(remote tcp)` - outbound TCP to any host\n- `(literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\")` - Unix socket for DNS\n\n### Step 6: Test Iteratively\n\nAfter you generate or edit the Seatbelt profile, test the functionality of the target application in the sandbox. If anything fails to work, revise the Seatbelt profile. Repeat this process iteratively until you have generated a minimally-permissioned Seatbelt file and have confirmed empirically that the application works normally when sandboxed using the Seatbelt profile you generated.\n\nIf the program requires external input to function fully (such as a Javascript bundler that needs an application to bundle), find sample inputs from well-known, ideally official sources. For instance, these example projects for the Rspack bundler: https:\u002F\u002Fgithub.com\u002Frstackjs\u002Frstack-examples\u002Ftree\u002Fmain\u002Frspack\u002F\n\n```bash\n# Test basic execution\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \u002Fbin\u002Fecho \"test\"\n\n# Test the actual application\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Fpath -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication --args\n\n# Test security restrictions\nsandbox-exec -f profile.sb -D WORKING_DIR=\u002Ftmp -D HOME=$HOME \\\n  cat ~\u002F.ssh\u002Fid_rsa\n# Expected: Operation not permitted\n```\n\n**Common failure modes:**\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Exit code 134 (SIGABRT) | Sandbox violation | Check which operation is blocked |\n| Exit code 65 + syntax error | Invalid profile syntax | Check Seatbelt syntax |\n| `ENOENT` for existing files | Missing `file-read-metadata` | Add `(allow file-read-metadata)` |\n| Process hangs | Missing IPC permissions | Add `(allow mach-lookup)` if needed |\n\n## Seatbelt Syntax Reference\n\n### Path Filters\n```scheme\n(subpath \"\u002Fpath\")           ;; \u002Fpath and all descendants\n(literal \"\u002Fpath\u002Ffile\")      ;; Exact path only\n(regex \"^\u002Fpath\u002F.*\\\\.js$\")   ;; Regex match\n```\n\n### Parameter Substitution\n```scheme\n(param \"WORKING_DIR\")                                    ;; Direct use\n(subpath (param \"WORKING_DIR\"))                          ;; In subpath\n(string-append (param \"HOME\") \"\u002F.config\")                ;; Concatenation\n(regex-quote (param \"HOME\"))                             ;; Escape for regex\n```\n\n### Operations\n\n**File operations:**\n```scheme\n(allow file-read-data ...)          ;; Read file contents\n(allow file-read-metadata)          ;; stat, lstat, readdir (no contents)\n(allow file-read-xattr ...)         ;; Read extended attributes\n(allow file-test-existence ...)     ;; Check if file exists\n(allow file-map-executable ...)     ;; mmap executable (dylibs)\n(allow file-write-data ...)         ;; Write to existing files\n(allow file-write-create ...)       ;; Create new files\n(allow file-write-unlink ...)       ;; Delete files\n(allow file-write* ...)             ;; All write operations\n(allow file-read* ...)              ;; All read operations (use sparingly)\n```\n\n**Process operations:**\n```scheme\n(allow process-exec* ...)           ;; Execute binaries\n(allow process-fork)                ;; Fork child processes\n(allow process-info-pidinfo)        ;; Query process info\n(allow signal)                      ;; Send\u002Freceive signals\n```\n\n**Network operations:**\n```scheme\n(allow network-bind (local tcp \"*:*\"))              ;; Bind to any local TCP port\n(allow network-bind (local tcp \"*:8080\"))           ;; Bind to specific port\n(allow network-inbound (local tcp \"*:*\"))           ;; Accept TCP connections\n(allow network-outbound (remote ip \"localhost:*\"))  ;; Outbound to localhost only\n(allow network-outbound (remote tcp))               ;; Outbound TCP to any host\n(allow network-outbound\n    (literal \"\u002Fprivate\u002Fvar\u002Frun\u002FmDNSResponder\"))     ;; DNS via Unix socket\n(allow network*)                                    ;; All network (use sparingly)\n(deny network*)                                     ;; Block all network\n```\n\n**IPC operations:**\n```scheme\n(allow mach-lookup ...)             ;; Mach IPC lookups\n(allow mach-register ...)           ;; Register Mach services\n(allow ipc-posix-shm* ...)          ;; POSIX shared memory\n(allow ipc-posix-sem* ...)          ;; POSIX semaphores\n```\n\n**System operations:**\n```scheme\n(allow sysctl-read)                 ;; Read system info\n(allow sysctl-write ...)            ;; Modify sysctl (rare)\n(allow iokit-open ...)              ;; IOKit device access\n(allow pseudo-tty)                  ;; Terminal emulation\n(allow dynamic-code-generation)     ;; JIT compilation\n(allow user-preference-read ...)    ;; Read user defaults\n```\n\n## Known Limitations\n\n1. **Deprecated but functional**: Apple deprecated sandbox-exec but it works through macOS 14+\n2. **Temp directory access often required**: Many applications need `\u002Ftmp` and `\u002Fvar\u002Ffolders`\n\n## Example: Generic CLI Application\n\n```scheme\n(version 1)\n(deny default)\n\n;; Process\n(allow process-exec*)\n(allow process-fork)\n(allow sysctl-read)\n\n;; File metadata (path resolution)\n(allow file-read-metadata)\n\n;; File reads (allowlist)\n(allow file-read-data\n    (literal \"\u002F\") (literal \"\u002Fvar\") (literal \"\u002Fetc\") (literal \"\u002Ftmp\") (literal \"\u002Fprivate\")\n    (subpath \"\u002Fusr\") (subpath \"\u002Fbin\") (subpath \"\u002Fsbin\") (subpath \"\u002Fopt\")\n    (subpath \"\u002FSystem\") (subpath \"\u002FLibrary\") (subpath \"\u002Fdev\")\n    (subpath \"\u002Fprivate\u002Fvar\") (subpath \"\u002Fprivate\u002Fetc\") (subpath \"\u002Fprivate\u002Ftmp\")\n    (subpath (param \"WORKING_DIR\")))\n\n;; File writes (restricted)\n(allow file-write*\n    (subpath (param \"WORKING_DIR\"))\n    (subpath \"\u002Fprivate\u002Ftmp\") (subpath \"\u002Ftmp\") (subpath \"\u002Fprivate\u002Fvar\u002Ffolders\")\n    (literal \"\u002Fdev\u002Fnull\") (literal \"\u002Fdev\u002Ftty\"))\n\n;; Network disabled\n(deny network*)\n```\n\n**Usage:**\n```bash\nsandbox-exec -f profile.sb \\\n  -D WORKING_DIR=\u002Fpath\u002Fto\u002Fproject \\\n  -D HOME=$HOME \\\n  \u002Fpath\u002Fto\u002Fapplication\n```\n\n## References\n\n- [Apple Sandbox Guide (reverse-engineered)](https:\u002F\u002Freverse.put.as\u002Fwp-content\u002Fuploads\u002F2011\u002F09\u002FApple-Sandbox-Guide-v1.0.pdf)\n- [sandbox-exec man page](https:\u002F\u002Fkeith.github.io\u002Fxcode-man-pages\u002Fsandbox-exec.1.html)\n",{"name":5,"description":7,"allowed-tools":23},[24,25,26,27,28],"Read","Write","Bash","Glob","Grep","main","f37de8f681f0c0ca0e0ebab6e5fddf764ca7553d","skills\u002Fseatbelt-sandboxer",1,"https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one","https:\u002F\u002Fagisota.github.io\u002Fold-one\u002F","https:\u002F\u002Fgithub.com\u002Fagisota","pzd.world","2026-07-04 22:32:06",{"source":8,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add agisota\u002Fold-one --skill seatbelt-sandboxer",{"tool":44,"command":45},"bunx","bunx skills add agisota\u002Fold-one --skill seatbelt-sandboxer",{"tool":47,"command":48},"pnpm","pnpm dlx skills add agisota\u002Fold-one --skill seatbelt-sandboxer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fseatbelt-sandboxer\u002FSKILL.md",true,[],[53,60,67,76,83,90],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":18},"01M75KRGZWQWE9JDBS6RX42NWV","zoom-out","Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzoom-out\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":18},"01M75KRCZHKE0ZYAQFFYHS0YNP","zeroize-audit","Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with assembly-level analysis, and control-flow verification. Use for auditing C\u002FC++\u002FRust code handling secrets, keys, passwords, or other sensitive data.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fzeroize-audit\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":71,"licenseFileUrl":72,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":18},"01M75KR94KYQ30DTE1P9WNDAE0","yeet","Use only when the user explicitly asks to stage, commit, push, and open a GitHub pull request in one flow using the GitHub CLI (`gh`).","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M75KR3H13YJ9QHMD49818FA1","yara-rule-authoring","Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules. Covers naming conventions, string selection, performance optimization, migration from legacy YARA, and false positive reduction. Triggers on: YARA, YARA-X, malware detection, threat hunting, IOC, signature, crx module, dex module.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fyara-rule-authoring\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M75KQMPY8A4Y8XTDD2DT0M9T","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M75KQHNZ0ANZNJGZY6M8MDAK","x-api","X\u002FTwitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.","https:\u002F\u002Fgithub.com\u002Fagisota\u002Fold-one\u002Fblob\u002Fmain\u002Fskills\u002Fx-api\u002FSKILL.md",[],[]]