| name | enclave |
| description | A sandbox environment. Only use this skill when running inside the sandbox (ENCLAVE_SANDBOX=1). If not in the sandbox, this skill is not needed. Use it when you need to check sandbox status or execute commands outside the sandbox. |
Enclave
The enclave command is a tool for managing a sandboxed environment on macOS.
It uses Apple's sandbox-exec to restrict access to unnecessary system resources.
Checking the Sandbox Status
Verify whether you are running inside the sandbox:
echo $ENCLAVE_SANDBOX
Checking the Sandbox Profile
To inspect the full sandbox-exec profile in effect (useful for troubleshooting permission errors):
enclave profile
Checking the Effective Configuration
Use the config subcommand to see the current effective configuration, including which config files are loaded and what commands are allowed for sandbox-bypass execution:
enclave config
Inside the sandbox, enclave config automatically reads the effective configuration that was resolved at startup (stored in $ENCLAVE_CONFIG), so it always reflects the actual settings in effect regardless of the current directory.
Example output:
sandbox_profile = ""
unboxexec_allowed_commands = [
"^playwright-cli",
]
Executing Commands Outside the Sandbox
The enclave unboxexec subcommand executes commands outside the sandbox.
Important: enclave unboxexec bypasses sandbox protections. You MUST ask for explicit user approval before using it, UNLESS the command is listed in unboxexec_allowed_commands.
Basic Usage
enclave unboxexec [<options>] -- <command> [<args...>]
Options
| Flag | Short | Description |
|---|
--dir | -C | Specify the working directory for the command |
--timeout | -t | Timeout in seconds (default: 60 seconds) |
--env | -e | Specify environment variables in KEY=VALUE format (can be specified multiple times) |
Examples
enclave unboxexec -- echo "hello from outside"
enclave unboxexec --dir /tmp -- ls -la
enclave unboxexec --timeout 300 -- long-running-command
enclave unboxexec --env API_KEY=secret --env DEBUG=1 -- my-command
Troubleshooting: When a Command Fails
When you need to run a command that may fail due to sandbox restrictions:
- Try running the command normally inside the sandbox
- If it fails with a permission error, try
enclave unboxexec -- <command>
- If that also fails, run
enclave config and check unboxexec_allowed_commands
- If the command matches an allowed pattern → it should be permitted; investigate the error further
- If the command does NOT match → ask the user for explicit approval before retrying