Task
Set up the sandbox plugin on this host so the user can run Claude Code inside an
isolated Docker/Podman container. The launcher is the cenci binary itself
(cenci open / its cn alias, cenci sandbox <verb>) — no plugin symlink is
installed by this skill. Two steps:
- Verify the launcher —
cenciresolves on PATH. - Build the container image via
cenci sandbox build. Without a.cenci/Dockerfilein the repo, this builds the shared monolithcenci-sandbox:latest; with one present (as in this repo), it builds the per-repocenci-sandbox-<slug>:latestinstead.
Parse $ARGUMENTS
--check-only— do step 1 only (verify), skip the image build.--build-only— do step 2 only (build), skip the verification.- empty — do both.
Preconditions
Run these checks first. If any fails, report it clearly and stop — do not continue.
- Container runtime:
command -v podman || command -v docker. If neither is found, tell the user to install Docker or Podman and stop.
Step 1 — Verify the launcher
Skip this step when --build-only was passed.
Check the binary and its alias:
command -v cenci command -v cn- If
cenciis missing, the plugin's first-session bootstrap has not run yet or~/.local/binis not on$PATH. Check with:
If it is not oncase ":$PATH:" in *":$HOME/.local/bin:"*) echo on-path ;; *) echo not-on-path ;; esac$PATH, warn the user to add it (e.g.export PATH="$HOME/.local/bin:$PATH"in their shell profile). If it is on$PATHbutcencistill does not resolve, tell the user to re-run the cenci installer per the download-verify-run sequence indocs/getting-started.md(requires cosign; fails closed with no fallback to an unverified ref). The legacycurl -fsSL https://raw.githubusercontent.com/matteobortolazzo/cenci/main/install.sh | bashone-liner still works and re-execs itself through that same verified path — setCENCI_REF=mainto explicitly opt into unsafe, unverified main instead and stop. - A missing
cnalone is cosmetic — mention re-running the installer to create it, but continue.
- If
Confirm the launcher answers:
cenci version.
Step 2 — Build the image
Skip this step when --check-only was passed.
Run the build through the launcher so the same runtime-detection and asset-resolution logic is used:
cenci sandbox build
The build can take several minutes on first run (it pulls the base image and installs the SDKs). Report the outcome.
On failure, surface the runtime's error output and stop. cenci diagnose diagnoses a running/launched session, not an image build, so it does not help here — if the image builds successfully but a later cenci open launch fails instead, run cenci diagnose --name <session> for a read-only report (summarize it for the user rather than pasting it verbatim — it may include secrets, credentials, or host paths) and consult docs/failure-atlas.md and docs/error-codes.md for CENCI-* error codes and their suggested recovery commands before falling back to manual debugging.
Done
Summarize what was done and point the user at usage:
cn(alias forcenci open) — launch Claude Code in the sandbox (full permissions inside the container)cenci open --agent codex— launch Codex in the sandbox insteadcenci open --model <model>— launch with a specific model overridecenci open --shell— open a shell for manual setup / troubleshootingcenci sandbox build— rebuild the image after changing the Dockerfile
See ${CLAUDE_PLUGIN_ROOT}/README.md for auth, MCP, cenci, and Docker-in-Docker details, and
watch/README.md for the full CLI reference, including the one-token agent/model shortcut table.