docker-sandboxes-lifecycle
Skill by docker
Manages the local lifecycle of Docker Sandboxes, the standalone sbx CLI that runs AI coding agents in isolated microVMs. It is for developers who want to isolate an agent from their repo or clean up old sandboxes.
Install docker-sandboxes-lifecycle
Built from the published package, never by AI.
git clone --depth 1 https://github.com/docker/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/docker-sandboxes-lifecycle ~/.claude/skills/docker-sandboxes-lifecycleRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install docker-sandboxes-lifecycle in Claude Code
git clone --depth 1 https://github.com/docker/skills /tmp/skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/skills/skills/docker-sandboxes-lifecycle ~/.gemini/antigravity-cli/skills/docker-sandboxes-lifecycleAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install docker-sandboxes-lifecycle in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill covers the local lifecycle of Docker Sandboxes, the standalone sbx CLI that runs AI coding agents in isolated microVMs. It explains how to create, run, reattach to, list, stop, and remove sandboxes, and how to copy files, run ad-hoc commands, and publish ports. It does not cover network policy, credentials, sbxenv.yaml, or kit authoring.
It also explains workspace isolation. By default the workspace is bind-mounted read and write. With --clone, the agent works on a private in-container clone of a Git repository, and its commits can be fetched back through a sandbox-<name> remote. The skill warns that removing or pruning a clone-mode sandbox discards any unfetched commits. It is aimed at developers who want to isolate an agent from their repository or clean up old sandboxes.
Written from the project's SKILL.md and checked against it.
What it can do
- Create and run sandboxesCreates and attaches to a sandbox with sbx run, or creates one without attaching with sbx create.
- Clone-mode isolationGives the agent a private in-container Git clone using sbx create --clone instead of a writable bind mount.
- Read-only extra workspacesMounts additional paths alongside the primary workspace, with :ro to block writes.
- Reattach by nameReattaches to an existing sandbox with sbx run --name.
- List, stop and removeLists sandboxes with sbx ls, stops them with sbx stop, and removes them with sbx rm.
- Prune stopped sandboxesRemoves only stopped sandboxes with sbx prune, with a --dry-run preview option.
- Copy filesCopies files between the host and a sandbox with sbx cp.
- Run commands in a sandboxRuns an ad-hoc command inside a sandbox with sbx exec.
- Manage published portsPublishes and unpublishes sandbox ports after creation with sbx ports.
What you need
- Standalone sbx CLI installed
Try asking
- Run claude in a sandbox against my current project folder
- Create a clone-mode sandbox so the agent gets its own git clone
- Show me which sandboxes are stopped and preview a prune
Good to know
- The --clone mode can only be set at creation time, not changed later.
- The :ro flag blocks writes but does not hide file contents from the sandbox.
- Removing or pruning sandboxes is irreversible and can discard unfetched commits.
- Secrets files should not be mounted into a sandbox, even read-only.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/docker-sandboxes-lifecycle/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md12 KB -
agents/openai.yaml474 B -
checks/verification.md4 KB -
evals/mount-ls-delete.yaml4 KB -
references/sources.md5 KB
Show all 6 files
-
skill.yaml1 KB
Alternatives to docker-sandboxes-lifecycle
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
docker-sandboxes-lifecycle: common questions
What is the difference between bind mount and --clone in Docker Sandboxes?
By default the workspace is mounted read and write at the same path as on the host. With --clone, the agent works on a private in-container clone, and the host repo is mounted read-only.
How do I get commits back from a clone-mode sandbox?
Run git fetch sandbox-<name> on the host. Fetching also keeps a copy under refs/sandboxes/<name>/ so a branch can be recovered after the sandbox is removed.
Does sbx prune remove running sandboxes?
No. It removes only stopped sandboxes, but the removal is still irreversible, so the source recommends previewing with --dry-run first.
How do I install docker-sandboxes-lifecycle?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is docker-sandboxes-lifecycle free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is docker-sandboxes-lifecycle safe to use?
It scores 86 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to docker-sandboxes-lifecycle?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
