Skip to content
Agentmart
Submit a tool

aim-bwrap-forge

Dynamically spin up bubblewrap (bwrap) isolated sandbox directories and optional tmux co-agent sessions for untrusted or multi-tenant work.

Skill by BrianV1981

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/brianv1981-aim-bwrap-forge

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Dynamically spin up bubblewrap (bwrap) isolated sandbox directories and optional tmux co-agent sessions for untrusted or multi-tenant work. Use when the Operator asks for a bwrap sandbox, isolated co-agent, or forge a sandbox tenant. Slash: /aim-bwrap-forge.

Use cases: agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/aim-bwrap-forge

What's inside

Skill name
aim-bwrap-forge
Description
Dynamically spin up bubblewrap (bwrap) isolated sandbox directories and optional tmux co-agent sessions for untrusted or multi-tenant work. Use when the Operator asks for a bwrap sandbox, isolated co-agent, or forge a sandbox tenant. Slash: /aim-bwrap-forge.
License
MIT
Instructions
109 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# aim-bwrap-forge

## Overview

Spawn a **bubblewrap-isolated** workspace under `~/.aim/sandboxes/`, optionally launch
a co-agent CLI inside it via **tmux**, and tear down safely when done.

Works on **Grok** and **AGY** vessels. Communication with the sandbox agent uses
`aim-communicate` (same FROM / REPLY_TO rules). Co-agent DNA lives in **aim-coagents**
(companion repo) — this skill does not vendor it.

## Requirements

```bash
command -v bwrap   # bubblewrap
command -v tmux
# optional: co-agent blueprints from aim-coagents companion
```

If `bwrap` is missing, stop and tell the Operator (do not invent a sandbox).

## 1. Create sandbox directory

```bash
SANDBOX_ID="sb_$(date +%s)_$RANDOM"
SANDBOX_ROOT="${AIM_SANDBOX_ROOT:-$HOME/.aim/sandboxes}/$SANDBOX_ID"
mkdir -p "$SANDBOX_ROOT"/{work,tmp,home}
echo "$SANDBOX_ROOT"
```

Never use machine-local hard-coded home paths other than `$HOME` / env overrides.

## 2. Minimal bwrap shell (interactive proof)

Read-only host OS; write only inside the sandbox:

```bash
bwrap \
  --unshare-all \
  --die-with-parent \
  --ro-bind /usr /usr \
  --ro-bind /lib /lib \
  --ro-bind /lib64 /lib64 \
  --ro-bind /bin /bin \
  --ro-bind /sbin /sbin \
  --ro-bind /etc /etc \
  --proc /proc \
  --dev /dev \
  --tmpfs /tmp \
  --bind "$SANDBOX_ROOT/work" /work \
  --bind "$SANDBOX_ROOT/home" /sbox-home \
  --setenv HOME /sbox-home \
  --chdir /work \
  -- /bin/bash
```

Adjust binds if `/lib64` is absent (some hosts use only `/lib`). Prefer **adding**
read-only binds for project tools the Operator approves; never bind secrets dirs
unless explicitly approved.

## 3. Optional: tmux co-agent inside sandbox

Detect host CLI before choosing the inner command:

| Host vessel | Inner command example |
|-------------|----------------------|
| Grok | `grok` (or path to grok in approved bind) |
| AGY | `agy` / `agy.real` |

```bash
SESSION="bwrap_${SANDBOX_ID}"
# Example: confined shell first (safer default)
tmux new-session -d -s "$SESSION" \
  "bwrap --unshare-all --die-with-parent \
    --ro-bind /usr /usr --ro-bind /lib /lib --ro-bind /bin /bin \
    --proc /proc --dev /dev --tmpfs /tmp \
    --bind \"$SANDBOX_ROOT/work\" /work \
    --bind \"$SANDBOX_ROOT/home\" /sbox-home \
    --setenv HOME /sbox-home --chdir /work \
    -- /bin/bash"

tmux list-sessions | grep -F "$SESSION"
```

Only start a full agent CLI inside bwrap when the Operator approves, and only with
binds that include that CLI’s runtime. Prefer confining a **task script** over a full
interactive agent when isolation is the goal.

## 4. Communicate

Use **`aim-communicate`**: declare FROM (your session) and REPLY_TO; paste short
messages; verify with capture-pane / `tmux_send.sh`. Do not open open-ended multi-hop
chat without Operator approval.

## 5. Tear-down

1. Confirm the sandbox agent finished (or Operator aborts).
2. Collect outputs from `$SANDBOX_ROOT/work`.
3. Kill session: `tmux kill-session -t "$SESSION"` (if created).
4. Remove sandbox only with Operator OK: `rm -rf "$SANDBOX_ROOT"`.

## Safety

- No secrets in sandbox binds unless Operator-approved.
- No `rm -rf` of paths outside `$SANDBOX_ROOT`.
- Do not force-push or touch host git repos from inside the sandbox without scope.
- If bwrap flags fail on this distro, report stderr; do not weaken isolation silently.

From BrianV1981/aim-skill-library, MIT.

More from BrianV1981/aim-skill-library

Signals

Stars
3
Forks
0
Open issues
6
Last commit (this folder)
Aug 10, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from BrianV1981

Cite this page

aim-bwrap-forge skill. Agent Mart. https://agentmart.dev/skills/brianv1981-aim-bwrap-forge (last updated 2026-10-24)