Docker Destructive Guardrails logo

Docker Destructive Guardrails

Organization
docker
docker-destructive-guardrails

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.

Overview

Publisherdocker
Repositoryskills
Skill namedocker-destructive-guardrails
Stars
557
Forks
29
Bundled files
5
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by docker on GitHub. Read the source before you install it.

Installation

Install the Docker Destructive Guardrails AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/docker/skills/tree/main/skills/docker-destructive-guardrails
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/docker/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/docker-destructive-guardrails .claude/skills/docker-destructive-guardrails
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Docker Destructive Guardrails in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Docker Destructive Guardrails on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Docker Destructive Guardrails is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Docker Destructive Command Guardrails

Overview

This skill provides the cross-product policy for handling destructive or irreversible Docker CLI operations: commands that delete data, remove resources, or otherwise cannot be undone. Use it whenever a task could reasonably lead to running one of these commands, even if the user never names the command directly. It covers the generic Docker CLI commands with no home in a more specific skill, and it indexes where other destructive commands (Compose, sandbox, Desktop) are documented.

When to use this skill

Activate this skill when:

  • The user asks to "clean up", "clear the cache", "start fresh", "wipe everything", "nuke it", "reset", "force remove", or "tear down" Docker resources without naming a specific command
  • The agent is considering docker rm, docker rm -f, docker container prune, docker kill, docker stop, 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, or standalone (non-Compose) docker volume rm/docker volume prune as a fix for an unrelated problem (disk space, a stuck container, a stale network, a broken build cache, an old builder or volume)
  • The user wants a cross-product overview of destructive commands across Docker skills

Do not use this skill when

Do not use this skill when:

  • The destructive command in question is Compose-specific (docker compose down -v, docker compose rm -v, docker volume rm/docker volume prune in a Compose project) — use docker-compose-patterns directly, which owns that guidance in full detail
  • The task is authoring or reviewing a Dockerfile or compose.yaml with no cleanup or deletion involved
  • The operation is non-Docker (git, filesystem, cloud resources) — this skill covers Docker CLI operations only

Core guidance

The core rule for every command below: state exactly what will be deleted, stopped, or lost, and get explicit confirmation from the user before running it. Never run a destructive command as a default troubleshooting or "just clean it up" reflex — disk space, stuck containers, and stale caches almost always have a narrower, non-destructive fix. See references/docker-cli-destructive-commands.md for exact flags and the safe, scoped alternative for each.

The container-lifecycle commands — docker rm, docker rm -f, docker container prune, and docker kill — don't all carry the same risk, so they're split into two tiers below instead of one flat rule. docker stop follows a related but distinct reversible-action rule right after the tiers. Every other command in this list follows the flat rule stated above with no exceptions: state what's lost, get explicit confirmation, and wait for the user's answer before running it.

Tier 1 — low-friction container cleanup

Applies only to docker rm <name> on an already-stopped container and docker rm -f <name> on a container the agent itself created and started earlier in the same session purely for testing or debugging — the -f carve-out applies even when the container is still running, since that's the only reason -f would be needed. All of the following must hold: the container is already stopped, or was created/started by the agent itself this session for testing/debugging; there's no known unpersisted state at risk; the action targets one specific, identified container rather than an unscoped sweep; and the agent is acting on an explicit user ask this session, not its own initiative. When every condition holds, the agent removes the container, states what it did, and proceeds — no blocking confirmation is required first. Tier 2's docker rm -f rule below applies to every other case.

Tier 2 — container commands needing confirmation

docker kill is always Tier 2 (see the reference for why no stopped-container exception exists for it). Also Tier 2: docker container prune (it always sweeps every stopped container on the host, never just the one the agent is cleaning up), docker rm -f on any container that doesn't meet every Tier 1 condition above (in particular, a running container the agent didn't create/start this session, or one it did but is acting on without an explicit user ask), any other unscoped sweep regardless of container state (e.g. docker rm -f $(docker ps -aq), "remove/kill all containers"), a container the agent didn't create and has no context on, and any action taken on the agent's own initiative rather than an explicit user ask. These carry the same confirmation bar as every flat-rule command in this skill: state exactly what will be lost and get explicit confirmation before running anything — no exception carved out.

docker stop — reversible, outside the tier model

docker stop doesn't remove anything — the container still exists and can be restarted with docker start — so it sits outside the Tier 1/Tier 2 removal model above. It's still in scope for this skill because it interrupts a running process (SIGTERM, then SIGKILL after the timeout) and discards any unpersisted in-container state. On the agent's own test/debug container from this session, treat it like Tier 1: stop it and state what happened, no blocking confirmation required. On any other container, state that it will stop running and any unsaved in-memory state will be lost, then get confirmation first.

  • docker system prune — deletes stopped containers, unused networks, dangling images, and build cache; -a also deletes unused tagged images, and --volumes also deletes unused anonymous volumes (named volumes are untouched — deleting those needs a separate docker volume rm).
  • docker rmi / docker image rm — deletes a specific image; see the reference for -f's exact (partly unverified) override behavior on multi-tag/referenced images.
  • docker image prune -a — deletes every image not referenced by any container, running or stopped, not just dangling ones.
  • docker network rm — deletes the specifically named network(s) passed as arguments; see the reference for how its -f flag differs from docker context rm -f below.
  • docker network prune — deletes every custom network not attached to a container.
  • docker builder prune — clears the BuildKit cache; -a/--all also removes internal helper/frontend images and cache shared with other build outputs, forcing a cold rebuild for anyone using that cache.
  • docker buildx rm — removes a builder instance, distinct from the cache docker builder prune clears — see the reference for flag details.
  • docker context rm — deletes a context's local connection config; doesn't affect remote resources but may not be trivially reconstructable. Unlike docker network rm -f above, docker context rm -f genuinely forces removal even if the context is currently in use.
  • docker volume rm / docker volume prune (standalone, no Compose project in play) — deletes volume data directly and irreversibly; docker volume prune -a/--all widens the default anonymous-only scope to named volumes too. For a Compose project's own volumes, use docker-compose-patterns instead (see Related skills); for a volume declared external: true in a compose.yaml but not managed by that Compose project, this skill's guidance applies since Compose won't touch it via down -v.

Related skills

  • For Compose-specific destructive commands (docker compose down -v, docker compose rm -v, docker volume rm/docker volume prune in a Compose context), use docker-compose-patterns — it owns that guidance in full detail; this skill only indexes it. This skill owns the standalone (non-Compose) case for docker volume rm/docker volume prune itself — see Core guidance and references/docker-cli-destructive-commands.md.
  • For Dockerfile internals, build caching, and image size optimization (non-destructive concerns), use docker-build-strategies.
  • For first-time Docker project scaffolding, use docker-project-foundations.
  • For sandbox (sbx) destructive commands (sbx rm, sbx prune), use docker-sandboxes-lifecycle — it owns that guidance in full detail; this skill only indexes it. Docker Desktop destructive-command guardrails will live in their own skill once merged (see references/cross-skill-destructive-command-index.md for tracking status); do not assume their content until that skill ships.

References

  • references/docker-cli-destructive-commands.md — Per-command breakdown of exact flags, what's deleted, and the safe/scoped alternative for each generic Docker CLI destructive command.
  • references/cross-skill-destructive-command-index.md — Cross-product table of destructive commands across all Docker skills, including a pending placeholder for Docker Desktop.

Assets

This skill has no bundled assets.

Checks

  • checks/verification.md — Manual review runbook, including example bad/good dialogues for handling destructive-command requests.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Docker Destructive Guardrails AI skill do?

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 builde...

Why use Docker Destructive Guardrails on TypingMind?

Because you install it once and use it with any model. Docker Destructive Guardrails is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Docker Destructive Guardrails in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/docker/skills/tree/main/skills/docker-destructive-guardrails. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Docker Destructive Guardrails?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Docker Destructive Guardrails?

As many as you like. As long as a model supports skills, you can use Docker Destructive Guardrails with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Docker Destructive Guardrails AI skill free?

Yes. It is published on GitHub by docker under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇