跳到正文
cccskills
免费在 GitHub 公开

docker-cli

Control this machine's Docker or Podman engine through the docker_* tools - read the engine's state first, list containers and images, inspect one, tail its logs, pull an image and start it, then stop, restart or remove what you started. Covers the engine that is asleep behind Docker Desktop and the exact call for each verb, the confirm rule removals obey, and the flags the tools deliberately do not have.

中文简介正在准备中。当前显示原文说明。

集成工具DockerPostgreSQL
查看安装方法

包含的文件(2)

  • SKILL.md6.6 KB
  • reference/lifecycle.md6.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Talking to this machine's container engine

Nine tools, one engine, one rule: state first, then the smallest verb that answers the question. The tools speak the docker CLI, or podman when docker is not on PATH; every verb below works the same on both.

questiontool
is there an engine, and is it awake? what does it hold?docker_state
what is running / what exists?docker_ps
which images are on disk?docker_images
what exactly is this container or image?docker_inspect
what did it print?docker_logs
fetch an imagedocker_pull
start a container from an imagedocker_run
start / stop / restart / pause / unpause / remove / prunedocker_action
turn Docker Desktop or a podman machine ondocker_start

The order to call them in

  1. docker_state. It is the only tool that treats a sleeping engine as an ANSWER instead of a failure. On Windows 11 the engine is Docker Desktop, and Desktop being closed is the normal state after a reboot: docker_state says so, in the engine's own words, and tells you whether docker_start can fix it or whether the machine needs sudo systemctl start docker (which this plugin will not run for you).
  2. docker_start when the state says the engine is down and startable. It launches Docker Desktop (or runs podman machine start) and then polls the daemon - not the app - for up to 90 s. A cold Desktop start can be slow: if it times out, call docker_state again in a minute rather than docker_start twice.
  3. docker_ps / docker_images for the lists. Get the exact name or id from here; every other tool takes it verbatim.
  4. docker_inspect when you need the facts (ports, mounts, exit code, restart policy) and docker_logs when you need the words. tail defaults to 200; since: "10m" narrows it.
  5. docker_pull before docker_run when the image is not there yet - or let docker_run pull it, which docker does itself. Pulling first is what makes a slow download and a failed start two separate, readable events.
  6. docker_run to start one, docker_action to change one.

The calls, with the shape that works

docker_state({ disk: true })                      # the full picture, with disk use
docker_ps({ all: false, filter: "postgres" })     # what is running, narrowed
docker_images({ filter: "nginx" })
docker_inspect({ id: "web" })                     # kind is inferred; pass it to be explicit
docker_logs({ id: "web", tail: 200, since: "10m" })
docker_pull({ image: "postgres:16" })
docker_run({ image: "postgres:16", name: "db", ports: ["127.0.0.1:5432:5432"],
             env: { POSTGRES_PASSWORD: "dev" }, volumes: ["db-data:/var/lib/postgresql/data"] })
docker_action({ action: "restart", id: "web" })
docker_action({ action: "remove", id: "web", confirm: "web" })   # confirm REPEATS the id
docker_action({ action: "prune", kind: "image", confirm: "prune" })

What the tools will not do, and why

  • No exec. A container shell is a shell; the harness already has one, under the session's approval policy. If a person asks you to run something inside a container, say what the command is and run it through the shell tool - do not look for a docker_exec.
  • No system prune. prune here means stopped containers or DANGLING images, one kind at a time. docker system prune -a also takes networks, build cache and every unused image, and one confirmation cannot honestly cover that.
  • No free-form run. docker_run builds its argv from a schema; there is no spelling for --privileged, --pid host, --device or a relative host path. If a container genuinely needs one of those, say so to the person instead of working around the tool.
  • No latest by accident. An image reference without a tag is latest; if the person did not name a tag, name one you know exists or write latest out loud so the choice is visible.
  • Nothing outside the engine. No compose, no network create, no volume remove. Compose files belong to the repository and the shell.

Removing things without regret

remove needs confirm set to the SAME id or name. That is not red tape: the container's writable layer disappears, and an image may need a pull to come back. So before a removal:

  1. docker_ps and read the row - is it running? did you start it?
  2. docker_inspect for its mounts; a bind mount holds data the container does not, and a named volume survives the container anyway.
  3. Ask, when the container is not yours: "remove web?" is one sentence, and a person's "yes" is what confirm is standing in for.
  4. docker_action({ action: "remove", kind: "container", id: "<name>", confirm: "<name>" }).

force: true is for a running container that must go now. It is the difference between a clean stop and a pull of the plug; do not pass it by default.

When the engine says no

answerwhat it meanswhat to do
NO_CLIno docker and no podman on PATHsay so; offer the install; DSH_DOCKER_CLI pins a binary outside PATH
ENGINE_DOWNthe CLI is there, its daemon is notdocker_start, or the system command docker_state printed
CONFIRM_REQUIREDa removal without confirmpass confirm — and only after the person agreed
BAD_ARGa value the grammar refused (an id starting with -, a bad port)re-read the row's id; do not "fix" it by guessing
FAILEDthe engine ran the command and refusedthe message is the engine's own sentence; read it before retrying
TIMEOUTthe call outlived its deadline and was killedcheck the daemon; a pull can legitimately need a longer wait

More detail - platform start paths, Podman's differences, stream separation, image references and a safe-removal checklist - is in reference/lifecycle.md.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Author an editorial HTML+SVG diagram with the Diagram Design kit - choose the visual type, read its reference, start from an example, and satisfy the safety and accessibility contract that diagram_write({kind:"html"}) enforces.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Drive ffmpeg through the media_run tool as an argv array - remux instead of re-encode, map streams explicitly, trim at keyframes, scale and crop, extract audio and frames, and build GIFs, contact sheets and concatenations. Covers the flags this pack injects, reading a failure from its exit code and last log lines, and the version-dependent spellings to hedge.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Read a media file's real structure with ffprobe through media_run - the JSON invocation and how to read it, what every family of field means, how to count frames, sample without decoding everything, detect HDR and interlacing, and diagnose a missing duration, a stream with no frames or a container that lies. Covers when media_probe's own report is already enough.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Use when the user wants to design, redesign, shape, critique, audit, polish, simplify, harden, animate, or otherwise improve a frontend interface: websites, landing pages, dashboards, product UI, components, forms, settings, onboarding, empty states, and native iOS or Android screens. Handles UX review, hierarchy, layout, typography, color, motion, UX copy, accessibility, responsive behavior, edge cases, and capturing or documenting design systems (DESIGN.md, tokens). Also for making bland UI bolder, loud UI quieter, or ambitious visual effects. Not for backend-only or non-UI tasks.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

Author Mermaid diagrams that parse the first time: choose the right diagram type for the question, write syntax the parser accepts, and keep the picture readable in a narrow panel. A bundled reference covers complex, large diagrams.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

The Ollama REST API as it is on this machine - /api/generate and /api/chat with streaming NDJSON, /api/embed vs the older /api/embeddings, /api/tags, /api/ps, /api/show, pull progress, create/copy/delete, the OpenAI-compatible /v1 endpoints, the options map, keep_alive, the error shapes, and the environment variables that change what the daemon does.

中文简介正在准备中。当前显示原文说明。

vecnode/vn-code102026年10月20日 更新

查看 vecnode 的全部技能

报告此技能的问题