thearchitectit/agent-guardrails-template/sandbox-isolation
Claude Code and agent skill by thearchitectit/agent-guardrails-template
- community
Checking that the SKILL.md file is still in the repository.
Run untrusted or risky commands in Docker-based sandbox with resource limits and network isolation
Install
npx vskill@latest install thearchitectit/agent-guardrails-template/sandbox-isolationSKILL.md
Sandbox Isolation
The pi-guardrails extension provides a Docker-based sandbox for executing commands that might be risky, untrusted, or potentially destructive. Sandboxed commands run with network isolation, memory limits, and CPU constraints.
When To Use the Sandbox
Use the sandbox when:
- Running untrusted scripts from external sources
- Executing build commands in unfamiliar projects
- Testing destructive operations (file deletion, schema changes)
- Running user-provided code snippets
- Any command where the blast radius is unclear
Do NOT use the sandbox when:
- Running standard
git,read, oreditoperations - The command is well-understood and low-risk
- Docker is not available (check
isAvailablefirst)
How It Works
The sandbox wraps docker run with:
- No network access by default (
--network=none) - Read-only mounts for source code inspection
- Read-write mounts only for explicitly designated output paths
- Memory limits (e.g.,
512m) to prevent resource exhaustion - CPU limits (e.g.,
1.0core) to prevent CPU abuse - Timeouts (default 30s) to prevent hanging processes
- Auto-cleanup (
--rm) — containers are removed after execution
MCP Bridge
When connected, use guardrail_mcp with action sandbox_run:
The result includes exitCode, stdout, stderr, and timedOut fields.
Fallback When Docker Is Unavailable
If Docker is not installed or the daemon is not running, sandbox_run will return an error. In this case:
- Inform the user that sandbox is unavailable
- Ask for explicit permission before running the command outside the sandbox
- Proceed only after approval — do not assume consent
What To Do When a Sandbox Run Fails
- Exit code != 0: The command itself failed — investigate stderr
- timedOut: true: The command exceeded the timeout — increase or simplify the command
- exit code null: Docker failed to start — check Docker availability
References
- [[injection-defense]] — Detect injection in sandboxed command output
- [[output-security]] — Scan sandboxed output for secrets
- [[tool-permissions]] — Permission levels for sandbox use
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpi-extension/skills/sandbox-isolation/SKILL.md
Popularity
- Repository stars
- 78
- Repository forks
- 2
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thearchitectit/agent-guardrails-template/sandbox-isolation)