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 running a Docker Agent with `docker agent run`, choosing a safety/approval mode, using the `--sandbox` isolation flag, setting up aliases, or troubleshooting a run (missing credentials, worktrees). Even if the user just says they want to "run my agent", "make
$ npx -y skills add docker/skills --skill docker-agent-run --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/docker-agent-runContext preview
The summary Claude sees to decide when to auto-load this skill.
Use this skill when running a Docker Agent with `docker agent run`, choosing a safety/approval mode, using the `--sandbox` isolation flag, setting up aliases, or troubleshooting a run (missing credentials, worktrees). Even if the user just says they want to "run my agent", "make
name: docker-agent-run description: Use this skill when running a Docker Agent with `docker agent run`, choosing a safety/approval mode, using the `--sandbox` isolation flag, setting up aliases, or troubleshooting a run (missing credentials, worktrees). Even if the user just says they want to "run my agent", "make my agent auto-approve tool calls", "run this agent safely", or "why can't my agent see my API key", this skill applies. Covers `--safety` (strict/balanced/restricted/autonomous), `--yolo`, `--sandbox` and its network allowlist, `--worktree`, `docker agent alias`, and `docker agent doctor`. license: Apache-2.0 compatibility: Requires the docker-agent CLI plugin (Docker Desktop 4.63+, or standalone via Homebrew/GitHub releases). Sandbox mode (`--sandbox`) additionally requires the `sbx` CLI. Verified against docker-agent as shipped with Docker CLI 29.7.2.
This skill owns the operational side of Docker Agent: invoking `docker agent run` against a local config, an alias, or a registry reference; choosing how much autonomy the agent gets over tool calls; isolating it in a sandbox VM; and diagnosing why a run fails. It assumes the `agent.yaml` already exists — see Related skills for authoring it.
Activate this skill when:
Do not use this skill when:
`docker agent run --sandbox` — use `docker-sandboxes-lifecycle`.
`docker-sandboxes-network-credentials`. Establish which CLI is in use before recommending commands when the request only says "my sandbox".
permissive one that still lets the task finish:
for unattended/CI runs where no human can answer a prompt.
`autonomous`/`--yolo`. Use `restricted` for unattended runs so an unexpected tool call fails closed instead of running unreviewed; reserve `autonomous`/`--yolo` for a sandboxed or fully trusted interactive session.
# CI-safe: unreviewed tool calls are denied, not silently approved. docker agent run --exec --safety restricted ./agent.yaml "Triage the failing test"
and note that an explicit CLI `--safety`/`--yolo` on `docker agent run` still overrides the alias:
docker agent alias add safe-coder myorg/coder --safety balanced
CLI (a separate prerequisite — install and configure it first). All shell, filesystem, and process activity started by built-in toolsets happens inside the VM; only the working directory (and, unless `--no-kit`, a staged "kit" of skills/prompt files) is mounted in. **Exception:** a local stdio MCP server declared on the agent runs as a host process **outside** the sandbox VM — treat any such MCP server as a trusted host integration, not a sandboxed one.
docker agent run --sandbox ./agent.yaml
`models.dev`, and hosts the toolset resolver can infer are open. A custom MCP server or third-party API often needs an explicit allowlist entry — add it permanently rather than re-discovering it every run:
docker agent sandbox allow api.example.com docker agent sandbox list docker agent sandbox deny api.example.com
over remembering `--sandbox` on every invocation of that agent; an explicit `--sandbox=false` on the CLI still overrides the config default for a single debug run.
they are not torn down when the session ends. Don't expect a clean VM on every run; if you need one, change the mount set (e.g. a new kit) to force recreation.
docker agent alias add code myorg/notion-expert docker agent run code
`docker-agent.yaml`, then `docker-agent.yml`, then `docker-agent.hcl` in the current directory (first match wins). Only if none exists does it resolve the `default` alias, falling back to the built-in default agent. The `agent.yaml` examples in these skills pass a filename explicitly; `agent.yaml` is not an auto-discovery name.
`default` alias. To select it even when a project config exi
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 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…
Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but…