docker-agent-config
Use this skill when creating or editing an agent.yaml (or .yml/.hcl) configuration file for Docker Agent (cagent), including…
Use this skill when authoring, planning, or running a declarative `sbxenv.yaml` file for Docker Sandboxes (`sbx env create/run/plan/exec/rm`), even if the user just says they want to "check in a sandbox config", "make onboarding reproducible for a sandbox", "run a setup script
$ npx -y skills add docker/skills --skill docker-sandboxes-env --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/docker-sandboxes-envContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when authoring, planning, or running a declarative `sbxenv.yaml` file for Docker Sandboxes (`sbx env create/run/plan/exec/rm`), even if the user just says they want to "check in a sandbox config", "make onboarding reproducible for a sandbox", "run a setup script
name: docker-sandboxes-env description: Use this skill when authoring, planning, or running a declarative `sbxenv.yaml` file for Docker Sandboxes (`sbx env create/run/plan/exec/rm`), even if the user just says they want to "check in a sandbox config", "make onboarding reproducible for a sandbox", "run a setup script before the agent starts", or "define arguments for a shared sandbox environment". Covers the sbxenv.yaml schema (schemaVersion, agent, kits, workspace/additionalWorkspaces, args, env, secrets, registries, bindings, mcp, ports, sandboxOptions), host `lifecycle:` commands (initialize/postCreate/preRemove) and their approval-plan model, multi-file merge (`-f`-style deep merge and the user-level `.sbxenv.yaml` base layer), and file-write-protection (`sandboxOptions.writableEnvFiles`). license: Apache-2.0 compatibility: Requires standalone sbx with sbx env support and sbxenv.yaml schemaVersion "1", not the legacy docker sandbox wrapper. Verified against docker/sandboxes df5c96ba60484fa2c375469dbac912c205da6c37; installed-help version and provenance are in references/sources.md. docker_help does not cover standalone sbx.
`sbxenv.yaml` (schemaVersion `"1"`, EXPERIMENTAL) declaratively describes one sandbox environment — agent, mixin kits, workspace mounts, environment variables, secrets/registries/bindings to provision, MCP servers, ports, and host-side lifecycle commands — so `sbx env create|run|plan|exec|rm` can stand it up and tear it down reproducibly instead of a long flag invocation. This skill owns that file format end to end. It delegates the sandbox lifecycle semantics it wraps, the credential/network model it provisions into, and the kit schema its `kits:` entries reference, to their own skills.
Activate this skill when:
environment instead of a long `sbx create`/`sbx run` command line.
fixtures, archiving state) tied to a sandbox's create/attach/remove lifecycle.
arguments (`args:` + `--env-arg`).
or why a file, kit, or secret it declares was skipped or flagged.
Do not use this skill when:
no `sbxenv.yaml` file involved — use `docker-sandboxes-lifecycle`.
credential independent of any environment file — use `docker-sandboxes-network-credentials` (this skill's `secrets:`/ `registries:`/`bindings:` blocks provision into that same store, but do not redefine its rules here).
`docker-sandboxes-kits`.
other name, and a directory-named `.sbxenv.yaml` at the project level is **not** read as a project's own file (only the home-directory base layer uses that hidden name; see below).
built-in agent name or the manifest name of an agent kit supplied via `kits:`). Everything else is optional. `agent: shell` needs no credentials and is the simplest way to validate a file's mechanics.
Each `PATH` is either a directory (resolved to `<PATH>/sbxenv.yaml`) or the file itself. Passing more than one deep-merges them in declaration order — **`docker compose -f`-style semantics**: later files override earlier ones, mappings merge key-by-key, sequences concatenate.
sbx env create sbxenv.yaml override.yaml
named after the mounted directory (or the project directory when nothing is mounted) — so an environment that mounts nothing is still the same sandbox every time it is applied. **Two different environment files in the same directory derive the same sandbox name and collide** unless each sets its own `name:` (or you pass a distinct `--name` per invocation) — always give each environment its own explicit `name:` when more than one may exist in the same directory.
omitted-path behavior: **omitting `workspace:` mounts nothing** at all. A relative `workspace:` path resolves against the **directory of the file that declares it** — `workspace: .` mounts the directory the file sits in. `${{ env.projectDir }}` names the project directory (the one holding the first `PATH`, or cwd when none is named); `${{ env.fileDir }}` names the declaring file's own directory. Nothing else is expanded — a bare `$` is literal text, so a value written for the container (`PATH: $PATH:/opt/bin`) reaches it unchanged.
workspace: . # mounts the directory this file sits in
# workspace: ${{ env.projectDir }} # mounts the project directory explicitly`workspace:` (see `docker-sandboxes-kits` for kit reference syntax).
protection is complete only when the file sits directly at the mount's own root.** A read-only bind at the mount point cannot be renamed by the sandbox — there is nothing above it inside the mount to rename. But an environment file in a **subdirectory** of a read-write mount is protected only at its current path:
Docker-authored knowledge skills that improve AI coding agent output for Docker-related tasks. Skills are authored once as portable SKILL.md directories and discovered automatically by any compliant agent through standard skill paths.
Use this skill when creating or editing an agent.yaml (or .yml/.hcl) configuration file for Docker Agent (cagent), including…
Use this skill when exposing a Docker Agent as a server (MCP, HTTP API, A2A, ACP, or OpenAI-compatible chat), distributing an…
Use this skill when running a Docker Agent with `docker agent run`, choosing a safety/approval mode, using the `--sandbox`…
Use this skill when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their…
Use this skill when creating, modifying, or debugging Docker Compose configurations, even if the user just says they need to wire…
Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes…