Ai Agent Sandbox
Description
A secure bubblewrap-based sandboxing solution for running Claude Code with strict filesystem isolation.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
AI Agent Sandbox Script
A secure bubblewrap-based sandboxing solution for running AI coding agents with strict filesystem isolation.
Features
- ✅ Whitelist-based filesystem access - Only explicitly allowed paths are readable
- ✅ Blacklist protection - Block sensitive files within working directory
- ✅ Full network access - Both local and internet access enabled
- ✅ Configurable environment - Optional
.envfiles and direct variables, no SSH agent access - ✅ Virtualenv support - Optionally expose the active Python virtual environment
- ✅ Working directory isolation - Full read-write only in current directory
Requirements
- bubblewrap - Install with:
- Debian/Ubuntu:
sudo apt install bubblewrap - Fedora:
sudo dnf install bubblewrap - Arch:
sudo pacman -S bubblewrap
- Debian/Ubuntu:
- An AI coding agent - Claude Code or OpenCode are currently supported
Installation
- Make the script executable:
chmod +x ai-agent-sandbox.sh
- (Optional) Move to a directory in your PATH:
sudo mv ai-agent-sandbox.sh /usr/local/bin/ai-agent-sandbox
- Create configuration directory:
mkdir -p ~/.config/ai-agent-sandbox
- Copy and customize the whitelist and blacklist files:
cp whitelist-example.txt ~/.config/ai-agent-sandbox/whitelist.txt
cp blacklist-example.txt ~/.config/ai-agent-sandbox/blacklist.txt
- Edit the files to match your needs:
nano ~/.config/ai-agent-sandbox/whitelist.txt
nano ~/.config/ai-agent-sandbox/blacklist.txt
Usage
Basic usage:
./ai-agent-sandbox.sh
Custom whitelist/blacklist:
# Single custom file (default file is still included)
./ai-agent-sandbox.sh \
--whitelist /path/to/my-whitelist.txt \
--blacklist /path/to/my-blacklist.txt
# Multiple whitelist/blacklist files
./ai-agent-sandbox.sh \
--whitelist ~/shared-whitelist.txt \
--whitelist ./project-whitelist.txt \
--blacklist ~/shared-blacklist.txt \
--blacklist
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI