janvojt

AI Agent Sandbox — AI skill for Claude Code

AI community

A secure bubblewrap-based sandboxing solution for running Claude Code with strict filesystem isolation.

How to install AI Agent Sandbox

This entry records only its repository, not the path inside it, so there is no exact command to give. Open janvojt/ai-agent-sandbox and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What AI Agent Sandbox does

A secure bubblewrap-based sandboxing solution for running Claude Code with strict filesystem isolation.

Alternatives in AI

  • Anthropic Quickstarts — by Anthropic - Offers comprehensive development guides for three distinct AI-powered demo projects with standa 15.4k ★
  • Codex Skill — by klaudworks - Enables users to prompt codex from claude code 914 ★
  • Recomby Geo — GEO 领域 AI 员工开源方案 · Open-source GEO AI-employee solution (MIT) 449 ★

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 .env files 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
  • An AI coding agent - Claude Code or OpenCode are currently supported

Installation

  1. Make the script executable:
chmod +x ai-agent-sandbox.sh
  1. (Optional) Move to a directory in your PATH:
sudo mv ai-agent-sandbox.sh /usr/local/bin/ai-agent-sandbox
  1. Create configuration directory:
mkdir -p ~/.config/ai-agent-sandbox
  1. 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
  1. 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