← Explore all skills

SAFETY / Docker

Docker destructive guardrails

States what a destructive Docker command will remove and waits for an explicit yes, except one narrow container cleanup.

“Use this skill before running, or recommending, any Docker command that deletes, wipes, resets, or otherwise irreversibly changes state — even if the user just says to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources. Covers generic Docker CLI destructive operations not owned by a more specific skill — `docker rm`, `docker rm -f`, `docker container prune`, `docker kill`, `docker system prune`, `docker rmi`/`docker image rm`, `docker image prune -a`, `docker network rm`, `docker network prune`, `docker builder prune`, `docker buildx rm`, `docker context rm`, and standalone (non-Compose) `docker volume rm`/`docker volume prune`. Also indexes destructive commands owned by other Docker skills (Compose, sandbox, Desktop). Core rule — state exactly what will be lost and get explicit confirmation first, except narrow, low-friction Tier 1 container cleanup.”

01 / THE REASONING

Why this made the selection.

  • Prune, kill, image, network, builder, context, and standalone volume deletes stay on the confirmation rule, including when the request is only to clean up.
  • Tier 1 is only docker rm of one already-stopped container, or docker rm -f of one container this session created for a test, and only on an explicit ask. docker stop is reversible and still loses unsaved process state.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • skills/docker-destructive-guardrails/SKILL.md
  • LICENSE
  • skills/docker-destructive-guardrails/references/docker-cli-destructive-commands.md

Our findings

  • The Apache appendix at this commit says Copyright 2026 Docker, Inc. There is no SPDX-License-Identifier line.
  • docker context rm -f forces removal of a context that is in use. docker network rm -f is not described the same way. The skill says to read the reference for that difference.
  • Pinned source distinguishes system prune --volumes anonymous-volume behavior from volume prune --all named-volume scope.
  • It provides per-command alternatives rather than treating every force flag as equivalent.

Not established by this review

  • No Docker command was run; image force-removal semantics were not independently runtime-tested.
  • Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Add a skill to your workflow.

Upstream setup instructions ↗

DOCUMENTED COMMAND

npx skills add docker/skills/skills/docker-destructive-guardrails

Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.

Optional: install the reviewed revision

Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.

npx skills add https://github.com/docker/skills/tree/f79172733725e2fd236343ee7b963c446ed85d09/skills/docker-destructive-guardrails
  1. The command pins only this guardrail at the reviewed commit. The installer was not executed.
  2. Do not point the installer at the repository root if you only want this skill.

Before you start

  • Node.js and npm
  • A Docker CLI whose destructive commands you want gated

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. Skill definition ↗Checked

    https://github.com/docker/skills/blob/f79172733725e2fd236343ee7b963c446ed85d09/skills/docker-destructive-guardrails/SKILL.md

    Supports: summary, whySelected, limitations

  2. Apache-2.0 licence ↗Checked

    https://github.com/docker/skills/blob/f79172733725e2fd236343ee7b963c446ed85d09/LICENSE

    Supports: Redistribution terms, Copyright 2026 Docker, Inc.

  3. https://github.com/docker/skills/blob/f79172733725e2fd236343ee7b963c446ed85d09/skills/docker-destructive-guardrails/references/docker-cli-destructive-commands.md

    Supports: review, limitations, access

  4. https://raw.githubusercontent.com/docker/skills/f79172733725e2fd236343ee7b963c446ed85d09/skills/docker-destructive-guardrails/SKILL.md

    Supports: upstreamDescription, review.notTested, review.reviewedAt

Evidence & Ask