# Add to your Claude Code skills
git clone https://github.com/tommy0103/blackholeblackhole is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tommy0103. A blackhole for your Claude Code. It has 113 GitHub stars.
blackhole's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/tommy0103/blackhole" and add it to your Claude Code skills directory (see the Installation section above).
blackhole is primarily written in Shell. It is open-source under tommy0103 on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh blackhole against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
English · 中文
Run Claude Code in a Linux container using Colima on macOS or an existing Docker engine on Linux/Windows WSL2. Only the current project directory is mounted, and login volumes persist between sessions. Windows clipboard capture and proxy-only network access are available on WSL2.
Running claude directly on a macOS host exposes two things at once: your local filesystem (~/.ssh, cloud credentials, Docker sockets, sibling repositories) and your host environment fingerprint (macOS hardware identifiers, locale/timezone settings, host username, environment variables, and direct network interfaces if a proxy drops).
Blackhole replaces the host claude command with a pure Bash launcher (~/.local/bin/claude -> bin/blackhole). Claude Code does not need to be installed on the host — the actual @anthropic-ai/claude-code package lives inside the Docker image. Typing claude in a project starts an ephemeral Linux container using Colima on macOS or the existing Docker engine on Linux/WSL2. The Colima features below have Docker equivalents described under installation and network control:
$PWD is mounted at /workspace over Colima's virtiofs. Host $HOME, SSH agents, and Docker sockets are never mounted.--hostname blackhole, a remapped node user matching /workspace UID/GID, and a strict environment variable allowlist (TERM, COLORTERM, NO_COLOR, and optional API keys) — hiding macOS host telemetry, usernames, and environment variables.net ipv6 off, guest iptables airgap (net off), and a fail-close proxy watcher (net-watch) with a companion heartbeat guard ensure VMs are immediately cut off if your host TUN proxy drops, preventing accidental direct-connection IP leaks.blackhole-claude-home-<profile>), with SessionStart / SessionEnd hooks tracking profile <-> session <-> host path.$TMPDIR are mirrored read-only at identical paths inside the container, while a persistent magenta ⬤ BLACKHOLE status line badge makes isolated sessions unmistakable.Tip: Let an agent drive it. You do not need to memorize every subcommand below. Point your host coding agent at this repository (see
AGENTS.md) and let it handle setup, Colima profile binding,.blackhole/Dockerfiletool customization,net-watchprotection, and session exports or migrations on your behalf.
Run claude inside any project directory under $HOME:
$ cd ~/Code/my-app
$ claude
⬤ BLACKHOLE Colima VM isolated session · default
/Users/you/Code/my-app (only this directory is mounted)
All standard arguments pass straight through to Claude Code inside the VM:
claude -p "explain this repository"
claude --resume
Check launcher protection, image state, and active containers from another terminal:
$ blackhole status
Backend: colima
Profile: default
Claude launcher: protected (/Users/you/.local/bin/claude)
Colima: running
Image: blackhole-claude:latest
Image status: built
Claude Code: 1.0.x (Claude Code)
Image ID: sha256:...
Config volume: blackhole-claude-home-default
Active sessions:
blackhole-default-48210 /Users/you/Code/my-app
Bind a project directory to a dedicated Colima VM profile (inherited by subdirectories, stored in ~/.blackhole/bindings/ outside the repo):
$ cd ~/Code/heavy-repo
$ blackhole bind work
blackhole: bound /Users/you/Code/heavy-repo -> profile 'work'
Inspect profiles, recorded sessions across all running VMs, and resume any session by ID prefix from anywhere:
$ blackhole profiles
PROFILE STATUS MEMORY BLACKHOLE PROJECTS SESSIONS LAST USED
default Running 8GiB yes 3 12 2026-11-08 11:20
work Running 16GiB yes 1 4 2026-11-08 12:05
scratch Stopped 4GiB - - - -
$ blackhole sessions
PROFILE SESSION PATH STARTED LAST ACTIVE STATUS
work 89e4f9ec-8960-4175-9bb0-4bbea4780fa9 /Users/you/Code/heavy-repo 2026-11-08 10:12 2026-11-08 12:05 ended
$ blackhole resume 89e4
blackhole: resuming 89e4f9ec-8960-4175-9bb0-4bbea4780fa9 on profile 'work' in /Users/you/Code/heavy-repo
Open an interactive debugging shell in the exact same isolated container environment:
blackhole shell
Requires macOS, Colima, and the Docker CLI (brew install colima docker). You do not need to install Claude Code or Node.js on the host (blackhole setup installs @anthropic-ai/claude-code inside the VM image). Start your Colima VM with Apple Virtualization (vz) and virtiofs for near-native filesystem performance:
colima start --vm-type vz --mount-type virtiofs --cpu 4 --memory 8 --disk 60
Build the base image and install the claude and blackhole symlinks (defaults to ~/.local/bin):
git clone https://github.com/tommy0103/blackhole.git ~/Code/blackhole
cd ~/Code/blackhole
./bin/blackhole setup
./bin/blackhole install
Ensure ~/.local/bin precedes other binary directories in your PATH:
export PATH="$HOME/.local/bin:$PATH"
To install into another directory or replace an existing host claude binary:
./bin/blackhole install --prefix /opt/homebrew/bin --force
To uninstall, remove the symlinks (rm -f ~/.local/bin/claude ~/.local/bin/blackhole) and optionally remove ~/.blackhole, the blackhole-claude:latest image, and blackhole-claude-home-* Docker volumes.
Run the launcher inside a Linux/WSL2 terminal. The lightweight route is Docker Engine in Ubuntu, reusing your existing WSL2 distribution. Docker Desktop is optional: if already installed, enable its WSL2 integration. No Colima, nested VM, host Node.js, or host Claude Code installation is needed.
First make docker info work as your normal WSL user with a rootful Docker Engine (see Docker's post-install instructions). Rootless Docker is currently unsupported: it maps host-owned project files to container UID 0, which prevents Blackhole's non-root session user from editing ordinary 0755 directories and 0644 files. The launcher rejects rootless sessions before building images or creating containers; select a rootful Docker context accessible to your normal user. Avoid running the launcher with sudo, which changes the home directory and profile state. Then, in WSL:
docker info
mkdir -p ~/Code
git clone https://github.com/tommy0103/blackhole.git ~/Code/blackhole
cd ~/Code/blackhole
./bin/blackhole setup
./bin/blackhole install
export PATH="$HOME/.local/bin:$PATH"
cd ~/Code/my-app
claude
The backend defaults to colima on macOS and docker on Linux/WSL2. BLACKHOLE_BACKEND overrides detection. Docker profiles share the selected engine and image cache, with separate blackhole-claude-home-<profile> credential/session volumes; blackhole bind work creates no VM. Existing Docker contexts and DOCKER_HOST are respected. Keep projects under ~/Code for WSL filesystem performance; /mnt/c/... paths, spaces, and Unicode are supported too. .gitattributes keeps executable scripts in LF format when cloning on Windows.
| Capability | macOS / Colima | Linux / WSL2 Docker |
|---|---|---|
| Project mount, profiles, sessions, export, custom images | Supported | Supported, one shared engine |
| Fail-close egress | VM net-watch / iptables |
Opt-in proxy-only internal network, net off/on/status |
| Clipboard images | Automatic macOS temp-file mirror | On-demand clipboard paste via Windows interop |
Ordinary sessions add no watcher or extra daemon beyond Docker. Proxy-only sessions add one unprivileged Node relay using the same image, capped at 64 MiB RAM and 0.25 CPU, removed on normal session exit. No GPU is requested. Each proxy session has its own internal network; idle networks are removed with the relay. A forcibly killed launcher may need its labeled relay/container cleaned up manually.
The column utility is optional: profile, binding, project, and session lists fall back to tab-separated output when it is unavailable.
| Command | Description |
|---|---|
claude [args...] |
Launch Claude Code inside the selected backend's container for $PWD |
blackhole setup [--claude-version VER] |
Build or rebuild the base image (and project image if .blackhole/Dockerfile exists) |
blackhole update [--claude-version VER] |
Alias for setup to rebuild with the latest (or specified) Claude Code version |
blackhole install [--prefix DIR] [--force] |
Symlink claude and blackhole into DIR (default ~/.local/bin) |
blackhole status |
Show profile, launcher protection, image ID, FUSE state, and active sessions |
blackhole shell |
Start an interactive bash shell inside the project's isolated container |
blackhole bind <profile> [dir] |
Bind a project directory (and its subdirectories) to a profile |
blackhole bindings / blackhole unbind [dir] |
List directory bindings or remove a directory's binding |
blackhole profiles |
List profiles and recorded |