dev-sandboxlisted
Install: claude install-skill petermcalister/shared-skills
# Dev Sandbox — run work inside a per-branch Linux dev environment
The pattern: one docker-compose project per feature branch (`<prefix><branch-slug>`) —
a Linux dev container (sshd, a non-root dev user, the project toolchain, and a clone
of the branch from **origin**) plus its own database sidecar on a project-private
network. Only SSH crosses to the host (127.0.0.1-bound ports). Multiple sandboxes run
complete test suites concurrently without collisions, because each project owns its
containers, volumes, and network.
## Workspace adapter — read this FIRST
This skill is **workspace-agnostic**. The concrete lifecycle commands, ssh user,
in-container repo path, and project-specific caveats come from an **optional**
per-workspace config.
**On invocation, read `.claude/skill-workspace.json`.** If it exists and has a
`"dev-sandbox"` block, use those values (the *configured* path). If it is absent or
lacks that block, operate in **portable mode**.
| Config key | Purpose | Portable-mode fallback |
|---|---|---|
| `status_cmd` | prints per-project sandbox state as JSON | ask the user how their project reports sandbox state |
| `up_cmd` | converge/create a sandbox (`{branch}` placeholder) | ask for the project's lifecycle command; never improvise raw `docker` calls against someone else's compose project |
| `up_nowait_cmd` | non-blocking variant of `up_cmd`, poll status yourself | fall back to `up_cmd` |
| `down_cmd` | stop a sandbox; volumes survive (`{branch}` placeholder) | a