跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 docker-agent-run

Docker Agent Run

使用“Docker Agent run”操作多克代理时使用这一技能,选择安全/批准模式,使用“-sandbox”隔离旗,设置化名,或排除跑道出问题(丢失证书,工作树)。 即使用户只是说他们想"运行我的经纪人","让我的经纪人自动批准工具呼叫","安全运行这名经纪人",或者"为什么我的经纪人不能看到我的API密钥",这种技能适用. 包括 " 安全 " (严格/平衡/限制/自主)、 " yolo " 、 " 散装箱 " 及其网络许可证、 " 工作树 " 、 " 针剂别名 " 和 " 针剂医生 " .

1098 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

使用“Docker Agent run”操作多克代理时使用这一技能,选择安全/批准模式,使用“-sandbox”隔离旗,设置化名,或排除跑道出问题(丢失证书,工作树)。 即使用户只是说他们想"运行我的经纪人","让我的经纪人自动批准工具呼叫","安全运行这名经纪人",或者"为什么我的经纪人不能看到我的API密钥",这种技能适用. 包括 " 安全 " (严格/平衡/限制/自主)、 " yolo " 、 " 散装箱 " 及其网络许可证、 " 工作树 " 、 " 针剂别名 " 和 " 针剂医生 " .

何时用

这个技能

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Docker Agent: Running and Operating Agents、Overview、When to use this skill、Do not use this skill when、Core guidance、Safety modes。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/safety-and-sandbox.md、references/sources.md,属于带资源的技能包,这些文件按需再读。

官方 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`.

Docker Agent: Running and Operating AgentsOverviewWhen to use this skillDo not use this skill whenCore guidanceSafety modesSandbox isolationAliases and default agentWorktreesTroubleshootingRelated skillsReferences

兼容: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. · 许可:Apache-2.0

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
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`.
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.
许可
Apache-2.0
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 2
  • references/safety-and-sandbox.md
  • references/sources.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「docker-agent-run」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-d93fda15ef1d93d4-%E5%B5%8C%E5%85%A5%E4%BB%A3%E7%90%86%E8%BF%90%E8%A1%8C.html
请存为 .cursor/skills/docker-agent-run/SKILL.md 或 .claude/skills/docker-agent-run/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/docker/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/docker/skills' --list

npx skills add 'https://github.com/docker/skills' --skill 'docker-agent-run'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- 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. --- # Docker Agent: Running and Operating Agents ## Overview 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. ## When to use this skill Activate this skill when: - The user wants to run an agent interactively or headlessly (`--exec`). - The user is choosing or debugging `--safety`, `--yolo`, or approval behavior for tool calls. - The user wants to isolate an agent's shell/filesystem access with `--sandbox`, or hit a sandbox network-policy error. - The user wants a reusable shortcut (`docker agent alias`), a scoped git worktree (`--worktree`), or is debugging credentials/model availability (`docker agent doctor`). ## Do not use this skill when Do not use this skill when: - The task uses standalone `sbx run/create/stop/rm` rather than `docker agent run --sandbox` — use `docker-sandboxes-lifecycle`. - The task is standalone `sbx policy` or `sbx secret` configuration — use `docker-sandboxes-network-credentials`. Establish which CLI is in use before recommending commands when the request only says "my sandbox". - The task is writing or editing the `agent.yaml` itself (models, toolsets, sub_agents) — use `docker-agent-config`. - The task is exposing an agent as a server (`serve`), sharing it via a registry (`share`), or evaluating it (evaluation sessions, `--baseline` regression gates) — use `docker-agent-deploy`. ## Core guidance ### Safety modes - `docker agent run` supports four `--safety` modes; choose the least permissive one that still lets the task finish: - `strict` — ask for approval before every tool call. - `balanced` — auto-approve calls classified as safe, ask for the rest. - `restricted` — auto-approve safe calls, **deny** the rest outright. Use for unattended/CI runs where no human can answer a prompt. - `autonomous` — approve everything automatically. Equivalent to `--yolo`. - Never default an unattended run (cron, CI, a server endpoint) to `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. ```bash # CI-safe: unreviewed tool calls are denied, not silently approved. docker agent run --exec --safety restricted ./agent.yaml "Triage the failing test" ``` - Bake a safety default into an alias so callers don't have to remember it, and note that an explicit CLI `--safety`/`--yolo` on `docker agent run` still overrides the alias: ```bash docker agent alias add safe-coder myorg/coder --safety balanced ``` ### Sandbox isolation - `--sandbox` runs the agent inside an isolated microVM managed by the `sbx` 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. ```bash docker agent run --sandbox ./agent.yaml ``` - The sandbox network proxy is **default-deny**: only the model provider, `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: ```bash docker agent sandbox allow api.example.com docker agent sandbox list docker agent sandbox deny api.example.com ``` - Prefer baking `runtime: {sandbox: true}` into the agent's own `agent.yaml` 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. - Sandboxes persist and are reused across runs from the same workspace — 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. ### Aliases and default agent - Register a shortcut once, then run it by name instead of a path: ```bash docker agent alias add code myorg/notion-expert docker agent run code ``` - For a local run with no agent argument, `docker agent run` discovers `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. - Set the fallback for directories without a project config with a `default` alias. To select it even when a project config exists, pass `default` explicitly: ```bash docker agent alias add default ./my-agent.yaml docker agent run default ``` - CLI flags on `docker agent run ` always override the alias's own stored options (e.g. `docker agent run yolo-coder --yolo=false`). ### Worktrees - Use `--worktree` (`-w`) to isolate an agent's file edits from your current checkout — it runs the agent inside a fresh git worktree. For an **interactive** session, a clean worktree (no uncommitted changes, untracked files, or new commits) is removed automatically when the session ends; one with work prompts you to keep or remove. A **headless** run (`--exec`) never auto-cleans its worktree, regardless of state — it is left in place for inspection: ```bash docker agent run ./agent.yaml --worktree=auth-refactor --worktree-base origin/main ``` - `--worktree` cannot be combined with `--remote` or `--sandbox`. To resume a worktree run, pass `--session -1` (or the session id) — do not re-pass `--worktree`, which fails because the worktree already exists. ### Troubleshooting - "No model is currently available" or "model ... is not pulled" means the agent's provider has no usable credential, or (for `dmr/`) the model hasn't been pulled. Run `docker agent doctor ./agent.yaml` first — it reports the resolved model/provider and whether credentials were found — before touching the YAML. If credentials are missing, export the provider's API key; if a DMR model is missing, run `docker model pull `. Rerun `doctor` before retrying the task. - An agent that only *describes* a plan instead of executing it is usually missing the tool it needs (add `type: shell` or `type: todo` in `agent.yaml`), not a model failure — hand this back to `docker-agent-config`. - A `403 Blocked by network policy` error inside a sandbox run means the destination isn't allowlisted; use `docker agent sandbox allow `. ## Related skills - For standalone `sbx` lifecycle commands, use `docker-sandboxes-lifecycle`. - For standalone `sbx policy` and `sbx secret`, use `docker-sandboxes-network-credentials`. - For writing or changing the underlying `agent.yaml` (models, toolsets, sub_agents), use `docker-agent-config`. - For serving, sharing, or evaluating the agent, use `docker-agent-deploy`. ## References - `references/safety-and-sandbox.md` — full safety-mode/flag interaction table and sandbox trust-boundary details. - `references/sources.md` — provenance of every rule in this skill. ## Assets - None. ## Checks - `checks/verification.md` — Verification runbook for a `docker agent run` invocation.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…